Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
f2757aa
feat(envs): remove core envs from the manifest, load them as regular …
davidfirst Jul 2, 2026
c7dd1a7
fix(envs): load legacy core envs from installed packages instead of s…
davidfirst Jul 2, 2026
d9f77c0
fix(envs): enforce single instance for legacy core envs, silence expe…
davidfirst Jul 2, 2026
e6418b9
Merge branch 'master' into remove-core-envs-from-manifest
davidfirst Jul 2, 2026
c9eca3d
Merge branch 'master' into remove-core-envs-from-manifest
davidfirst Jul 2, 2026
a277cdb
feat(envs): add core EmptyEnv as the default env, restore react-free …
davidfirst Jul 2, 2026
3f5c24e
Merge branch 'remove-core-envs-from-manifest' of https://github.com/t…
davidfirst Jul 2, 2026
0607c7d
fix(envs): persist legacy core env config entries versionless, load e…
davidfirst Jul 3, 2026
b23b273
feat(envs): remove aspect and env envs from the core manifest
davidfirst Jul 6, 2026
94eddce
fix(workspace): resolve name-only legacy envs to their workspace vers…
davidfirst Jul 6, 2026
ac4b7d0
fix(generator): use the canonical symphony env id in the harmony work…
davidfirst Jul 6, 2026
ab21e34
refactor(compiler): avoid duplicate env resolution in missing-dists c…
davidfirst Jul 6, 2026
66fd06b
Merge branch 'master' into remove-core-envs-from-manifest
davidfirst Jul 6, 2026
5487276
fix(workspace): load versionless legacy env as the versioned workspac…
davidfirst Jul 6, 2026
684cdf6
fix(workspace): suppress legacy-env load failures only when the env p…
davidfirst Jul 6, 2026
47194d4
refactor(workspace): index-based dequeue in getGraphDescendants BFS
davidfirst Jul 6, 2026
3df0fcd
fix(react): avoid importing the react env in the apply-providers ui c…
davidfirst Jul 6, 2026
eedfdcd
fix(harmony): make load-aspect and unit tests work with the empty-env…
davidfirst Jul 6, 2026
efbc4e3
fix(envs): add a clear-error build() to the fallback compiler to sati…
davidfirst Jul 6, 2026
784c31a
fix(bitmap): remove stale legacy env configs resurrected by an earlie…
davidfirst Jul 6, 2026
d4c7969
fix(preview): skip env-template generation for envs without preview m…
davidfirst Jul 6, 2026
59ec61a
fix(workspace): skip env verification when setting a legacy core env
davidfirst Jul 6, 2026
df17985
Merge branch 'master' into remove-core-envs-from-manifest
davidfirst Jul 7, 2026
eafd77b
fix(envs): prefer the host component when fetching a legacy core env …
davidfirst Jul 7, 2026
b95165e
fix(envs): resolve variant-configured legacy core envs from the slot,…
davidfirst Jul 7, 2026
03511a4
fix(envs): match legacy core envs ignoring version in isEnvRegistered
davidfirst Jul 7, 2026
c91b190
fix(workspace): exclude seed ids from getDependentsIds results in cyc…
davidfirst Jul 7, 2026
edbdde7
fix(e2e): install legacy env packages in aspect-env and publish fixtures
davidfirst Jul 7, 2026
10a3995
fix(e2e): install the aspect env packages in the extensions-config fi…
davidfirst Jul 7, 2026
01ae6f4
fix(compiler): skip MissingDists issue when getCompiler returns undef…
davidfirst Jul 7, 2026
d269325
fix(e2e): install the node env package in the watch fixtures
davidfirst Jul 7, 2026
eacfcdf
fix(workspace): unwind the visiting set in resolveInstalledAspectRecu…
davidfirst Jul 7, 2026
dd6495d
refactor(envs): drop a stale eslint suppression comment
davidfirst Jul 7, 2026
f424a7a
fix(preview): treat legacy core envs as core in preview data calc and…
davidfirst Jul 7, 2026
1b5cc28
fix(install): avoid passing link deps to pnpm hoisted resolution, res…
davidfirst Jul 7, 2026
04b5578
fix(e2e): configure and install the node env in the app-root-componen…
davidfirst Jul 7, 2026
8464a63
fix(envs): use a cheap host lookup instead of listing all ids when re…
davidfirst Jul 7, 2026
a885155
fix(e2e): install the node env and strip ansi in the jest tester fixt…
davidfirst Jul 7, 2026
39351c4
fix(install): count non-loaded legacy core envs for the recurring-ins…
davidfirst Jul 7, 2026
ce0a7e2
fix(e2e): run a second install in app-root-components fixtures to app…
davidfirst Jul 7, 2026
d6e0cc5
fix(e2e): install the node env in test-harmony and validate fixtures
davidfirst Jul 7, 2026
2fe2be0
fix(e2e): run a second install in setNodeEnv to apply the env depende…
davidfirst Jul 7, 2026
cbde672
fix(e2e): install legacy env packages in env and reset command fixtures
davidfirst Jul 7, 2026
4163df4
docs(empty-env): add the aspect docs file
davidfirst Jul 7, 2026
37d3339
fix(e2e): install the node env in the scope-rename fixtures
davidfirst Jul 7, 2026
eac49fd
fix(e2e): install the node env and strip ansi in the merge-lanes loos…
davidfirst Jul 7, 2026
062ee3c
fix(compiler): skip env ids that are not on the workspace graph when …
davidfirst Jul 7, 2026
dc03518
fix(generator): merge builtin templates into a single slot registrati…
davidfirst Jul 7, 2026
dfa1e9a
fix(e2e): install legacy env packages and load ex-core templates via …
davidfirst Jul 7, 2026
288fd56
fix(envs): resolve variant-configured legacy core envs from the slot …
davidfirst Jul 7, 2026
8d88698
fix(e2e): run a second install after forking an env so its policies a…
davidfirst Jul 7, 2026
5d6c4f6
fix(scope): resolve and import only non-loaded aspects in getNonLoade…
davidfirst Jul 7, 2026
3480a1a
fix(deps): log the swallowed error when the env root dir cannot be de…
davidfirst Jul 7, 2026
ffeda69
fix(workspace): skip env-component fetch on env-set when the env is r…
davidfirst Jul 7, 2026
d312e5f
fix(envs): resolve versioned env ids registered versionless in the slot
davidfirst Jul 7, 2026
4c4cdf4
fix(generator): load template envs from the workspace instead of the …
davidfirst Jul 7, 2026
fcf852c
fix(e2e): install pinned envs and set the node env in multiple-envs, …
davidfirst Jul 7, 2026
8ed15ef
perf(envs): cache the legacy core envs ids list and set
davidfirst Jul 7, 2026
dca65ba
fix(workspace): resolve workspace aspects from their compiled workspa…
davidfirst Jul 7, 2026
829501b
fix(compiler): compile-and-retry aspects that fail loading on ts file…
davidfirst Jul 7, 2026
44619f9
fix(e2e): skip type-checking dev-repo fixtures in capsules, use core-…
davidfirst Jul 7, 2026
739d47e
fix(deps): anchor getRuntimeModulePath existence checks to the worksp…
davidfirst Jul 7, 2026
ec35199
fix(install): honor the scope-trust guard when reloading aspect plugi…
davidfirst Jul 7, 2026
bbbcac1
fix(workspace): load legacy core envs configured via envs-config with…
davidfirst Jul 7, 2026
8ff52c4
fix(envs): match versioned ids of versionless-registered envs in isEn…
davidfirst Jul 7, 2026
80b2a8e
fix(e2e): install pinned legacy envs and adjust default-env expectati…
davidfirst Jul 7, 2026
8781858
fix(workspace): require the compiled dist main when a stale source-ma…
davidfirst Jul 7, 2026
03bdd2c
fix(install): converge recurring-install for old-style workspace envs
davidfirst Jul 8, 2026
70a20c9
fix(e2e): install yarn-missing env peers, align old-envs install warn…
davidfirst Jul 8, 2026
0f48973
fix(workspace): match workspace aspects ignoring version when resolvi…
davidfirst Jul 8, 2026
449523c
fix(envs): match versionless env references against versioned slot re…
davidfirst Jul 8, 2026
e8d7c66
fix(generator): run recurring install during workspace generation to …
davidfirst Jul 8, 2026
40a6dbc
fix(e2e): use a workspace env in ci-commands env-set tests, explicit …
davidfirst Jul 8, 2026
123a5b3
fix(envs): return a copy of the legacy core envs ids list
davidfirst Jul 8, 2026
6d0af2d
fix(e2e): install the env chain in dev-deps and scope-aspect-capsule …
davidfirst Jul 8, 2026
53ad9f8
fix(e2e): skip type-checking node-env fixture in capsules, scope lint…
davidfirst Jul 8, 2026
e21c295
fix(e2e): revert env-chain install in scope-aspect-capsule fixture (t…
davidfirst Jul 8, 2026
0f796d9
fix(scope): break re-entrant aspect-load cycles with an in-flight guard
davidfirst Jul 8, 2026
9e969d2
fix(envs): recognize core envs in findFirstEnv before the core-aspect…
davidfirst Jul 8, 2026
f121f05
fix(e2e): remove accidentally committed .only from root-components
davidfirst Jul 8, 2026
3415ff8
chore: retrigger ci after transient bit.cloud 522
davidfirst Jul 8, 2026
caf30a0
fix(ci): cap node heap below the container memory limit in e2e runs
davidfirst Jul 8, 2026
698f97c
fix(workspace): widen the dist-main fallback to more source extensions
davidfirst Jul 8, 2026
fbe874f
fix(deps): anchor the bit-roots dir existence check to the workspace …
davidfirst Jul 8, 2026
2c95426
Revert "fix(ci): cap node heap below the container memory limit in e2…
davidfirst Jul 8, 2026
ff0a547
fix(workspace): try all parent chains when resolving installed aspects
davidfirst Jul 8, 2026
446416e
fix(envs): resolve versionless env references deterministically when …
davidfirst Jul 8, 2026
b34990a
fix(e2e): tolerate typescript 6 in tsconfig-mismatch fixtures, skip t…
davidfirst Jul 8, 2026
d4bb772
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 8, 2026
cd9e726
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 8, 2026
317f480
fix(scope): type loadCustomEnvs option as boolean
davidfirst Jul 8, 2026
3fae4bf
chore: update empty-env to core-aspect-env 1.0.0
davidfirst Jul 8, 2026
6de8740
fix(workspace): match installed root aspects ignoring version, restor…
davidfirst Jul 8, 2026
150dfe8
fix(e2e): switch to yarn only after installing the legacy env chain t…
davidfirst Jul 8, 2026
796f76c
fix(workspace): key in-flight aspect loads by full id, collapse versi…
davidfirst Jul 8, 2026
4fd87e8
refactor(workspace): type the aspect-sources result map explicitly
davidfirst Jul 8, 2026
5dd1c00
fix(envs): support mts/cts in the fallback typescript compiler
davidfirst Jul 9, 2026
7bad71b
chore: merge master into remove-core-envs-from-manifest
davidfirst Jul 9, 2026
aa8e29d
fix(envs): keep explicitly configured env version in getEnvId config …
davidfirst Jul 9, 2026
a771e4e
ci: raise e2e no_output_timeout for silent env-chain installs
davidfirst Jul 10, 2026
d49c9de
perf(workspace): batch-import deps per level when building filtered a…
davidfirst Jul 10, 2026
9209097
test(e2e): switch compile-only suites to a modern pinned node env
davidfirst Jul 13, 2026
b4b4211
fix(workspace): chunk batched graph imports to bound memory
davidfirst Jul 13, 2026
97656dc
chore: merge master into remove-core-envs-from-manifest
davidfirst Jul 13, 2026
c5b009a
fix(workspace): skip locally-present ids in lazy graph import prefetch
davidfirst Jul 13, 2026
7bfc332
test(e2e): fix build-cmd/custom-env/readme-env suites for non-core envs
davidfirst Jul 13, 2026
a73d92c
test(e2e): expect custom env in old-envs install warning
davidfirst Jul 14, 2026
cf7a05f
fix(deps): use embedded legacy core env policies when env is not loaded
davidfirst Jul 14, 2026
020955b
Merge branch 'master' into remove-core-envs-from-manifest
davidfirst Jul 14, 2026
685c5df
test(e2e): fail aspect-loading fixture explicitly now that created as…
davidfirst Jul 14, 2026
f964bd9
Merge branch 'remove-core-envs-from-manifest' of https://github.com/t…
davidfirst Jul 14, 2026
1821cdf
test(e2e): use minimal envs in capsule suites to avoid yarn OOM
davidfirst Jul 14, 2026
c11b0f6
test(e2e): fail validate lint checks via error-severity oxlint env
davidfirst Jul 14, 2026
2aedf12
fix(envs): normalize version in isCoreEnv, semver-order env slot matc…
davidfirst Jul 15, 2026
dd51219
ci(e2e): rebalance test split from branch timings, add --branch to ti…
davidfirst Jul 15, 2026
722282a
ci(e2e): pre-warm package-manager cache with legacy core env chains
davidfirst Jul 15, 2026
6171233
ci(e2e): add the legacy env packages print script used by the warm-ca…
davidfirst Jul 15, 2026
a2dfa9f
ci(e2e): point warm cache at pnpm's real store/cache dirs, refresh ti…
davidfirst Jul 15, 2026
a4b3984
test(e2e): use minimal env fixture in custom-env suite to avoid full …
davidfirst Jul 15, 2026
c40a523
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 15, 2026
097d502
refactor: simplify legacy core envs handling
davidfirst Jul 15, 2026
1151fae
Merge origin/master into remove-core-envs-from-manifest
davidfirst Jul 15, 2026
e38504a
ci: remove pnpm warm-cache (measured no benefit) and restore default …
davidfirst Jul 15, 2026
2eb5a94
test(e2e): use minimal env fixture in custom-env-operations to cut su…
davidfirst Jul 15, 2026
22ecb2e
docs: revert accidental prettier reformat and entry reorder
davidfirst Jul 15, 2026
14f994f
test(e2e): recognize env.jsonc components as envs pre-load; zero-dep …
davidfirst Jul 15, 2026
9b5f9dc
test(e2e): replace unneeded legacy env installs with simple/bitdev envs
davidfirst Jul 15, 2026
75eb25c
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 15, 2026
16a4fac
Merge branch 'master' into remove-core-envs-from-manifest
davidfirst Jul 15, 2026
c9efaf5
test(e2e): use bitdev node env in create.e2e variant-env test
davidfirst Jul 15, 2026
efb12ff
Merge remote-tracking branch 'origin/remove-core-envs-from-manifest' …
davidfirst Jul 15, 2026
8d11416
fix(install): don't fail install when a not-yet-compiled env fails to…
davidfirst Jul 16, 2026
a2f16c7
fix(yarn): fix workspace ident of versioned .bit_roots dirs
davidfirst Jul 16, 2026
faa7d47
fix: keep source main for empty-env components, tighten types
davidfirst Jul 16, 2026
32b0e6f
ci(e2e): restore no-output timeout, regenerate cli skill file
davidfirst Jul 16, 2026
1a2cbb4
refactor(envs): recognize unloaded envs by their .bit-env plugin file…
davidfirst Jul 16, 2026
de03b0f
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 16, 2026
2c04053
chore: regenerate cli reference after master merge
davidfirst Jul 16, 2026
dac4f7a
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 16, 2026
4f672dd
test(e2e): add setTsEnv zero-install compiling env and convert suites…
davidfirst Jul 16, 2026
3281192
chore: retrigger ci (checkout infra failure)
davidfirst Jul 16, 2026
5422e3c
test(e2e): use a plain-js plugin file in the env-recognition test (de…
davidfirst Jul 17, 2026
b46d725
chore(e2e): refresh e2e timings manifest from this branch's runs
davidfirst Jul 17, 2026
9c25b12
test(e2e): split five slowest e2e files so parallel nodes can balance…
davidfirst Jul 17, 2026
e45aa83
chore(e2e): recalibrate e2e timings from the split-files run
davidfirst Jul 17, 2026
4650fc5
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 17, 2026
fce89b4
fix(linker): point main at dist when empty-env is only a fallback for…
davidfirst Jul 17, 2026
1596dca
chore: regenerate pnpm-lock with bit after master merge
davidfirst Jul 17, 2026
34e4544
fix(e2e): use install-free envs in yarn peer-hoisting test to avoid C…
davidfirst Jul 17, 2026
5b7b9cb
test(e2e): verify former-core-env components stay versionless and unm…
davidfirst Jul 17, 2026
4caa63f
fix(envs): return configured env id from calculateEnvId when no aspec…
davidfirst Jul 17, 2026
11930cb
fix(preview): guard legacy core envs in doesScaling and isSupportSkip…
davidfirst Jul 17, 2026
bae1ea4
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 17, 2026
797ec4d
fix(envs): revert calculateEnvId configured-env fallback that regress…
davidfirst Jul 17, 2026
44a19e6
ci(e2e): lower no_output_timeout back to 10m
davidfirst Jul 17, 2026
6588503
docs(compiler): note environment param is a pass-through, not an env …
davidfirst Jul 17, 2026
ce1476f
ci(e2e): raise no_output_timeout to 40m for slow former-core env inst…
davidfirst Jul 20, 2026
c4c2d5e
perf(workspace): resolve installed legacy-core env closure from node_…
davidfirst Jul 21, 2026
8d4017b
ci(e2e): remove no_output_timeout override now that env installs don'…
davidfirst Jul 21, 2026
66cee11
Revert "ci(e2e): remove no_output_timeout override now that env insta…
davidfirst Jul 21, 2026
f092bd3
Revert "perf(workspace): resolve installed legacy-core env closure fr…
davidfirst Jul 21, 2026
df7a823
experiment: remove former-core envs (node/react/aspect/env/mdx/readme…
davidfirst Jul 21, 2026
a457f94
chore(types): decouple root type-check from env-source ambient module…
davidfirst Jul 22, 2026
833fca6
fix(dependency-resolver): resolve source-removed legacy core envs fro…
davidfirst Jul 22, 2026
4ae5289
chore(diag): temporary legacy-core-env resolution logging + custom-re…
davidfirst Jul 22, 2026
94a9d3c
chore(diag): trace env load pipeline (requireables + batch harmony.lo…
davidfirst Jul 22, 2026
a58aa2d
fix(aspect-loader): don't drop requested env on resolution collisions…
davidfirst Jul 22, 2026
af7f30b
fix(workspace): skip dep detection in node-env fixtures; match abs-pa…
davidfirst Jul 22, 2026
2cef557
fix(preview): load ESM-only mdx options with a native import in pre-b…
davidfirst Jul 22, 2026
d10ffc7
fix(dependency-resolver): baseline md/mdx import detection when the m…
davidfirst Jul 22, 2026
bee89d1
fix(dependency-resolver): skip code fences, inline code and comments …
davidfirst Jul 22, 2026
354eea7
fix(bit): recover require() of ESM files when a test hook hijacked th…
davidfirst Jul 22, 2026
ee4be74
chore: remove temporary env-load diagnostics
davidfirst Jul 22, 2026
664af60
Merge remote-tracking branch 'origin/master' into experiment/remove-e…
davidfirst Jul 22, 2026
ce9fc61
chore: reconcile lockfile after master merge (env sources removed)
davidfirst Jul 22, 2026
7934cf4
fix(envs): bump node-babel-mocha env to 1.0.3, revert hook-require es…
davidfirst Jul 22, 2026
d8c3d33
fix(builder): restore require extension hooks after each build task
davidfirst Jul 22, 2026
b501f6f
ci(e2e): restore branch-measured e2e timings lost in master merge
davidfirst Jul 22, 2026
8bcda45
Merge remote-tracking branch 'origin/master' into experiment/remove-e…
davidfirst Jul 23, 2026
32ed2dd
ci(e2e): lower e2e no_output_timeout from 40m to 20m
davidfirst Jul 23, 2026
01ae9d8
feat(deps): remove @teambit/legacy installation and linking
davidfirst Jul 23, 2026
cfea063
refactor(envs): remove dead versionless fallback in getEnv, supersede…
davidfirst Jul 23, 2026
3422fdf
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 23, 2026
86ede67
test(e2e): use setTsEnv in the chokidar-fallback watch suite (node en…
davidfirst Jul 23, 2026
4c11e29
fix(install): fail install on genuine env plugin errors, tolerate onl…
davidfirst Jul 24, 2026
50d29a5
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 24, 2026
3ebce3b
fix(install): tolerate esm/cjs-mismatch loader errors during env reload
davidfirst Jul 24, 2026
3d8f969
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 24, 2026
9b931b8
fix(workspace): use DEFAULT_DIST_DIRNAME in getDistMain, log pruned c…
davidfirst Jul 24, 2026
71fe0d4
docs(envs): clarify why versionless slot matching applies to all envs…
davidfirst Jul 24, 2026
841136a
fix(envs): gate versionless slot match to legacy core env ids only
davidfirst Jul 24, 2026
680c1e8
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 24, 2026
a846713
fix(ci): keep the env version when restoring lane config changes in c…
davidfirst Jul 24, 2026
e9adba6
chore: drop redundant node-babel-mocha env configs from .bitmap
davidfirst Jul 24, 2026
b0175b9
ci: rerun e2e (deps-graph-reimport OOM flake)
davidfirst Jul 25, 2026
e9924d4
ci: rerun e2e (remote aborted fetch flake in root-components)
davidfirst Jul 25, 2026
62982e5
chore: fix component-descriptor version and align empty-env env versi…
davidfirst Jul 28, 2026
994599c
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 28, 2026
8541cd2
docs: clarify empty-env description
davidfirst Jul 28, 2026
35b91bf
chore: restore lint-error-env fixture replaced by a symlink during in…
davidfirst Jul 28, 2026
86d1aed
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 30, 2026
886f6a2
Merge remote-tracking branch 'origin/master' into remove-core-envs-fr…
davidfirst Jul 31, 2026
53f7c45
chore: reconcile pnpm-lock after master merge
davidfirst Jul 31, 2026
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
44 changes: 1 addition & 43 deletions .bitmap
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@
"teambit.node/envs/node-babel-mocha@2.0.3": {}
}
},
"aspect": {
"name": "aspect",
"scope": "teambit.harmony",
"version": "1.0.1087",
"mainFile": "index.ts",
"rootDir": "scopes/harmony/aspect"
},
"aspect-docs/babel": {
"name": "aspect-docs/babel",
"scope": "teambit.compilation",
Expand Down Expand Up @@ -726,13 +719,6 @@
"teambit.node/envs/node-babel-mocha@2.0.3": {}
}
},
"env": {
"name": "env",
"scope": "teambit.envs",
"version": "1.0.1087",
"mainFile": "index.ts",
"rootDir": "scopes/envs/env"
},
"envs": {
"name": "envs",
"scope": "teambit.envs",
Expand Down Expand Up @@ -1101,13 +1087,6 @@
"teambit.node/envs/node-babel-mocha@2.0.3": {}
}
},
"mdx": {
"name": "mdx",
"scope": "teambit.mdx",
"version": "1.0.1088",
"mainFile": "index.ts",
"rootDir": "scopes/mdx/mdx"
},
"merge-lanes": {
"name": "merge-lanes",
"scope": "teambit.lanes",
Expand Down Expand Up @@ -1541,13 +1520,6 @@
"mainFile": "index.ts",
"rootDir": "scopes/component/new-component-helper"
},
"node": {
"name": "node",
"scope": "teambit.harmony",
"version": "1.0.1087",
"mainFile": "index.ts",
"rootDir": "scopes/harmony/node"
},
"notifications": {
"name": "notifications",
"scope": "teambit.ui-foundation",
Expand Down Expand Up @@ -1680,27 +1652,13 @@
"mainFile": "index.ts",
"rootDir": "scopes/harmony/pubsub"
},
"react": {
"name": "react",
"scope": "teambit.react",
"version": "1.0.1087",
"mainFile": "index.ts",
"rootDir": "scopes/react/react"
},
"react-router": {
"name": "react-router",
"scope": "teambit.ui-foundation",
"version": "1.0.1087",
"mainFile": "index.ts",
"rootDir": "scopes/ui-foundation/react-router/react-router"
},
"readme": {
"name": "readme",
"scope": "teambit.mdx",
"version": "1.0.1088",
"mainFile": "index.ts",
"rootDir": "scopes/mdx/readme"
},
"refactoring": {
"name": "refactoring",
"scope": "teambit.component",
Expand Down Expand Up @@ -2589,4 +2547,4 @@
"rootDir": "scopes/dependencies/yarn"
},
"$schema-version": "17.0.0"
}
}
227 changes: 222 additions & 5 deletions components/legacy/e2e-helper/e2e-env-helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as path from 'path';
import fs from 'fs-extra';
import { getRootComponentDir } from '@teambit/workspace.root-components';
import type CommandHelper from './e2e-command-helper';
import type ExtensionsHelper from './e2e-extensions-helper';
Expand All @@ -14,6 +15,52 @@ type SetCustomEnvOpts = {
skipLink?: boolean;
};

/**
* env packages that the old-format env fixtures import. these envs used to be core aspects, so
* their packages were always available. now they need to be installed. the versions should match
* the pinned versions in legacy-core-envs.ts (scopes/envs/envs).
*/
const FIXTURE_ENV_BASE_PACKAGES: Record<string, string> = {
'@teambit/node': '@teambit/node@1.0.1042',
'@teambit/react': '@teambit/react@1.0.1042',
'@teambit/mdx': '@teambit/mdx@1.0.1043',
// not env bases - the tiny runtime deps of the minimal fixture envs (node-env-1/node-env-2),
// listed here so setCustomEnv installs them and the fixtures load without MissingPackages
'lodash.get': 'lodash.get@4.4.2',
'lodash.flatten': 'lodash.flatten@4.4.0',
};

/**
* the env configured on the old-format env fixtures (see setCustomEnv). it used to be a core
* aspect, now its package must be installed for the fixture env to be compiled and loaded.
*/
const ENVS_ENV_PACKAGE = '@teambit/env@1.0.1042';

/**
* peers required by the published legacy env packages (via @teambit/cloud UI hooks and
* graphql-request) that yarn's hoisted linker doesn't auto-install (pnpm auto-installs peers).
* without them the env fails to load under yarn with "Cannot find module '@apollo/client'" (or
* 'graphql').
*/
export const NODE_ENV_HOISTED_PEERS = '@apollo/client@3.14.1 graphql@14.7.0';

/**
* a modern env.jsonc-based node env, pinned so upstream releases don't change test behavior.
* see setBitdevNodeEnv.
*/
const BITDEV_NODE_ENV = 'bitdev.node/node-env';
const BITDEV_NODE_ENV_VERSION = '6.0.16';
const BITDEV_NODE_ENV_PACKAGE = `@bitdev/node.node-env@${BITDEV_NODE_ENV_VERSION}`;
export const BITDEV_NODE_ENV_ID = `${BITDEV_NODE_ENV}@${BITDEV_NODE_ENV_VERSION}`;

/**
* the env configured on old-format aspect-style env fixtures (see setBabelWithTsHarmony). it used
* to be a core aspect, now its package must be installed for the fixture env to be loaded.
* the node env is a runtime dependency of the aspect env and must be installed at the root as
* well for the aspect env to load.
*/
const ASPECT_ENV_PACKAGES = ['@teambit/aspect@1.0.1042', '@teambit/node@1.0.1042'];

export const ENV_POLICY = {
peers: [
{
Expand Down Expand Up @@ -139,11 +186,115 @@ export default class EnvHelper {
},
},
});
this.command.install();
this.command.install([...ASPECT_ENV_PACKAGES, ...this.getFixtureEnvBasePackages(EXTENSIONS_BASE_FOLDER)].join(' '));
this.command.compile();
return EXTENSIONS_BASE_FOLDER;
}

/**
* create a minimal env component with zero dependencies - like the core empty-env, just under
* a different name. the env plugin file is plain .js, so it needs no compilation (the env
* component itself stays on the default env) and no package installation at all.
* use it for suites that just need "an env" (or two envs, to switch between) and don't
* exercise any actual env functionality (compiler/tester/etc).
*/
setSimpleEnv(name = 'simple-env'): string {
this.fs.outputFile(
`${name}/${name}.bit-env.js`,
`class SimpleEnv {
name = '${name}';
}
module.exports.default = new SimpleEnv();
`
);
// the env manifest is what marks the component as an env before it was ever loaded
this.fs.outputFile(`${name}/env.jsonc`, `{}`);
this.fs.outputFile(`${name}/index.js`, `module.exports = require('./${name}.bit-env');\n`);
this.command.addComponent(name);
this.command.link();
return name;
}

/**
* create a minimal env component that provides only a typescript compiler (workspace compile
* and build pipeline), taken from the core teambit.typescript/typescript aspect at runtime -
* so like setSimpleEnv, it needs NO package installation and no compilation of the env itself
* (the plugin file is plain .js). by default it is configured on all components via variants
* (like setBitdevNodeEnv), pass variantPattern=undefined to only create the env component.
* use it for suites that need components to actually compile (dists) but don't exercise any
* other env functionality (tester/linter/etc). it is much faster than installing an env like
* the legacy teambit.harmony/node chain or even the modern node env.
*/
setTsEnv(variantPattern: string | undefined = '*', name = 'ts-env'): string {
this.fs.outputFile(
`${name}/${name}.bit-env.js`,
`class TsEnv {
name = '${name}';
createTsCompiler(context) {
// the env context exposes core aspects. the typescript aspect is a core aspect, so no
// installation is needed.
const typescript = context.getAspect('teambit.typescript/typescript');
return typescript.createCjsCompiler({
tsconfig: {
compilerOptions: {
lib: ['es2019'],
target: 'es2019',
module: 'commonjs',
declaration: true,
sourceMap: true,
allowJs: true,
},
},
types: [],
// compile all capsules in one ts program instead of project-references. it is faster, and
// more importantly, project-references require every dependency capsule to have a
// tsconfig.json, which the capsule of this env itself (compiler-less, on the default env)
// does not have.
singleProgramCompilation: true,
});
}
compiler() {
return (context) => this.createTsCompiler(context);
}
package() {
// the pkg service only duck-types the PackageGenerator class. without it, the package.json
// main of the components points to the source file instead of the dist
return () => ({
packageJsonProps: { main: 'dist/{main}.js', types: '{main}.ts' },
npmIgnore: [],
});
}
build() {
// the builder service only duck-types the Pipeline class (an object with compute() returning
// the build tasks), so there is no need to import @teambit/builder for Pipeline.from()
return {
compute: (context) => {
const compilerAspect = context.getAspect('teambit.compilation/compiler');
return [compilerAspect.createTask('TSCompiler', this.createTsCompiler(context))];
},
};
}
}
module.exports.default = new TsEnv();
`
);
// the env manifest marks the component as an env before it was ever loaded
this.fs.outputFile(`${name}/env.jsonc`, `{}`);
this.fs.outputFile(`${name}/index.js`, `module.exports = require('./${name}.bit-env');\n`);
this.command.addComponent(name);
if (variantPattern) {
// the env component gets the workspace default-scope, which is not necessarily the remote
// scope (e.g. when the workspace was set up with addRemoteScopeAsDefaultScope: false)
const envId = `${this.extensions.workspaceJsonc.getDefaultScope()}/${name}`;
this.extensions.addExtensionToVariant(variantPattern, envId, {});
this.extensions.addExtensionToVariant(variantPattern, 'teambit.envs/envs', { env: envId });
// the env component itself must not get the variant config (an env can't be its own env)
this.extensions.workspaceJsonc.addToVariant(name, 'propagate', false);
}
this.command.link();
return name;
}

setEmptyEnv() {
this.fs.outputFile(
'empty-env/empty-env.bit-env.ts',
Expand All @@ -154,18 +305,79 @@ export default new EmptyEnv();
this.fs.outputFile('empty-env/index.ts', `export { EmptyEnv } from './empty-env.bit-env';`);
this.command.addComponent('empty-env');
this.command.setEnv('empty-env', 'teambit.envs/env');
// teambit.envs/env is no longer a core aspect - install it so the .bit-env plugin compiles
this.command.install(ENVS_ENV_PACKAGE);
}

/**
* set the legacy `teambit.harmony/node` env on the given variant and install its package.
* this env used to be a core aspect so no installation was needed, now it must be installed
* (with the version pinned in legacy-core-envs.ts, see FIXTURE_ENV_BASE_PACKAGES).
* `extraPackages` is for peers the env package needs but the package manager doesn't
* auto-install (see NODE_ENV_HOISTED_PEERS for yarn).
*/
setNodeEnv(variantPattern = '*', extraPackages = '') {
this.extensions.addExtensionToVariant(variantPattern, 'teambit.harmony/node', {});
this.command.install(`${FIXTURE_ENV_BASE_PACKAGES['@teambit/node']} ${extraPackages}`.trim());
// the env is loaded only at the end of the first install. run a second install so its
// dependency policies (e.g. @types/jest as a dev dep) are applied to the components - the
// standard flow for old-style envs (see the "run bit install again" suggestion).
this.command.install();
}

/**
* install the packages of the legacy `teambit.harmony/aspect` env (and its node env runtime
* dependency). needed after configuring the aspect env on a component the old way (versionless).
*/
installAspectEnv() {
this.command.install(ASPECT_ENV_PACKAGES.join(' '));
}

/**
* set the modern `bitdev.node/node-env` env (env.jsonc based) on the given variant and install
* its package. much lighter and faster to install than the legacy `teambit.harmony/node` chain
* (a single install, no scope-aspect capsules) - prefer it for suites that just need an env
* with a typescript compiler and don't test the legacy-env surface itself.
* caveats: its build pipeline (tag/snap with --build) compiles with moduleResolution nodenext,
* so relative imports in fixture files must include the `.js` extension; its tester is vitest
* (not jest) and its linter is oxlint (not eslint).
*/
setBitdevNodeEnv(variantPattern = '*') {
this.extensions.addExtensionToVariant(variantPattern, `${BITDEV_NODE_ENV}@${BITDEV_NODE_ENV_VERSION}`, {});
this.extensions.addExtensionToVariant(variantPattern, 'teambit.envs/envs', {
env: BITDEV_NODE_ENV,
});
this.command.install(BITDEV_NODE_ENV_PACKAGE);
}

setCustomEnv(extensionsBaseFolder = 'node-env', options: SetCustomEnvOpts = {}): string {
this.fixtures.copyFixtureExtensions(extensionsBaseFolder);
this.command.addComponent(extensionsBaseFolder);
this.extensions.addExtensionToVariant(extensionsBaseFolder, 'teambit.envs/env');
if (!options.skipLink) this.command.link();
if (!options.skipInstall) this.command.install();
if (!options.skipInstall) {
this.command.install([ENVS_ENV_PACKAGE, ...this.getFixtureEnvBasePackages(extensionsBaseFolder)].join(' '));
}
if (!options.skipCompile) this.command.compile();
return extensionsBaseFolder;
}

/**
* find which env packages the given fixture imports, so they can be installed (see
* FIXTURE_ENV_BASE_PACKAGES).
*/
getFixtureEnvBasePackages(extensionsBaseFolder: string): string[] {
const extensionDir = path.join(this.scopes.localPath, extensionsBaseFolder);
const allContent = fs
.readdirSync(extensionDir)
.filter((file) => file.endsWith('.ts'))
.map((file) => fs.readFileSync(path.join(extensionDir, file)).toString())
.join('\n');
return Object.keys(FIXTURE_ENV_BASE_PACKAGES)
.filter((pkg) => allContent.includes(`'${pkg}'`) || allContent.includes(`"${pkg}"`))
.map((pkg) => FIXTURE_ENV_BASE_PACKAGES[pkg]);
}
Comment thread
davidfirst marked this conversation as resolved.

/**
* This will generate env in the new format (using the *.bit-env.* plugin)
* @param extensionsBaseFolder
Expand All @@ -177,7 +389,12 @@ export default new EmptyEnv();
envJsoncOptions: GenerateEnvJsoncOptions = { policy: ENV_POLICY },
runInstall = true,
targetFolder?: string,
id?: string
id?: string,
// the env of the generated env itself. defaults to the legacy teambit.envs/env. pass the
// real-world envs-of-envs (e.g. `bitdev.general/envs/bit-env@x.y.z`, what `bit create
// react-env` produces) to exercise the regular-external-env loading path - remember to
// include its package in basePackages so it gets installed.
envsEnv = 'teambit.envs/env'
): string {
const addOptions = id ? { i: id } : {};
// Pin the base react-env to a React 18 version, but only for envs that actually pull in react-env.
Expand All @@ -203,8 +420,8 @@ export default new EmptyEnv();
this.fixtures.copyFixtureExtensions(extensionsBaseFolder, undefined, targetFolder);
this.command.addComponent(targetFolder || extensionsBaseFolder, addOptions);
this.fixtures.generateEnvJsoncFile(targetFolder || extensionsBaseFolder, envJsoncOptions);
this.extensions.addExtensionToVariant(targetFolder || extensionsBaseFolder, 'teambit.envs/env');
this.command.setEnv(id || extensionsBaseFolder, 'teambit.envs/env');
this.extensions.addExtensionToVariant(targetFolder || extensionsBaseFolder, envsEnv);
this.command.setEnv(id || extensionsBaseFolder, envsEnv);
this.command.link();
if (runInstall) {
this.command.install(basePackages.join(' '));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// @ts-nocheck

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. @ts-nocheck disables fixture checking 📘 Rule violation ⚙ Maintainability

The added @ts-nocheck directive suppresses strict TypeScript checking for the entire fixture
instead of resolving the incompatible types. Similar suppressions were added across several modified
environment fixtures, allowing future type errors to pass unnoticed.
Agent Prompt
## Issue description
The PR adds `@ts-nocheck` to environment fixtures, disabling TypeScript checking for each entire file and weakening strict compilation guarantees.

## Issue Context
The comments identify nominal incompatibilities between repository-source and published-package types. Address those incompatibilities with narrowly typed adapters or localized casts rather than suppressing all checking.

## Fix Focus Areas
- components/legacy/e2e-helper/excluded-fixtures/extensions/babel-env/babel-env.extension.ts[1-4]
- components/legacy/e2e-helper/excluded-fixtures/extensions/custom-react-env/custom-react-env.main.runtime.ts[1-4]
- components/legacy/e2e-helper/excluded-fixtures/extensions/multiple-compilers-env/multiple-compilers-env.extension.ts[1-4]
- components/legacy/e2e-helper/excluded-fixtures/extensions/node-env/node-env.extension.ts[1-5]

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

// the e2e runs inside the bit repo, where core-aspect types (e.g. @teambit/compiler) resolve
// to the repo sources while the env tree in the capsule brings the published @teambit/builder.
// the two BuildContext types are structurally identical but nominally different - skip checking.
import { EnvsMain, EnvsAspect } from '@teambit/envs';
import { ReactAspect, ReactMain } from '@teambit/react';
import { BabelAspect, BabelMain } from '@teambit/babel';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// @ts-nocheck
// the e2e runs inside the bit repo, where core-aspect types (e.g. @teambit/react) resolve to the
// repo sources while the env tree in the capsule brings the published packages. the types are
// structurally identical but nominally different - skip checking.
import { MainRuntime } from '@teambit/cli';
import { ReactAspect, ReactMain } from '@teambit/react';
import { EnvsAspect, EnvsMain } from '@teambit/envs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @bit-no-check
// @ts-nocheck
// the e2e runs inside the bit repo, where core-aspect types (e.g. @teambit/envs) resolve to the
// repo sources while the env tree in the capsule brings the published packages. the types are
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @bit-no-check
// @ts-nocheck
// the e2e runs inside the bit repo, where core-aspect types (e.g. @teambit/envs) resolve to the
// repo sources while the env tree in the capsule brings the published packages. the types are
Expand Down
Loading