Skip to content

Commit

Permalink
build: replace np with semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdyman committed Oct 21, 2023
1 parent a30e993 commit 732ce0b
Show file tree
Hide file tree
Showing 5 changed files with 907 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules
*.tgz
dist
coverage
.env
.pnpm-store/
storybook-static
docs/storybook/src
Expand Down
2 changes: 1 addition & 1 deletion docs/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"react": "^18.2.0",
"react-compare-slider": "workspace:^2.2.0",
"react-compare-slider": "workspace:*",
"react-dom": "^18.2.0"
},
"devDependencies": {
Expand Down
13 changes: 8 additions & 5 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
"scripts": {
"dev": "concurrently -k -s first -n \"tsup,ts\" -c \"blue,cyan\" \"tsup --watch\" \"pnpm run check:types --watch --preserveWatchOutput\"",
"build": "pnpm run check:types && NODE_ENV=production tsup",
"release": "cp ../README.md ../LICENSE . && pnpm run -w lint && pnpm run -w test && pnpm run build && pnpm run check && np --no-tests --no-cleanup",
"release": "pnpm run release:preflight && pnpm run release:publish",
"release:preflight": "cp ../README.md ../LICENSE . && pnpm run -w lint && pnpm run -w test && pnpm run build && pnpm run check",
"release:publish": "semantic-release",
"check": "concurrently -n \"package,types\" -c \"blue,magenta\" \"pnpm run check:package\" \"pnpm run check:types\"",
"check:package": "attw -P . --ignore-rules cjs-resolves-to-esm && publint",
"check:types": "tsc --noEmit"
Expand All @@ -69,21 +71,22 @@
"last 1 safari version"
]
},
"np": {
"pnpm": true
},
"peerDependencies": {
"react": ">=16.8",
"react-dom": ">=16.8"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.2.1",
"@semantic-release/npm": "^11.0.0",
"@semantic-release/release-notes-generator": "^12.0.0",
"@types/node": "^20.8.7",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"browserslist": "^4.22.1",
"concurrently": "^8.2.2",
"esbuild-plugin-browserslist": "^0.9.1",
"np": "^8.0.4",
"publint": "^0.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
15 changes: 15 additions & 0 deletions lib/release.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-env node */
/**
* @type {import('semantic-release').GlobalConfig}
*/
module.exports = {
branches: ['main', 'next'],
dryRun: true,
plugins: [
'@semantic-release/release-notes-generator',
'@semantic-release/changelog',
// '@semantic-release/npm',
'@semantic-release/git',
'@semantic-release/github',
],
};

0 comments on commit 732ce0b

Please sign in to comment.