Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,923 changes: 530 additions & 1,393 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scopes/harmony/aspect/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"allowSyntheticDefaultImports": true,
"strictPropertyInitialization": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"noImplicitAny": false,
"preserveConstEnums": true,
"resolveJsonModule": true
Expand Down
2 changes: 1 addition & 1 deletion scopes/react/react/typescript/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"skipLibCheck": true,
"experimentalDecorators": true,
"outDir": "dist",
"moduleResolution": "node",
"moduleResolution": "bundler",
"esModuleInterop": true,
"rootDir": ".",
"resolveJsonModule": true
Expand Down
2 changes: 1 addition & 1 deletion scopes/react/react/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"sourceMap": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
Comment thread
davidfirst marked this conversation as resolved.
"esModuleInterop": true,
"resolveJsonModule": true,
"allowJs": true,
Expand Down
6 changes: 6 additions & 0 deletions scopes/scope/scope/ui/reset-css.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// `reset-css` is a pure-CSS package with no type declarations. Under TypeScript 6
// (moduleResolution `bundler`/node10), a side-effect `import 'reset-css'` requires a
// resolvable module/types or it errors TS2882. This ambient declaration is co-located
// with the component so it travels into the capsule and is picked up by the env's
// `include: ["**/*"]` compile (the root tsconfig ambient shim doesn't reach env builds).
declare module 'reset-css' {}
2 changes: 1 addition & 1 deletion scopes/typescript/typescript/tsconfig.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"noImplicitAny": false,
"removeComments": true,
"preserveConstEnums": true,
Expand Down
6 changes: 6 additions & 0 deletions scopes/workspace/workspace/ui/workspace/reset-css.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// `reset-css` is a pure-CSS package with no type declarations. Under TypeScript 6
// (moduleResolution `bundler`/node10), a side-effect `import 'reset-css'` requires a
// resolvable module/types or it errors TS2882. This ambient declaration is co-located
// with the component so it travels into the capsule and is picked up by the env's
// `include: ["**/*"]` compile (the root tsconfig ambient shim doesn't reach env builds).
declare module 'reset-css' {}
9 changes: 9 additions & 0 deletions ts-ambient.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Ambient declarations for side-effect-only imports whose types ship as `.d.cts`
// (exports-map / CJS-declaration only) and therefore can't be resolved by this repo's
// root `tsc --noEmit` check under classic `moduleResolution: node` (node10). The
// component builds resolve them fine via `moduleResolution: bundler`; these stubs only
// satisfy the root type-check, which imports these packages purely for their side effects.
// Empty module bodies (not bare `declare module 'x';`) keep these side-effect-only:
// `import 'reset-css'` is valid, but an accidental value import is a type error.
declare module 'reset-css' {}
declare module '@mdx-js/loader' {}
15 changes: 14 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@
"emitDecoratorMetadata": true,
"strict": true,
"moduleResolution": "node",
// TS6 flags classic `node` (node10) resolution as a deprecation error (TS5107).
// Silence it to keep this repo-wide `tsc --noEmit` check on the resolution semantics
// it has always used (resolve to `main`/`types` = dist, ignoring `exports` maps).
// Switching to `bundler`/`nodenext` here would honor `exports` and surface
// source-vs-dist duplicate-identity noise across installed @teambit packages.
// node10 keeps functioning through TS6; revisit before TS7 removes it.
"ignoreDeprecations": "6.0",
// TS6 no longer auto-includes node_modules/@types. `@types/node` still loads
// program-wide because node builtins are imported across the repo, but `jest`
// globals are only ever used ambiently (never imported), so pin the two ambient
// type packages this repo-wide check needs.
"types": ["node", "jest"],
Comment thread
davidfirst marked this conversation as resolved.
Comment thread
davidfirst marked this conversation as resolved.
"module": "commonjs",
"target": "es2015",
"skipLibCheck": true,
Expand All @@ -19,7 +31,8 @@
"include": [
"scopes",
"e2e",
"components"
"components",
"ts-ambient.d.ts"
],
"exclude": [
"node_modules",
Expand Down
4 changes: 2 additions & 2 deletions workspace.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
"tippy.js": "6.2.7",
"ts-graphviz": "^2.1.6",
"type-coverage": "2.15.1",
"typescript": "5.9.2",
"typescript": "6.0.3",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Ts5 still installed 🐞 Bug ☼ Reliability

Even after bumping the workspace dependency policy to TypeScript 6.0.3, pnpm-lock.yaml still pins
scopes/harmony/bit to typescript@5.9.2, so installs keep multiple TypeScript versions and that
importer can still resolve/use TS5. This can reintroduce TS5-vs-TS6 behavior differences for any
tooling executed in that workspace package (or anything resolving its local typescript).
Agent Prompt
## Issue description
The PR updates `workspace.jsonc` to TypeScript `6.0.3`, but `pnpm-lock.yaml` still records `typescript@5.9.2` as a direct dependency for the `scopes/harmony/bit` workspace importer. This leaves multiple TypeScript versions in the install and may cause some tooling to run under TS5.

## Issue Context
The root importer is already on TS6, so this is a per-importer skew.

## Fix Focus Areas
- pnpm-lock.yaml[2058-2063]
- pnpm-lock.yaml[21753-21880]
- workspace.jsonc[643-650]

## Suggested fix
1. Identify why the `scopes/harmony/bit` importer still requests TS `5.9.2` (component-level dependency policy / variant override / generated manifest input).
2. Update that source to request `typescript@6.0.3`.
3. Regenerate `pnpm-lock.yaml` (e.g., via the same `bit install` workflow used for this PR) and confirm `scopes/harmony/bit` now resolves TS6.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — this is real. teambit.harmony/bit's typescript dep lives in the component model (set via a past bit deps set), not in workspace.jsonc — see the note on the variant's dependency-resolver policy: "Changes here won't affect the actual dependencies … To change a dependency from this list, run bit deps set teambit.harmony/bit <pkg@version>." So the workspace.jsonc bump can't move it, and the importer stays on 5.9.2.

Note the actual CI build already compiles under TS6 (it resolves the root-hoisted typescript@6.0.3; that's what surfaces the TS6 errors), so this is a manifest-consistency gap rather than the current build failure. The correct fix is bit deps set teambit.harmony/bit typescript@6.0.3 + bit install, which we're sequencing as part of the broader TS6 rollout (currently gated on the env-side TS6 migration). Leaving this thread open to track it.

"ua-parser-js": "0.7.40",
"uid-number": "0.0.6",
"uniqid": "5.3.0",
Expand Down Expand Up @@ -846,7 +846,7 @@
"buffer": "6.0.3",
"process": "0.11.10",
"react-router-dom": "6.3.0",
"typescript": "5.9.2",
"typescript": "6.0.3",
// @parcel/css, lightningcss, @swc/css are used by css-minimizer-webpack-plugin
// see this issue https://github.com/webpack-contrib/css-minimizer-webpack-plugin/issues/244
"@parcel/css": "^1.8.3",
Expand Down