-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use tsup to build project; * Update entry poing for cjs and esm; * Remove umd support; * Update npm scripts and husky hooks; * Disable husky installation, remove pinst and move husky installation to prepare script; * Set minimal required Node.js version to 18; * Update ci workflow to use Node 18, 20 and 21; * Use Node 20 for coverage reports and eslint workflow; * Remove typescript workflow, because tsup will manage type validation;
- Loading branch information
1 parent
9b46fd2
commit 6e0181c
Showing
7 changed files
with
30 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
npm run lint:types | ||
npm run lint-staged | ||
pnpm exec lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
npm run coverage | ||
pnpm run coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,32 +19,28 @@ | |
"sideEffects": false, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": ">= 16.5" | ||
"node": ">= 18" | ||
}, | ||
"source": "src/slate-to-react.ts", | ||
"main": "lib/slate-to-react.cjs", | ||
"umd:main": "lib/slate-to-react.umd.js", | ||
"module": "lib/slate-to-react.legacy.mjs", | ||
"types": "@type/slate-to-react.d.ts", | ||
"main": "lib/slate-to-react.js", | ||
"exports": { | ||
"types": "./@type/slate-to-react.d.ts", | ||
"import": "./lib/slate-to-react.mjs", | ||
"require": "./lib/slate-to-react.cjs", | ||
"default": "./lib/slate-to-react.mjs" | ||
"import": { | ||
"types": "./lib/slate-to-react.ts", | ||
"default": "./lib/slate-to-react.js" | ||
}, | ||
"require": { | ||
"types": "./lib/slate-to-react.cts", | ||
"default": "./lib/slate-to-react.cjs" | ||
} | ||
}, | ||
"scripts": { | ||
"eslint": "eslint src/**/*.ts src/**/*.tsx", | ||
"lint:types": "tsc --noEmit", | ||
"lint-staged": "lint-staged", | ||
"test": "cross-env NODE_OPTIONS=\"--no-warnings --loader=ts-node/esm\" ava", | ||
"coverage": "c8 pnpm test", | ||
"report": "c8 -r=html pnpm test", | ||
"ci": "c8 pnpm test && c8 report --reporter=json", | ||
"build": "pnpm lint:types && microbundle --tsconfig tsconfig.build.json --jsx React.createElement --jsxFragment React.Fragment --jsxImportSource react --globals react/jsx-runtime=jsx", | ||
"cleanup": "del-cli @type lib", | ||
"postinstall": "husky install", | ||
"prepublishOnly": "pinst --disable && pnpm run eslint && pnpm run lint:types && pnpm run cleanup && pnpm run build", | ||
"postpublish": "pinst --enable", | ||
"build": "del-cli lib && tsup", | ||
"prepare": "node -e 'process.exit(+(process.env.CI !== undefined || process.env.NO_HUSKY_HOOKS !== undefined));' && husky install || true", | ||
"release": "pnpm build && pnpm changeset publish" | ||
}, | ||
"pnpm": { | ||
|
@@ -55,8 +51,8 @@ | |
} | ||
}, | ||
"devDependencies": { | ||
"@changesets/changelog-github": "^0.4.8", | ||
"@changesets/cli": "^2.26.2", | ||
"@changesets/changelog-github": "0.4.8", | ||
"@changesets/cli": "2.26.2", | ||
"@octetstream/eslint-config": "7.2.1", | ||
"@testing-library/react": "14.0.0", | ||
"@types/node": "20.4.1", | ||
|
@@ -68,7 +64,7 @@ | |
"@typescript-eslint/parser": "5.61.0", | ||
"ava": "5.3.1", | ||
"c8": "8.0.0", | ||
"cross-env": "^7.0.3", | ||
"cross-env": "7.0.3", | ||
"del-cli": "5.0.0", | ||
"eslint": "8.44.0", | ||
"eslint-config-airbnb": "19.0.4", | ||
|
@@ -92,7 +88,7 @@ | |
"slate-react": "0.97.1", | ||
"ts-expect": "1.3.0", | ||
"ts-node": "10.9.1", | ||
"tsup": "^7.2.0", | ||
"tsup": "7.2.0", | ||
"typescript": "5.1.6", | ||
"uuid": "9.0.0" | ||
}, | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.