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
- Add the package to util's
devDependencieswithyarn bolt w @forge/util add --dev <package>. Run the command from the repository root. - Add an entry file under
src/that exports only the required names. - Connect the entry through
webpack.config.jsand expose its generated path through package.jsonexports. - If workspace consumers need types, extend
scripts/build.shto prepare declarations beside the bundle. - Extend the package integration tests to load the new module and assert its public exports.