Skip to content

Conversation

@gilest
Copy link
Collaborator

@gilest gilest commented Dec 7, 2023

Since #1031 running local commands like pnpm install causes the addon build to run twice.

This is because we added a workspace-level prepare script while leaving the package-level prepare script in place.

This PR removes the workspace-level prepare script to restore a single build being run.

Example:

➜  ember-file-upload git:(master) p i
ember-file-upload prepare$ pnpm build
[7 lines collapsed]
│ [js] > [email protected] build:js
│ [js] > rollup --config
│ [js]
│ [js]
│ [js]  → dist...
│ [js] (!) Generated an empty chunk
│ [js] "template-registry"
│ [js] created dist in 715ms
│ [js] npm run build:js exited with code 0
│ [types] npm run build:types exited with code 0
└─ Done in 4s
. prepare$ pnpm -F ember-file-upload prepare
[9 lines collapsed]
│ [js] > [email protected] build:js
│ [js] > rollup --config
│ [js]
│ [js]
│ [js]  → dist...
│ [js] (!) Generated an empty chunk
│ [js] "template-registry"
│ [js] created dist in 716ms
│ [js] npm run build:js exited with code 0
│ [types] npm run build:types exited with code 0
└─ Done in 4s
Done in 7.2s

With this change it will run only once again:

➜  ember-file-upload git:(master) ✗ p i
. prepare$ pnpm -F ember-file-upload build
[7 lines collapsed]
│ [types] > [email protected] build:types
│ [types] > glint --declaration
│ [types]
│ [js]
│ [js]  → dist...
│ [js] (!) Generated an empty chunk
│ [js] "template-registry"
│ [js] created dist in 596ms
│ [js] npm run build:js exited with code 0
│ [types] npm run build:types exited with code 0
└─ Done in 2.7s
Done in 3.6s

@gilest gilest added the internal label Dec 7, 2023
@gilest gilest force-pushed the fix/prepare branch 3 times, most recently from 06edfa6 to fe81432 Compare December 7, 2023 22:20
@gilest gilest changed the title Run prepare only once Prepare running twice Dec 7, 2023
@gilest gilest merged commit a5b98e6 into master Dec 7, 2023
@gilest gilest deleted the fix/prepare branch December 7, 2023 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants