You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ts-monorepo@ test /Users/dean/workspace/personal/testMonorepo
lerna run test
lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 4 packages: "pnpm run test"
lerna info run Ran npm script 'test' in '@nighttrax/ts-node' in 1.5s:
@nighttrax/ts-node@1.0.0 test /Users/dean/workspace/personal/testMonorepo/examples/ts-node
pnpm run start
42
lerna info run Ran npm script 'test' in '@nighttrax/jest-babel-example' in 2.9s:
@nighttrax/jest-babel-example@1.0.0 test /Users/dean/workspace/personal/testMonorepo/examples/jest-babel
jest
lerna info run Ran npm script 'test' in '@nighttrax/cra-example' in 3.2s:
@nighttrax/cra-example@1.0.0 test /Users/dean/workspace/personal/testMonorepo/examples/cra
cross-env SKIP_PREFLIGHT_CHECK=true craco test --watchAll=false
lerna ERR! pnpm run test exited 1 in '@nighttrax/jest-example'
lerna ERR! pnpm run test stdout:
@nighttrax/jest-example@1.0.0 test /Users/dean/workspace/personal/testMonorepo/examples/jest-tsjest
jest
ERROR Test failed. See above for more details.
lerna ERR! pnpm run test stderr:
ts-jest[main] (WARN) Replace any occurrences of "ts-jest/utils" with just "ts-jest".
FAIL test/index.spec.ts
● Test suite failed to run
TypeError: Jest: a transform must export a `process` function.
at ScriptTransformer._getTransformer (../../../node_modules/@jest/transform/build/ScriptTransformer.js:360:13)
at ScriptTransformer.transformSource (../../../node_modules/@jest/transform/build/ScriptTransformer.js:427:28)
at ScriptTransformer._transformAndBuildScript (../../../node_modules/@jest/transform/build/ScriptTransformer.js:569:40)
at ScriptTransformer.transform (../../../node_modules/@jest/transform/build/ScriptTransformer.js:607:25)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.693 s
Ran all test suites.
lerna ERR! pnpm run test exited 1 in '@nighttrax/jest-example'
ERROR Test failed. See above for more details.
The text was updated successfully, but these errors were encountered:
Ok, well, after spending quite some time, it looks like it was caused by ~{versions} in package.json. I don't suppose you could fix the versions so bugs do not magically appear. I realize the idea behind ~{version} is to accept bug fixes/patches but unfortunately the easiest 'bug fixes' break other things like in this case costing others a ton of time. Java gave that same strategy a try years ago in 2010-2012 (ivy started it) and it became a nightmare as patches/bug fixes always ended up breaking other 'things' so better to lock the versions and test upgrades instead as part of a PR request instead. In this way, you can reproduce any bug in your version control system. Otherwise, you have no way to reproduce my bug as things get fixed :( .
I can't reproduce this in the latest master, nor in your fork.
Dependencies are locked through pnpm-lock.yaml, so you'll always get consistent dependency trees. The ~ versions in package.json only come into play when the lock file is missing, or when installing a new dependency.
very slick - this may get me using pnpm. Trying it out right now but ran into weird issue where test failure has nothing to do with the test below ->
I click use as template to my github repo to test this all out https://github.com/deanhiller/testMonorepo and I then git clone my repo and run
The last command failed with this
dean@Deans-MBP testMonorepo % pnpm run test
lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 4 packages: "pnpm run test"
lerna info run Ran npm script 'test' in '@nighttrax/ts-node' in 1.5s:
42
lerna info run Ran npm script 'test' in '@nighttrax/jest-babel-example' in 2.9s:
lerna info run Ran npm script 'test' in '@nighttrax/cra-example' in 3.2s:
lerna ERR! pnpm run test exited 1 in '@nighttrax/jest-example'
lerna ERR! pnpm run test stdout:
ERROR Test failed. See above for more details.
lerna ERR! pnpm run test stderr:
ts-jest[main] (WARN) Replace any occurrences of "ts-jest/utils" with just "ts-jest".
FAIL test/index.spec.ts
● Test suite failed to run
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.693 s
Ran all test suites.
lerna ERR! pnpm run test exited 1 in '@nighttrax/jest-example'
ERROR Test failed. See above for more details.
The text was updated successfully, but these errors were encountered: