You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The services package (@uncefact/untp-ri-services) is published to npm manually. The exports field in package.json currently uses flat types/default conditions because the CJS build artefacts (.cjs, .d.cts) only exist during the manual publish process, not in the workspace.
The Next.js standalone output tracer (@vercel/nft) fails when exports reference non-existent files. This means we cannot use nested import/require conditions in the workspace package.json, as the .cjs and .d.cts files are only generated at publish time via esbuild.
Problem
The services package (
@uncefact/untp-ri-services) is published to npm manually. Theexportsfield inpackage.jsoncurrently uses flattypes/defaultconditions because the CJS build artefacts (.cjs,.d.cts) only exist during the manual publish process, not in the workspace.The Next.js standalone output tracer (
@vercel/nft) fails whenexportsreference non-existent files. This means we cannot use nestedimport/requireconditions in the workspacepackage.json, as the.cjsand.d.ctsfiles are only generated at publish time via esbuild.Current Behaviour
Publishing requires manually modifying
package.json(addingimport/requireconditions, adjusting version), running esbuild to generate CJS bundles, copying.d.ts→.d.cts, publishing, then reverting.Expected Behaviour
A CI pipeline that:
tsc)build/index.cjs,build/server.cjs,build/encryption/index.cjs,build/key-provider/index.cjs).d.tsfiles to.d.ctsfor CJS type resolutionexportsfield to include nestedimport/requireconditionsdigitallink_toolkit_serverfrom dependencies (workspace-only, see Remove digitallink_toolkit_server local dependency #401)--access publicContext
./server,./encryption,./key-provider) to avoid pulling indigitallink_toolkit_servervia the main entry (see Remove digitallink_toolkit_server local dependency #401)typesVersionsfield is already configured for backwards-compatible type resolutionnpx esbuild --bundle --format=cjs --platform=node --out-extension:.js=.cjswith all dependencies marked as externalfilesfield (currently["build"]) to ensure only build output is included in the tarball