Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: package.json of @ngrx/store/testing is incorrect #3248

Closed
ahnpnl opened this issue Nov 22, 2021 · 1 comment · Fixed by #3249
Closed

[Bug]: package.json of @ngrx/store/testing is incorrect #3248

ahnpnl opened this issue Nov 22, 2021 · 1 comment · Fixed by #3249

Comments

@ahnpnl
Copy link

ahnpnl commented Nov 22, 2021

Minimal reproduction of the bug/regression with instructions:

{
  "name": "@ngrx/store/testing",
  "typings": "ngrx-store-testing.d.ts",
  "main": "../bundles/core-testing.umd.js", // THIS IS NOT EXISTED !!!
  "module": "../fesm2015/ngrx-store-testing.mjs",
  "es2015": "../fesm2015/testing.js", // THIS IS NOT EXISTED !!!
  "esm5": "../esm5/testing/testing.js", // THIS IS NOT EXISTED !!!
  "esm2015": "../esm2015/testing/testing.js", // THIS IS NOT EXISTED !!!
  "fesm5": "../fesm5/testing.js", // THIS IS NOT EXISTED !!!
  "fesm2015": "../fesm2015/ngrx-store-testing.mjs",
  "es2020": "../fesm2020/ngrx-store-testing.mjs",
  "esm2020": "../esm2020/testing/ngrx-store-testing.mjs",
  "fesm2020": "../fesm2020/ngrx-store-testing.mjs",
  "sideEffects": false
}
  • Open e2e/partial-ivy-lib/node_modules/partial-ivy/testing/package.json. Observe that those lines are not there.

Because of those lines, it causes the issue thymikee/jest-preset-angular#1195

Expected behavior:

The content of e2e/partial-ivy-lib/node_modules/@ngrx/store/testing/package.json should be similar to e2e/partial-ivy-lib/node_modules/partial-ivy/testing/package.json, which is

{
  "name": "@ngrx/store/testing",
  "typings": "ngrx-store-testing.d.ts",
  "module": "../fesm2015/ngrx-store-testing.mjs",
  "fesm2015": "../fesm2015/ngrx-store-testing.mjs",
  "es2020": "../fesm2020/ngrx-store-testing.mjs",
  "esm2020": "../esm2020/testing/ngrx-store-testing.mjs",
  "fesm2020": "../fesm2020/ngrx-store-testing.mjs",
  "sideEffects": false
}

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):

@ngrx/store version 13.0.1

Other information:

Once correcting the content for package.json like above, Jest won't throw error about "Cannot find module" anymore

I would be willing to submit a PR to fix this issue

[ ] Yes (Assistance is provided if you need help submitting a pull request)
[x] No

@ahnpnl ahnpnl changed the title @ngrx/store: package.json of @ngrx/store/testing is incorrect with Angular 13 new package format @ngrx/store: package.json of @ngrx/store/testing is incorrect Nov 22, 2021
@ahnpnl ahnpnl changed the title @ngrx/store: package.json of @ngrx/store/testing is incorrect [Bug]: package.json of @ngrx/store/testing is incorrect Nov 22, 2021
@timdeschryver
Copy link
Member

Thanks for the detailed report @ahnpnl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants