Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: check npm and pnpm #443

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 32 additions & 26 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,38 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/quickstart
- uses: wagoid/commitlint-github-action@v5
env:
NODE_PATH: ${{ github.workspace }}/node_modules
- run: |
type pnpm
type npm
echo $PATH
echo $GITHUB_PATH
cat $HOME/.bash_profile
cat $HOME/.bashrc

validate:
needs: init
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/quickstart
- run: pnpm --filter="@chakra-icons/*" --filter="create-*" run lint
mkdir -p $GITHUB_WORKSPACE/kdnj/bin

test:
needs: init
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/quickstart
- run: pnpm run test
echo -e '#!/bin/bash\npnpm "$@"' > $GITHUB_WORKSPACE/kdnj/bin/npm && \
chmod +x $GITHUB_WORKSPACE/kdnj/bin/npm

build:
env:
NODE_OPTIONS: --max_old_space_size=8192
needs: init
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/quickstart
- run: pnpm run build
echo "$GITHUB_WORKSPACE/kdnj/bin" >> $GITHUB_PATH

echo REAL_PATH $PATH
echo GITHUB_PATH $GITHUB_PATH

type pnpm
type npm

rc=/tmp/rcfile

echo 'shopt -s expand_aliases' > $rc
echo 'alias ll="ls -l" ' >> $rc
echo 'alias npm="$GITHUB_WORKSPACE/kdnj/bin/npm"' >> $rc

source $rc

type pnpm
type npm

npm version

npm --help
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,14 @@ jobs:
GIT_COMMITTER_NAME: "@kdnjbot"
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
run: pnpm run release
run: |
# PATCH: replace workspace:* to *
# multi-semantic-release (especially @semrel-extra/npm not supported version `workspace:*`.
# So, need to replace it before release
echo -e '#!/bin/bash\npnpm "$@"' > npm && chmod +x npm
echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH
pnpm config set auto-install-peers true
pnpm install
find . -type f -name "package.json" -not -path './node_modules*' -not -path './.git*' -exec sed -i 's/workspace:\*/\*/g' {} \;
npm version
pnpm run release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
| ---- | ----------- | ------- |
| [create-chakra-icons](https://github.com/kodingdotninja/chakra-icons/tree/main/packages/create-chakra-icons) | ✅ | [![create-chakra-icons](https://badgen.net/npm/v/create-chakra-icons?color=green)](https://www.npmjs.com/package/create-chakra-icons) |
| [@tooling/msrconfig](https://github.com/kodingdotninja/chakra-icons/tree/main/tooling/msr.conf) | ❌ | |
| [@chakra-icons/cli](https://github.com/kodingdotninja/chakra-icons/tree/main/tooling/cli) | | [![@chakra-icons/cli](https://badgen.net/npm/v/@chakra-icons/cli?color=green)](https://www.npmjs.com/package/@chakra-icons/cli) |
| [@chakra-icons/cli](https://github.com/kodingdotninja/chakra-icons/tree/main/tooling/cli) | | [![@chakra-icons/cli](https://badgen.net/npm/v/@chakra-icons/cli?color=green)](https://www.npmjs.com/package/@chakra-icons/cli) |
| [@chakra-icons/bootstrap](https://github.com/kodingdotninja/chakra-icons/tree/main/packages/@chakra-icons/bootstrap) | ✅ | [![@chakra-icons/bootstrap version](https://badgen.net/npm/v/@chakra-icons/bootstrap?color=green)](https://www.npmjs.com/package/@chakra-icons/bootstrap) [![@chakra-icons/bootstrap treeshakeble](https://badgen.net/bundlephobia/tree-shaking/@chakra-icons/bootstrap?color=blue)](https://bundlephobia.com/package/@chakra-icons/bootstrap) |
| [@chakra-icons/carbon](https://github.com/kodingdotninja/chakra-icons/tree/main/packages/@chakra-icons/carbon) | ✅ | [![@chakra-icons/carbon version](https://badgen.net/npm/v/@chakra-icons/carbon?color=green)](https://www.npmjs.com/package/@chakra-icons/carbon) [![@chakra-icons/carbon treeshakeble](https://badgen.net/bundlephobia/tree-shaking/@chakra-icons/carbon?color=blue)](https://bundlephobia.com/package/@chakra-icons/carbon) |
| [@chakra-icons/cryptocurrency-icons](https://github.com/kodingdotninja/chakra-icons/tree/main/packages/@chakra-icons/cryptocurrency-icons) | ✅ | [![@chakra-icons/cryptocurrency-icons version](https://badgen.net/npm/v/@chakra-icons/cryptocurrency-icons?color=green)](https://www.npmjs.com/package/@chakra-icons/cryptocurrency-icons) [![@chakra-icons/cryptocurrency-icons treeshakeble](https://badgen.net/bundlephobia/tree-shaking/@chakra-icons/cryptocurrency-icons?color=blue)](https://bundlephobia.com/package/@chakra-icons/cryptocurrency-icons) |
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"packages/@chakra-icons/*",
"website",
"!website/**",
"!tooling/*.conf/**"
"!tooling/*"
],
"scripts": {
"# general commands": "--------------------------------------------------",
Expand Down Expand Up @@ -41,11 +41,17 @@
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"commitlint-config-squash-pr": "^1.1.0",
"eslint": "^8.47.0",
"husky": "^8.0.3",
"multi-semantic-release": "^3.0.2",
"plop": "^3.1.2",
"prettier": "^3.0.3",
"shx": "^0.3.4",
"turbo": "^1.10.13"
"turbo": "^1.10.13",
"typescript": "^5.2.2"
},
"resolutions": {
"@semantic-release/npm": "@semrel-extra/npm"
},
"prettier": "@kodingdotninja/style-guide/prettier",
"private": true
Expand Down
2 changes: 1 addition & 1 deletion packages/@chakra-icons/bootstrap/.releaserc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("@tooling/msrconfig");
module.exports = require("../../../tooling/msr.conf")
1 change: 0 additions & 1 deletion packages/@chakra-icons/bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
],
"devDependencies": {
"@chakra-icons/cli": "*",
"@tooling/msrconfig": "workspace:*",
"tsup": "^7.2.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@chakra-icons/carbon/.releaserc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("@tooling/msrconfig");
module.exports = require("../../../tooling/msr.conf")
1 change: 0 additions & 1 deletion packages/@chakra-icons/carbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
],
"devDependencies": {
"@chakra-icons/cli": "*",
"@tooling/msrconfig": "workspace:*",
"tsup": "^7.2.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@chakra-icons/cryptocurrency-icons/.releaserc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("@tooling/msrconfig");
module.exports = require("../../../tooling/msr.conf")
1 change: 0 additions & 1 deletion packages/@chakra-icons/cryptocurrency-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
],
"devDependencies": {
"@chakra-icons/cli": "*",
"@tooling/msrconfig": "workspace:*",
"tsup": "^7.2.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@chakra-icons/feather/.releaserc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("@tooling/msrconfig");
module.exports = require("../../../tooling/msr.conf")
1 change: 0 additions & 1 deletion packages/@chakra-icons/feather/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
],
"devDependencies": {
"@chakra-icons/cli": "*",
"@tooling/msrconfig": "workspace:*",
"tsup": "^7.2.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@chakra-icons/flat-icon/.releaserc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("@tooling/msrconfig");
module.exports = require("../../../tooling/msr.conf")
1 change: 0 additions & 1 deletion packages/@chakra-icons/flat-icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
],
"devDependencies": {
"@chakra-icons/cli": "*",
"@tooling/msrconfig": "workspace:*",
"tsup": "^7.2.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@chakra-icons/ionicons/.releaserc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("@tooling/msrconfig");
module.exports = require("../../../tooling/msr.conf")
1 change: 0 additions & 1 deletion packages/@chakra-icons/ionicons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
],
"devDependencies": {
"@chakra-icons/cli": "*",
"@tooling/msrconfig": "workspace:*",
"tsup": "^7.2.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@chakra-icons/octicons/.releaserc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("@tooling/msrconfig");
module.exports = require("../../../tooling/msr.conf")
1 change: 0 additions & 1 deletion packages/@chakra-icons/octicons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
],
"devDependencies": {
"@chakra-icons/cli": "*",
"@tooling/msrconfig": "workspace:*",
"tsup": "^7.2.0"
},
"peerDependencies": {
Expand Down
5 changes: 5 additions & 0 deletions packages/@chakra-icons/octicons/snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -2088,6 +2088,11 @@
"svg": ".chakraIcons/icons/feed-merged-16.svg",
"code": "src/FeedMerged16.tsx"
},
{
"name": "FeedIssueReopen16",
"svg": ".chakraIcons/icons/feed-issue-reopen-16.svg",
"code": "src/FeedIssueReopen16.tsx"
},
{
"name": "FeedIssueOpen16",
"svg": ".chakraIcons/icons/feed-issue-open-16.svg",
Expand Down
2 changes: 1 addition & 1 deletion packages/@chakra-icons/simple-line-icons/.releaserc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("@tooling/msrconfig");
module.exports = require("../../../tooling/msr.conf")
1 change: 0 additions & 1 deletion packages/@chakra-icons/simple-line-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
],
"devDependencies": {
"@chakra-icons/cli": "*",
"@tooling/msrconfig": "workspace:*",
"tsup": "^7.2.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@chakra-icons/tabler-icons/.releaserc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("@tooling/msrconfig");
module.exports = require("../../../tooling/msr.conf")
1 change: 0 additions & 1 deletion packages/@chakra-icons/tabler-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
],
"devDependencies": {
"@chakra-icons/cli": "*",
"@tooling/msrconfig": "workspace:*",
"tsup": "^7.2.0"
},
"peerDependencies": {
Expand Down
Loading