Skip to content

Commit

Permalink
Merge branch 'main' into fix-workflows-for-yarn-v4
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmire authored Jul 18, 2024
2 parents 4ec5c9e + 076554c commit 0c3dcfa
Show file tree
Hide file tree
Showing 5 changed files with 314 additions and 568 deletions.
29 changes: 17 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,26 @@
"sideEffects": false,
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.cts",
"files": [
"dist"
],
"scripts": {
"build": "tsup --clean && yarn build:types",
"build": "ts-bridge --project tsconfig.build.json --clean",
"build:docs": "typedoc",
"build:types": "tsc --project tsconfig.build.json",
"lint": "yarn lint:eslint && yarn lint:constraints && yarn lint:misc --check && yarn lint:dependencies --check && yarn lint:changelog",
"lint:changelog": "auto-changelog validate --prettier",
"lint:constraints": "yarn constraints",
Expand All @@ -37,19 +41,22 @@
"lint:fix": "yarn lint:eslint --fix && yarn lint:constraints --fix && yarn lint:misc --write && yarn lint:dependencies && yarn lint:changelog",
"lint:misc": "prettier '**/*.json' '**/*.md' '**/*.yml' '!.yarnrc.yml' --ignore-path .gitignore --no-error-on-unmatched-pattern",
"prepack": "./scripts/prepack.sh",
"test": "jest && jest-it-up",
"test": "jest && jest-it-up && attw --pack",
"test:watch": "jest --watch"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@lavamoat/allow-scripts": "^3.0.4",
"@lavamoat/preinstall-always-fail": "^2.0.0",
"@metamask/auto-changelog": "^3.4.3",
"@metamask/eslint-config": "^12.2.0",
"@metamask/eslint-config-jest": "^12.1.0",
"@metamask/eslint-config-nodejs": "^12.1.0",
"@metamask/eslint-config-typescript": "^12.1.0",
"@ts-bridge/cli": "^0.1.4",
"@ts-bridge/shims": "^0.1.1",
"@types/jest": "^28.1.6",
"@types/node": "^16",
"@types/node": "^18.18",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"@yarnpkg/types": "^4.0.0-rc.52",
Expand All @@ -68,7 +75,6 @@
"prettier-plugin-packagejson": "^2.3.0",
"ts-jest": "^28.0.7",
"ts-node": "^10.7.0",
"tsup": "^7.2.0",
"typedoc": "^0.23.15",
"typescript": "~4.8.4"
},
Expand All @@ -82,8 +88,7 @@
},
"lavamoat": {
"allowScripts": {
"@lavamoat/preinstall-always-fail": false,
"tsup>esbuild": true
"@lavamoat/preinstall-always-fail": false
}
}
}
2 changes: 1 addition & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"emitDeclarationOnly": true,
"inlineSources": true,
"noEmit": false,
"outDir": "dist/types",
"outDir": "dist",
"rootDir": "src",
"sourceMap": true
},
Expand Down
40 changes: 0 additions & 40 deletions tsup.config.ts

This file was deleted.

21 changes: 11 additions & 10 deletions yarn.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -253,20 +253,21 @@ module.exports = defineConfig({
workspace.set('repository.type', 'git');
workspace.set('repository.url', `${workspaceRepository}.git`);

// The package must specify a minimum Node.js version of 16.
// The package must specify a minimum Node.js version of 18.18.
workspace.set('engines.node', '^18.18 || >=20');

// The package must specify a `types` entrypoint, and an `import`
// entrypoint.
workspace.set('types', './dist/types/index.d.ts');
workspace.set('exports["."].types', './dist/types/index.d.ts');
// The package must provide the location of the CommonJS-compatible
// entrypoint and its matching type declaration file.
workspace.set('main', './dist/index.cjs');
workspace.set('exports["."].require.default', './dist/index.cjs');
workspace.set('types', './dist/index.d.cts');
workspace.set('exports["."].require.types', './dist/index.d.cts');

// The package must specify a `main` and `module` entrypoint, and a
// `require` and `import` entrypoint.
workspace.set('main', './dist/index.js');
workspace.set('exports["."].require', './dist/index.js');
// The package must provide the location of the ESM-compatible JavaScript
// entrypoint and its matching type declaration file.
workspace.set('module', './dist/index.mjs');
workspace.set('exports["."].import', './dist/index.mjs');
workspace.set('exports["."].import.default', './dist/index.mjs');
workspace.set('exports["."].import.types', './dist/index.d.mts');

// The package must export a `package.json` file.
workspace.set('exports["./package.json"]', './package.json');
Expand Down
Loading

0 comments on commit 0c3dcfa

Please sign in to comment.