npm.io
4.0.0 • Published 1 week ago

@forge/util

Licence
SEE LICENSE IN LICENSE.txt
Version
4.0.0
Deps
0
Size
410 kB
Vulns
0
Weekly
0

@forge/util

@forge/util bundles private Atlassian packages into public modules for Forge CLI consumers. Expose only the names that consumers in this monorepo need.

Build

For development, bolt install from the repository root builds util automatically. The build script uses webpack to bundle the exports in src into CommonJS modules under packages/. ARI declarations remain available to workspace consumers and are excluded from the published package.

Add exports to an existing package

Find the package's entry file through webpack.config.js. Add the required named exports to that file under src/. The ARI declaration entry uses the same export list, so it updates with the bundle. Update the expected exports in the package integration tests.

Add another package

  1. Add the package to util's devDependencies with yarn bolt w @forge/util add --dev <package>. Run the command from the repository root.
  2. Add an entry file under src/ that exports only the required names.
  3. Connect the entry through webpack.config.js and expose its generated path through package.json exports.
  4. If workspace consumers need types, extend scripts/build.sh to prepare declarations beside the bundle.
  5. Extend the package integration tests to load the new module and assert its public exports.