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

@nx/esbuild:esbuild with thirdParty: false regression from 18.3.4 to 19.0.x with pnpm #23256

Closed
1 of 4 tasks
atsjo opened this issue May 8, 2024 · 5 comments · Fixed by #22906
Closed
1 of 4 tasks
Assignees
Labels
scope: bundlers Issues related to webpack, rollup type: bug

Comments

@atsjo
Copy link

atsjo commented May 8, 2024

Current Behavior

@nx/esbuild:esbuild with thirdParty: false and generatePackageJson: true removes to much while filtering pnpm-lock.yaml, so pnpm install fails when using the lock file.
pnpm-lock.nx-19.0.1.txt

Expected Behavior

pnpm install works with filtered lock file, as for 18.3.4
pnpm-lock.nx-18.3.4.txt

GitHub Repo

No response

Steps to Reproduce

  1. use esbuild to bundle with thirdParty: false and generatePackageJson: true with nx 18.3.4
  2. use esbuild to bundle with thirdParty: false and generatePackageJson: true with nx 19.0.1
  3. observe difference in generated pnpm-lock.yaml

Nx Report

Node   : 20.12.2
OS     : win32-x64
pnpm   : 8.15.8

nx                 : 19.0.1
@nx/js             : 19.0.1
@nx/jest           : 19.0.1
@nx/linter         : 19.0.1
@nx/eslint         : 19.0.1
@nx/workspace      : 19.0.1
@nx/angular        : 19.0.1
@nx/devkit         : 19.0.1
@nx/esbuild        : 19.0.1
@nx/eslint-plugin  : 19.0.1
@nrwl/tao          : 19.0.1
@nx/web            : 19.0.1
@nx/webpack        : 19.0.1
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/jest/plugin
---------------------------------------
Community plugins:
angular-calendar : 0.31.1

Failure Logs

ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY  Broken lockfile: no entry for 'emoji-regex@8.0.0' in pnpm-lock.yaml

Below is items removed from working pnpm-lock.yaml for 18.3.4 attached above:

  /ansi-regex@5.0.1:
    resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
    engines: {node: '>=8'}
    dev: false

  /ansi-styles@4.3.0:
    resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
    engines: {node: '>=8'}
    dependencies:
      color-convert: 2.0.1
    dev: false

  /color-convert@2.0.1:
    resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
    engines: {node: '>=7.0.0'}
    dependencies:
      color-name: 1.1.4
    dev: false

  /color-name@1.1.4:
    resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
    dev: false

  /emoji-regex@8.0.0:
    resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
    dev: false

  /is-fullwidth-code-point@3.0.0:
    resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
    engines: {node: '>=8'}
    dev: false

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@atsjo atsjo added the type: bug label May 8, 2024
@FrozenPandaz FrozenPandaz added the scope: bundlers Issues related to webpack, rollup label May 9, 2024
@atsjo atsjo changed the title @nx/esbuild:esbuild with thirdParty: false regression from 18.3.4 to 19.0.1 @nx/esbuild:esbuild with thirdParty: false regression from 18.3.4 to 19.0.x May 10, 2024
@atsjo
Copy link
Author

atsjo commented May 10, 2024

Same for 19.0.2

@atsjo atsjo changed the title @nx/esbuild:esbuild with thirdParty: false regression from 18.3.4 to 19.0.x @nx/esbuild:esbuild with thirdParty: false regression from 18.3.4 to 19.0.x with pnpm May 13, 2024
@atsjo
Copy link
Author

atsjo commented May 13, 2024

I have tracked down when this regression was introduced, and it was from 19.0.0-beta.6 to beta.7 with commit #23017. So this only affects pnpm, and was included in a performance pr originating from @JamesHenry. My workaround is to downgrade the nx package to 18.3.4 or 19.0.0-beta.6, or else I cant deploy my firebase functions, since pnpm install fails during deploy...

@wewelll
Copy link

wewelll commented May 14, 2024

same issue here

@meeroslav
Copy link
Contributor

Thank you @atsjo, for reporting this issue.

Can you please create a minimal repo or at least paste here the contents of the root pnpm-lock.yaml. We can use this then to see what is being filtered out.

This issue might be fixed with #22906

@atsjo
Copy link
Author

atsjo commented May 17, 2024

here are the root lock-file and the filtered package.json and lock-file:
filtered-package.json.txt
filtered-pnpm-lock.yaml.txt
root-pnpm-lock.yaml.txt

FrozenPandaz pushed a commit that referenced this issue May 27, 2024
- [X] Fix parenthesis separator detection
- [x] Fix leading dash detection
- [x] Migrate existing pnpm normalizer to latest code
- [X] Add unit tests for v9
- [X] Dogfooding Pnpm v9 to Nx repo and agents

Fixes regression with alias packages introduced via
#23017

## Benchmarks

PNPM v9 Branch (migrated to branch's code)
```
  Time (mean ± σ):      3.526 s ±  0.081 s    [User: 0.717 s, System: 0.948 s]
  Range (min … max):    3.390 s …  3.714 s    20 runs
```
Master (running nx 19.1.0-beta.3)
```
  Time (mean ± σ):     11.160 s ±  0.112 s    [User: 0.799 s, System: 0.979 s]
  Range (min … max):   10.955 s … 11.379 s    20 runs
```

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #22850
Fixes #23256

---------

Co-authored-by: James Henry <james@henry.sc>
ndcunningham pushed a commit that referenced this issue May 28, 2024
- [X] Fix parenthesis separator detection
- [x] Fix leading dash detection
- [x] Migrate existing pnpm normalizer to latest code
- [X] Add unit tests for v9
- [X] Dogfooding Pnpm v9 to Nx repo and agents

Fixes regression with alias packages introduced via
#23017

## Benchmarks

PNPM v9 Branch (migrated to branch's code)
```
  Time (mean ± σ):      3.526 s ±  0.081 s    [User: 0.717 s, System: 0.948 s]
  Range (min … max):    3.390 s …  3.714 s    20 runs
```
Master (running nx 19.1.0-beta.3)
```
  Time (mean ± σ):     11.160 s ±  0.112 s    [User: 0.799 s, System: 0.979 s]
  Range (min … max):   10.955 s … 11.379 s    20 runs
```

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #22850
Fixes #23256

---------

Co-authored-by: James Henry <james@henry.sc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: bundlers Issues related to webpack, rollup type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants