This is a smoke test project that verifies that the dist/
folder about to get published to npm for the mappersmith
project works in a range of consumer projects, represented by a number of workspaces in this repo.
- Install correct node version (see
.tool-versions
) and latest yarn (yarn set version stable
) - Clone mappersmith and run
yarn
+yarn publish:prepare
- Back in this repo, link to the dist/ folder:
yarn link ../mappersmith/dist
Verify tsc works in all projects:
yarn build:all
Verify runtime is working in all projects:
yarn integration:all
or one-by-one:
# only works on 2.38 and higher (due to Response and version being exported):
yarn workspace @mappersmith-consumer/cjs test:live;
yarn workspace @mappersmith-consumer/cjs-ts test:live;
yarn workspace @mappersmith-consumer/cjs-ts-ir test:live;
yarn workspace @mappersmith-consumer/cjs-ts-cr test:live;
yarn workspace @mappersmith-consumer/cjs-ts-old test:live;
# only works on 2.43 and higher:
# Related: https://github.com/evanw/esbuild/issues/1343
yarn workspace @mappersmith-consumer/esm-ts test:live;
yarn workspace @mappersmith-consumer/esm-ts-legacy-imports test:live;
yarn workspace @mappersmith-consumer/bun test:live;
Verify tests are running in all projects:
yarn test:all
or one-by-one:
yarn workspace @mappersmith-consumer/cjs test;
yarn workspace @mappersmith-consumer/cjs-ts test;
yarn workspace @mappersmith-consumer/cjs-ts-ir test;
yarn workspace @mappersmith-consumer/cjs-ts-cr test;
yarn workspace @mappersmith-consumer/cjs-ts-old test;
yarn workspace @mappersmith-consumer/esm-ts test;
yarn workspace @mappersmith-consumer/bun test;
In this version there was no ESM export so importing would not work correctly for ESM consumers.
yarn workspace @mappersmith-consumer/{name} test:live
bun - ⛔️
cjs - ✅
cjs-ts - ✅
cjs-ts-cr - ✅
cjs-ts-ir - ✅
cjs-ts-old - ✅
esm-ts - ⛔️
esm-ts-legacy-imports - ⛔️
In this version we changed from using a custom build script to start using tsup
bundling the dist/ folder. This is the milestone first ESM package exported to NPM.
bun - ✅
cjs - ✅
cjs-ts - ✅
cjs-ts-cr - ✅
cjs-ts-ir - ✅
cjs-ts-old - ✅
esm-ts - ✅
esm-ts-legacy-imports - ✅