Skip to content

Add prepare script to support installing as a git dependency - #5

Merged
vivek-perforce merged 2 commits into
masterfrom
vivek/add-prepare-script
Jul 28, 2026
Merged

Add prepare script to support installing as a git dependency#5
vivek-perforce merged 2 commits into
masterfrom
vivek/add-prepare-script

Conversation

@vivek-perforce

Copy link
Copy Markdown

Summary

  • Adds a prepare script (npm run build-npm) so this package can be installed directly via a git URL (git+https://...#v1.0.6) instead of a pre-published tarball — npm auto-runs prepare after cloning a git dependency, building lib/ before the package is usable.
  • Bumps version to 1.0.6 (1.0.5 is already tagged and immutable).
  • Adds a CHANGELOG entry for 1.0.6.

Why

reporting-ui is moving off its internal Nexus npm registry to the public npm registry. This package isn't publishable there, so it needs an alternative distribution path. Referencing this repo as a git dependency (same pattern already used for react-edit-inline) avoids checking a binary tarball into reporting-ui.

Test plan

  • Ran npm run prepare locally — builds lib/*.js from src/*.js via babel successfully.
  • Verified require('./lib/DateTimeField.js') loads without error.
  • End-to-end verification pending: install this branch as a git dependency inside reporting-ui and run its test suite.

npm auto-runs "prepare" after cloning a git dependency, so consumers can
reference this repo directly via git+https instead of a pre-published
tarball. Bumped to 1.0.6 since 1.0.5 is already tagged and immutable.
@vivek-perforce
vivek-perforce merged commit a08e117 into masterJul 28, 2026
1 check passed

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an npm prepare hook so the package can be consumed via a git URL dependency by building lib/ after clone, alongside a version bump and changelog entry.

Changes:

  • Bump package version to 1.0.6.
  • Add prepare script to run build-npm automatically.
  • Add a 1.0.6 changelog entry describing the new install/build behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
package.jsonAdds prepare script and bumps version to support git-dependency installs that need a built lib/.
CHANGELOG.mdDocuments the 1.0.6 change (added prepare script).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackage.json
Comment on lines 16 to +17
"build-npm": "babel --stage 0 ./src -d ./lib --ignore __tests__/*",
"prepare": "npm run build-npm",
Comment threadpackage.json
Comment on lines 16 to +17
"build-npm": "babel --stage 0 ./src -d ./lib --ignore __tests__/*",
"prepare": "npm run build-npm",
Sign up for freeto 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.

2 participants

@vivek-perforce