v1.0.0
- Drop
reactandinkfor CLI. Now usespromptsandora. - Template generation is no longer bundled into the package. The templates are now downloaded remotely from this repository.
- ESM bundles, like CJS, now have prod and dev builds. This drops the need for
process.env.NODE_ENVfor the builds, allowing the use of ESM bundle in CDNs. - CJS bundle no longer has a common entrypoint. Loading CJS modules now relies on
exportconditions. ts-jestis no longer a peer dependency (due to conflict reasons). It is still the default transformer, but users need to installts-jestseparately (if not installed previously).- Adds
startanddevcommands for templates likefastify. pluginsoption can now be a function (throughpridepack.config.js). When using a function, it can accept an object with the propertiesisDev,isCJSandisESM.createandinitcommands now prompts users for package information. This also generatesLICENSEfile.watchnow uses incremental mode ESBuild- PNPM is now supported.
- Users can now choose whichever package manager they are using to initialize the package. Previously, this aggressively uses the installed package manager's availability.
Migrating to 1.0.0
package.json
The following entrypoints must now be provided. ./esm and ./cjs entrypoints are optional.
{
"types": "dist/types/index.d.ts",
"main": "dist/cjs/production/index.js",
"module": "dist/esm/production/index.js",
"exports": {
".": {
"development": {
"require": "./dist/cjs/development/index.js",
"import": "./dist/esm/development/index.js"
},
"require": "./dist/cjs/production/index.js",
"import": "./dist/esm/production/index.js",
"types": "./dist/types/index.d.ts"
},
"./dev": {
"production": {
"require": "./dist/cjs/production/index.js",
"import": "./dist/esm/production/index.js"
},
"require": "./dist/cjs/development/index.js",
"import": "./dist/esm/development/index.js",
"types": "./dist/types/index.d.ts"
},
"./esm": {
"development": "./dist/esm/development/index.js",
"production": "./dist/esm/production/index.js",
"default": "./dist/esm/production/index.js",
"types": "./dist/types/index.d.ts"
},
"./cjs": {
"development": "./dist/cjs/development/index.js",
"production": "./dist/cjs/production/index.js",
"default": "./dist/cjs/production/index.js",
"types": "./dist/types/index.d.ts"
}
}
}For scripts, if you are using a start command for running the index file (e.g. fastify-based templates), you may add the following to the scripts field:
{
"start": "pridepack start",
"dev": "pridepack dev",
}ts-jest
ts-jest is still the default preset for pridepack test, however, it is no longer a peer dependency. In this case, users needs to install ts-jest as devDependency. Templates have also been re-adjusted.