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

Prepare running twice #1036

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Prepare running twice #1036

merged 1 commit into from
Dec 7, 2023

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] > ember-file-upload@8.4.0 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] > ember-file-upload@8.4.0 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] > ember-file-upload@8.4.0 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.

None yet

1 participant