packages feed

hydra-typescript 0.17.3 → 0.17.4

raw patch · 4 files changed

+50/−10 lines, 4 filesdep ~hydra-kernelPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: hydra-kernel

API changes (from Hackage documentation)

- Hydra.TypeScript.Coder: importsToText :: String -> ModuleName -> Set Name -> String
+ Hydra.TypeScript.Coder: importsToText :: Set String -> String -> ModuleName -> Set Name -> String
- Hydra.TypeScript.Coder: moduleToTypeScript :: Module -> [Definition] -> InferenceContext -> Graph -> Either Error (Map String String)
+ Hydra.TypeScript.Coder: moduleToTypeScript :: Set String -> Module -> [Definition] -> InferenceContext -> Graph -> Either Error (Map String String)

Files

CHANGELOG.md view
@@ -15,6 +15,46 @@  --- +## [0.17.3] - 2026-08-01++Point release on the 0.17.x line, focused on **release-artifact integrity**. The 0.17.2 release shipped+two defects that every existing check missed because they validated only the generated `dist/` tree, never+the packaged artifact: the `hydra-build` sdist shipped 3 of 8 modules, and the published Java `hydra-kernel`+jar was a whole [#417](https://github.com/CategoricalData/hydra/issues/417) rename behind. This release adds+an artifact-level publish-completeness gate that inspects the actual uploaded archive, closing that class of+defect across all five registries.++### Highlights++- **Artifact-content completeness gate** ([#621](https://github.com/CategoricalData/hydra/issues/621)):+  every publish path (Hackage sdist, Maven-Java jar, Maven-Scala jar, PyPI wheel, npm tarball) now inspects+  the *packaged* archive and hard-fails if any module a package's manifest declares is missing. The gate also+  asserts the post-#417 class names are present in the Java kernel jar.++### Bug fixes++- **PyPI wheels dropped non-`hydra.*` roots** ([#621](https://github.com/CategoricalData/hydra/issues/621)):+  the wheel packaging hardcoded `packages = ["src/main/python/hydra"]`, silently omitting `hydra-pg`'s+  `com.gdblab.*` and `openGql.*` modules. The generator now ships every emitted top-level root.++### Improvements++- **CI guard for dist-tree completeness** ([#524](https://github.com/CategoricalData/hydra/issues/524)):+  asserts every manifest `mainModules` namespace is emitted into `dist/haskell`, catching the 0.17.2+  `hydra-build` truncation at the tree level (the artifact gate is the packaged-archive counterpart).+- **Manifest generation extracted** into `Hydra.ManifestGeneration`, and the structurally-unneeded #607+  sed shims dropped ([#622](https://github.com/CategoricalData/hydra/issues/622)).+- **Release-verification signing fix** ([#441](https://github.com/CategoricalData/hydra/issues/441)):+  sign the reproducible uncompressed `.tar` and verify the `.asc` against the GitHub Release asset.+- **Java CI signing gate** ([#591](https://github.com/CategoricalData/hydra/issues/591)): `publishToMavenLocal`+  skips gpg signing when no key is present.++### Internal++- Version bump to 0.17.3; `hostVersion` advanced to 0.17.2 and the temporary #417 Java/Python local-host+  shims removed now that 0.17.2 is published on the registries+  ([#417](https://github.com/CategoricalData/hydra/issues/417)).+ ## [0.17.2] - 2026-07-28  Point release on the 0.17.x line. Themes: promotion of the generator's routing and manifest
hydra-typescript.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           hydra-typescript-version:        0.17.3+version:        0.17.4 synopsis:       Hydra's TypeScript coder: emit TypeScript source from Hydra modules description:    Hydra is an implementation of the LambdaGraph data model, which takes advantage of an isomorphism between labeled hypergraphs and typed lambda calculus: in Hydra, "graphs are programs, and programs are graphs". TypeScript support for Hydra category:       Data@@ -40,6 +40,6 @@   build-depends:       base >=4.19.0 && <4.22     , containers >=0.6.7 && <0.8-    , hydra-kernel ==0.17.3+    , hydra-kernel ==0.17.4     , scientific >=0.3.7 && <0.4   default-language: Haskell2010
src/main/haskell/Hydra/Dsl/TypeScript/Syntax.hs view
@@ -5,7 +5,6 @@ module Hydra.Dsl.TypeScript.Syntax where  import qualified Hydra.Core as Core-import qualified Hydra.Dsl.Core as DslCore import qualified Hydra.TypeScript.Syntax as Syntax import qualified Hydra.Typed as Typed import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
src/main/haskell/Hydra/TypeScript/Coder.hs view
@@ -667,8 +667,8 @@         Syntax.functionDeclarationGenerator = False}  -- | Render a set of qualified names as TypeScript import statements grouped by source module-importsToText :: String -> Packaging.ModuleName -> S.Set Core.Name -> String-importsToText kind currentNs names =+importsToText :: S.Set String -> String -> Packaging.ModuleName -> S.Set Core.Name -> String+importsToText overlaySubs kind currentNs names =        let pairs =               Optionals.givens (Lists.map (\n -> Optionals.cases (Names.moduleNameOf n) Nothing (\ns -> Logic.ifElse (Equality.equal (Packaging.unModuleName currentNs) (Packaging.unModuleName ns)) Nothing (Just (ns, n)))) (Sets.toList names))@@ -695,8 +695,9 @@                         targetSegs = Lists.drop 1 (Strings.splitOn "." (Packaging.unModuleName ns))                         targetIsTest =                                 Logic.and (Logic.not (Lists.null targetSegs)) (Equality.equal (Optionals.withDefault "" (Lists.head targetSegs)) "test")+                        targetSub = Optionals.withDefault "" (Lists.at 1 targetSegs)                         targetPathSegs =-                                Logic.ifElse (Equality.equal (Optionals.withDefault "" (Lists.head targetSegs)) "lib") (Lists.concat2 [+                                Logic.ifElse (Logic.and (Equality.equal (Optionals.withDefault "" (Lists.head targetSegs)) "lib") (Sets.member targetSub overlaySubs)) (Lists.concat2 [                                   "overlay",                                   "typescript"] targetSegs) targetSegs                         targetPath = Strings.join "/" targetPathSegs@@ -743,8 +744,8 @@       Syntax.documentationCommentTags = []})))  -- | Convert a Hydra module to a map from .ts file path to TypeScript source-moduleToTypeScript :: Packaging.Module -> [Packaging.Definition] -> Typing.InferenceContext -> Graph.Graph -> Either Errors.Error (M.Map String String)-moduleToTypeScript mod defs cx g =+moduleToTypeScript :: S.Set String -> Packaging.Module -> [Packaging.Definition] -> Typing.InferenceContext -> Graph.Graph -> Either Errors.Error (M.Map String String)+moduleToTypeScript overlaySubs mod defs cx g =        let currentNs = Packaging.moduleName mod           partitioned = Environment.partitionDefinitions defs@@ -760,8 +761,8 @@           typeImports = Sets.union (Sets.union typeImportsFromTypes typeImportsFromTerms) typeImportsFromInner           termImports =                   Lists.foldl (\acc -> \td -> Sets.union acc (collectTermImports currentNs (Packaging.termDefinitionBody td))) Sets.empty termDefs-          typeImportsBlock = importsToText "type" currentNs typeImports-          termImportsBlock = importsToText "value" currentNs termImports+          typeImportsBlock = importsToText overlaySubs "type" currentNs typeImports+          termImportsBlock = importsToText overlaySubs "value" currentNs termImports           importsBlock = Strings.concat2 typeImportsBlock termImportsBlock       in (Eithers.bind (Eithers.mapList (encodeTypeDefinition cx g currentNs) typeDefs) (\typeItems ->         let termItems = Lists.map (encodeTermDefinition cx g currentNs) termDefs