Upgrade to ES2025/NodeNext, expand npm package exports, enhance typedoc config#887
Upgrade to ES2025/NodeNext, expand npm package exports, enhance typedoc config#887
Conversation
…ge exports, enhance typedoc config - tsconfig.json: target ES2025, module/moduleResolution NodeNext, remove deprecated options - eslint.config.js: ecmaVersion 2025 - src/index.ts: expand from ~40% to ~90% of src modules exported - package.json: add subpath exports for direct module access - typedoc.json: add ISMS policy links, future architecture docs, extra blockTags - ARCHITECTURE.md: update ES2024→ES2025, ESNext→NodeNext references - SWOT.md: update ES2024→ES2025 reference Agent-Logs-Url: https://github.com/Hack23/euparliamentmonitor/sessions/6da7d820-bdd3-4d92-960c-ab637f5cb7a7 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
|
@copilot analyse and fix issues in failing checks |
Agent-Logs-Url: https://github.com/Hack23/euparliamentmonitor/sessions/1bedd569-b77e-4d7e-a8c4-df30c8a02765 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
The CI failure was a Prettier formatting issue in |
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s TypeScript/ESM configuration to ES2025 + NodeNext semantics, expands the npm package’s exported surface (both via the root barrel and package.json subpath exports), and enhances TypeDoc navigation/docs to include ISMS policy links and future-architecture documentation.
Changes:
- Updated TypeScript + ESLint configuration to target ES2025 and use NodeNext module/moduleResolution.
- Expanded the public package API via
src/index.ts/scripts/index.jsre-exports and added subpathexportsmappings inpackage.json. - Enhanced TypeDoc configuration with additional block tags, navigation links, and project documents (including ISMS and FUTURE_* docs).
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
typedoc.json |
Adds ISMS-related block tags, sidebar links, and includes additional project documents in generated docs. |
tsconfig.json |
Moves compilation target to ES2025 and switches module/moduleResolution to NodeNext. |
eslint.config.js |
Aligns ESLint parsing with ES2025 (ecmaVersion: 2025). |
package.json |
Adds subpath export maps for types, mcp, constants, utils, templates, generators, pipeline, and strategies. |
src/index.ts |
Expands the root barrel exports to cover most modules (constants, utils, pipeline, generators, strategies). |
scripts/index.js |
Updates the compiled/published entrypoint to reflect the expanded barrel exports. |
ARCHITECTURE.md |
Updates documentation references from ES2024 to ES2025 and reflects NodeNext module usage. |
SWOT.md |
Updates build tooling reference from ES2024 to ES2025. |
Comments suppressed due to low confidence (1)
src/index.ts:305
- The root entrypoint now re-exports a very large set of modules (pipeline stages, strategies, generators). In ESM, importing
euparliamentmonitorwill eagerly load/instantiate all these dependency modules even if a consumer only needs a small subset, which can increase startup time and makes the package more sensitive to any import-time side effects in those modules. Consider keeping the root entrypoint smaller and relying on the new subpath exports (e.g.euparliamentmonitor/generators/...,euparliamentmonitor/utils/...) for the expanded surface, or split exports into multiple entrypoints (e.g../pipeline,./strategies) to avoid eagerly loading everything onimport 'euparliamentmonitor'.
// ─── Analysis Pipeline Stages ─────────────────────────────────────────────────
export {
ALL_ANALYSIS_METHODS,
VALID_ANALYSIS_METHODS,
runAnalysisStage,
} from './generators/pipeline/analysis-stage.js';
src/index.ts
Outdated
| } from './utils/news-metadata.js'; | ||
|
|
||
| // ─── Metadata Utilities ────────────────────────────────────────────────────── | ||
| export { pl } from './utils/metadata-utils.js'; |
There was a problem hiding this comment.
pl is exported from the package root, but the abbreviated name is unclear for external consumers and is easy to miss in autocomplete. Consider re-exporting it under a more descriptive public name (e.g. pluralize / pluralizeCount) and/or keeping pl only as an internal alias.
| export { pl } from './utils/metadata-utils.js'; | |
| export { pl, pl as pluralizeCount } from './utils/metadata-utils.js'; |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/Hack23/euparliamentmonitor/sessions/2e947f56-4042-4dbc-aba3-d3d797d13130 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Applied the reviewer's suggestion — |
Project was targeting ES2024 with deprecated
moduleResolution: "node"(requiringignoreDeprecations: "6.0"). npm package only exported ~40% of src modules. TypeDoc config missing ISMS policy links and future architecture docs.ES2025 + NodeNext module resolution
tsconfig.json:target: ES2025,module: NodeNext,moduleResolution: NodeNextignoreDeprecations: "6.0"and unnecessarybaseUrl: "."eslint.config.js:ecmaVersion: 2025(both src/test sections)NodeNextoverNode16: forward-tracks latest Node.js module semantics rather than being frozen at v16 behavior. Both support ESM +.jsextensions which the codebase already uses.Expanded npm package surface
src/index.tsexpanded from ~40% → ~90% of modules exported:Added subpath exports in
package.json:TypeDoc enhancements
projectDocuments(all FUTURE_* docs, WORKFLOWS, CLASSIFICATION, CONTRIBUTING, SECURITY)@isms,@framework,@classification