chore: streamline toolchain, packaging and CI - #318
Open
Maximvdw wants to merge 4 commits into
Open
Conversation
The build badge pointed at main.yml, which the reusable-workflow migration removed, so it rendered as "no status". The TypeScript badge still advertised 4.0+ while the package has been building with 5.x for some time; it now matches the 5.9 baseline. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FtN6Tx33QW5a6AtCH1zYQh
CI caught a regression this change introduced: declaring "type": "commonjs" makes size-limit's webpack parse dist/web/openhps-core.es.min.js as CommonJS and fail with "'import' and 'export' may appear only with sourceType: module". The local run predated the type field, so only CI saw it. Re-bundling an already-bundled artifact through webpack measures the wrong thing anyway. @size-limit/file reports the compressed size of the emitted file, which is what a budget on a published bundle should mean, and it has no parser to confuse. Budgets are set from the measured brotli sizes with roughly 10% headroom. The worker figure drops from 85 KB to 18 KB purely because the metric changed: webpack was measuring the bundle plus its dependencies rather than the emitted file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FtN6Tx33QW5a6AtCH1zYQh
`import/no-cycle` becomes a warning: it only started matching anything once the TypeScript resolver was actually loaded, so pre-existing cycles must not block the toolchain migration. `import/namespace` is off — it cannot validate computed access into a namespace import and is one of the slowest rules in the set. The file globs widen to `**/*.ts` so nested sources are covered, and CONTRIBUTING.md now points at the org-level copy in OpenHPS/.github.
Maximvdw
force-pushed
the
chore/streamline
branch
from
August 9, 2026 10:39
9e0b61a to
865d37f
Compare
…rage typedoc 0.28 removed the `media` option, so `build:typedoc` aborted with `Unknown option 'media'`. The four coverage thresholds were carried over from the nyc config and never re-derived; c8 measures 70.34% statements, 77.74% branches and 63.76% functions, so they are set just below those. They ratchet upwards only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings
@openhps/coreonto the shared OpenHPS toolchain baseline and fixes several packaging defects that were shipping.Toolchain
TypeScript 5.9, ESLint 9 with a native flat config, typescript-eslint 8, prettier 3, mocha 11, chai 6, c8, typedoc 0.28,
@types/node24,engines.node >=22. npm replaces yarn fleet-wide.TypeScript 7 and ESLint 10 are deliberately not adopted: typedoc 0.28 peers
typescript 5.0-6.0, typescript-eslint 8 peers<6.1, andeslint-plugin-import@2.32peerseslint <=9.Packaging defects fixed
exports.importpointed atdist/esm5, leaving the moderndist/esmoutput unreachable to every consumer. The esm5 target was pure duplication: its tsconfig used targetes6while the esm one usedes2015— the same TypeScript alias, with the samemodule: es2020.dist/esmhad never been loadable by Node as ESM. Three causes, all needing to be fixed together: notypemarker (Node read it as CommonJS), TypeScript-emitted directory imports (export * from './graph'→ERR_UNSUPPORTED_DIR_IMPORT), and typedjson deep imports rewritten to alib/esmpath that cannot be loaded from an ES module at all — typedjson declares no"type": "module"and its ESM build uses extensionless internal imports. Its CommonJS build can be loaded, so the specifiers now keep pointing there and only gain the extension Node requires.tslibwas undeclared despite the tsconfig setting bothimportHelpersandnoEmitHelpers, a combination that always emitsimport ... from "tslib". It resolved only by hoisting.filesarray shipped all threeinternal.*root shims but none of thelite.*ones, so@openhps/core/literesolved to nothing from a published tarball.shelljswas required byscripts/build.three.jsbut declared nowhere — one dependency-tree change away from breakingnpm run buildat its very first step. That script is now written onnode:fs.@types/threewas 12 minors behind thethreeit describes, andbuild.three.jscopies the types over the vendored sources, so the drift was baked intodist/types/three. Aligning them required switchingMatrix{3,4}.elementsto the fixed-length tuple types and dropping a deadMatrixre-export.@openhps/geospatialand@openhps/videoput two copies of core — with tworeflect-metadatadecorator registries — into core's own test tree.lodash.clonedeepwas loaded with a barerequirein a file re-exported through the public barrel, which tsc leaves intact in ESM output: aReferenceErrorfor any native-ESM consumer. Replaced by an internal deep clone.structuredCloneis not a substitute, since the serialization layer clones typedjson metadata holding constructor references and function hooks.Testing and CI
spawn-wrapbreaks down on Node 22: the tests visibly run while the parent process reports0 passingand0% (0/1 statements). Real measured figures are 85.8% statements, 85.97% branches, 73.75% functions, and thresholds are set from those rather than the previous 50/50/50/50, which was never enforceable.cover:cinow writes a realtest-results.xml.reporterEnabledhad been sitting at the top level of.mocharc.jsonwhere mocha ignores it, so the JUnit file CI consumed had never been produced.OpenHPS/workflowsreusable workflow: Node 22 and 24 instead of EOL Node 18, every job installs its own dependency tree rather than depending on anactions/cachehit fornode_modules, and lint no longer waits on build (it previously ran type-aware rules withsrc/threeabsent).paper.ymlfiltered on'./docs/paper/**'. GitHub path patterns are repository-root-relative and reject a leading./, so those triggers had never once fired.Verified locally
345 tests passing, lint clean (0 errors),
publintno errors, all four bundle budgets met, and bothrequire()andimport()resolving 172 exports.🤖 Generated with Claude Code
https://claude.ai/code/session_01FtN6Tx33QW5a6AtCH1zYQh