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: use npm pack tarball for local examples and testing instead of .local #859

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

broofa
Copy link
Member

@broofa broofa commented Jan 9, 2025

@ctavan, I don't expect this to be controversial but it'd be nice to get your sign off here since the ".local" directory setup was initially your idea.

Briefly, this does the following:

  1. Have the build script create an npm pack tarball (in .build/uuid.tgz) that can be installed locally
  2. Have all examples use that instead of the ".local" dir
  3. Remove the .local dir

Note

npm install in the examples/* dirs was failing on GH test runners because npm pack's output is platform specific. This tends to cause npm to complain when it compares the checksum it sees on one platform (GH runner) to the integrity checksum it caches in package-lock.json on another platform (like our laptops). The workaround was to add the --no-package-lock when installing in examples/* dirs. This isn't a big deal since the only thing being installed is the uuid tarball. And it has the nice side-effect of removing the need for package-lock.json files in those dirs.

@broofa broofa marked this pull request as draft January 9, 2025 18:43
@broofa broofa force-pushed the npm_pack branch 6 times, most recently from d2fa2df to 1a87264 Compare January 9, 2025 19:34
@broofa broofa force-pushed the npm_pack branch 4 times, most recently from 7def6b1 to 260c858 Compare January 9, 2025 20:30
@broofa broofa marked this pull request as ready for review January 9, 2025 20:35
@broofa
Copy link
Member Author

broofa commented Jan 9, 2025

Merging, as I need this for #860

@broofa broofa merged commit e426aaa into main Jan 9, 2025
14 checks passed
@broofa broofa deleted the npm_pack branch January 9, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant