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

build: remove the build task from postinstall #5016

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

castastrophe
Copy link
Contributor

@castastrophe castastrophe commented Jan 10, 2025

Description

This update removes the build from the postinstall task and updates documentation to ensure users are running the build after install manually. This also updates CI to ensure the build is completed during validations.

Motivation and context

Postinstall scripts make installs slower and riskier; additionally, postintall scripts do not report their output to the console out-of-the-box so any failures would happen quietly and be difficult to debug.

How has this been tested?

  • Expect the install process not to run the build. After a clean install, expect to see packages/accordion/src/Accordion.ts but not packages/accordion/src/Accordion.js.
    1. git clean -dfX
    2. yarn install
  • Expect the build to create assets when run manually. After the build, expect to see packages/accordion/src/Accordion.js.

Types of changes

  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

Sorry, something went wrong.

Copy link

changeset-bot bot commented Jan 10, 2025

⚠️ No Changeset found

Latest commit: 5b20b1a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

github-actions bot commented Jan 10, 2025

Branch preview

Review the following VRT differences

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link

github-actions bot commented Jan 10, 2025

Tachometer results

Currently, no packages are changed by this PR...

@castastrophe castastrophe force-pushed the castastrophe/build-remove-postinstall-build-task branch 2 times, most recently from 2d5df79 to c3a109f Compare January 10, 2025 21:07
@coveralls
Copy link
Collaborator

coveralls commented Jan 10, 2025

Pull Request Test Coverage Report for Build 13970585113

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 97.979%

Totals Coverage Status
Change from base Build 13968663056: -0.002%
Covered Lines: 33672
Relevant Lines: 34170

💛 - Coveralls

@castastrophe castastrophe force-pushed the castastrophe/build-remove-postinstall-build-task branch 2 times, most recently from 469bcc7 to 1390494 Compare January 15, 2025 18:43
@castastrophe castastrophe force-pushed the castastrophe/build-remove-postinstall-build-task branch 6 times, most recently from 9881a55 to 6849927 Compare February 6, 2025 21:51
@castastrophe castastrophe force-pushed the castastrophe/build-remove-postinstall-build-task branch from 75da4af to 647530c Compare March 4, 2025 22:14
@castastrophe castastrophe force-pushed the castastrophe/build-remove-postinstall-build-task branch 7 times, most recently from fd0819b to 6ad0ec1 Compare March 19, 2025 15:12
@castastrophe castastrophe added enhancement New feature or request ready-for-review and removed WIP labels Mar 19, 2025
@castastrophe castastrophe marked this pull request as ready for review March 19, 2025 15:19
@castastrophe castastrophe requested a review from a team as a code owner March 19, 2025 15:19
@castastrophe castastrophe force-pushed the castastrophe/build-remove-postinstall-build-task branch 5 times, most recently from de64457 to d1d2d61 Compare March 19, 2025 18:53
@@ -50,13 +50,14 @@
"new-package": "cd projects/templates && plop",
"postcustom-element-json": "node ./tasks/run-check-cem.js",
"postdocs:analyze": "node ./scripts/add-custom-properties.js --src=\"projects/documentation/custom-elements.json\"",
"postinstall": "husky && patch-package && yarn get-ready",
"postinstall": "husky || true && patch-package",
Copy link
Contributor Author

@castastrophe castastrophe Mar 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The husky updates here align with the documentation: https://typicode.github.io/husky/how-to.html

Yarn does not support prepare commands.

@TarunAdobe
Copy link
Contributor

@castastrophe can you please take a look at these failing tests

@castastrophe castastrophe force-pushed the castastrophe/build-remove-postinstall-build-task branch from d1d2d61 to 5601fd3 Compare March 20, 2025 13:19
@castastrophe
Copy link
Contributor Author

@TarunAdobe I already did and they appear connected to the typical flakiness of CI. I didn't see anything related to what this PR is updating.

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

3 participants