Skip to content

Commit cfb9828

Browse files
committed
#381 commonjs fix
1 parent f2ad3a9 commit cfb9828

File tree

4 files changed

+150
-202
lines changed

4 files changed

+150
-202
lines changed

.github/workflows/publish-dev.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: 🚀 Publish to NPM Dev Channel
33
on:
44
workflow_dispatch
55

6+
env:
7+
NODE_VERSION: '20.x'
8+
PNPM_VERSION: '10'
9+
610
permissions:
711
contents: read
812

@@ -14,32 +18,37 @@ jobs:
1418
- name: 🔄 Checkout code
1519
uses: actions/checkout@v4
1620

17-
- name: ⚙️ Set up Node.js
21+
- name: ⚙️ Setup Node.js ${{ env.NODE_VERSION }}
1822
uses: actions/setup-node@v4
1923
with:
20-
node-version: 20
24+
node-version: ${{ env.NODE_VERSION }}
2125
registry-url: https://registry.npmjs.org/
2226

23-
- name: 📦 Install dependencies
24-
run: npm install
27+
- name: 📦 Install pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
version: ${{ env.PNPM_VERSION }}
31+
32+
- name: 📌 Install dependencies
33+
run: pnpm install --frozen-lockfile
2534

26-
- name: 🛠️ Build project
27-
run: npm run build
35+
- name: 🛠️ Run build
36+
run: pnpm run build
2837

2938
- name: 🔖 Update package version
3039
id: update-version
3140
run: |
3241
CURRENT_VERSION=$(node -p "require('./package.json').version")
3342
TIMESTAMP=$(date -u +"%Y%m%d%H%M%S")
3443
NEW_VERSION="${CURRENT_VERSION}-dev${TIMESTAMP}"
35-
npm version --no-git-tag-version $NEW_VERSION
44+
pnpm version --no-git-tag-version $NEW_VERSION
3645
echo "New version: $NEW_VERSION"
3746
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
3847
3948
- name: 🔄 Update package-lock.json
40-
run: npm install
49+
run: pnpm install
4150

4251
- name: 📤 Publish to NPM Dev Channel
43-
run: npm publish --tag dev
52+
run: pnpm publish --tag dev --no-git-checks
4453
env:
4554
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jira.js",
3-
"version": "5.1.0",
3+
"version": "5.1.1",
44
"description": "A comprehensive JavaScript/TypeScript library designed for both Node.JS and browsers, facilitating seamless interaction with the Atlassian Jira API.",
55
"repository": "https://github.com/MrRefactoring/jira.js.git",
66
"homepage": "https://mrrefactoring.github.io/jira.js",
@@ -33,13 +33,14 @@
3333
"engines": {
3434
"node": ">=20.0.0"
3535
},
36-
"main": "./dist/index.cjs.js",
3736
"types": "./dist/index.d.ts",
37+
"module": "./dist/index.mjs",
38+
"main": "./dist/index.cjs",
3839
"exports": {
3940
".": {
4041
"types": "./dist/index.d.ts",
41-
"import": "./dist/index.esm.js",
42-
"require": "./dist/index.cjs.js"
42+
"import": "./dist/index.mjs",
43+
"require": "./dist/index.cjs"
4344
}
4445
},
4546
"scripts": {
@@ -91,7 +92,7 @@
9192
"dependencies": {
9293
"axios": "^1.9.0",
9394
"mime": "^4.0.7",
94-
"zod": "^3.24.3"
95+
"zod": "^3.24.4"
9596
},
9697
"devDependencies": {
9798
"@eslint/js": "^9.26.0",
@@ -113,7 +114,7 @@
113114
"tslib": "^2.8.1",
114115
"typedoc": "^0.28.4",
115116
"typescript": "^5.8.3",
116-
"typescript-eslint": "^8.31.1",
117-
"vitest": "^3.1.2"
117+
"typescript-eslint": "^8.32.0",
118+
"vitest": "^3.1.3"
118119
}
119120
}

0 commit comments

Comments
 (0)