Skip to content

#381 commonjs fix #382

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

Merged
merged 2 commits into from
May 6, 2025
Merged
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
27 changes: 18 additions & 9 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: 🚀 Publish to NPM Dev Channel
on:
workflow_dispatch

env:
NODE_VERSION: '20.x'
PNPM_VERSION: '10'

permissions:
contents: read

Expand All @@ -14,32 +18,37 @@ jobs:
- name: 🔄 Checkout code
uses: actions/checkout@v4

- name: ⚙️ Set up Node.js
- name: ⚙️ Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: 20
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/

- name: 📦 Install dependencies
run: npm install
- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: 📌 Install dependencies
run: pnpm install --frozen-lockfile

- name: 🛠️ Build project
run: npm run build
- name: 🛠️ Run build
run: pnpm run build

- name: 🔖 Update package version
id: update-version
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
TIMESTAMP=$(date -u +"%Y%m%d%H%M%S")
NEW_VERSION="${CURRENT_VERSION}-dev${TIMESTAMP}"
npm version --no-git-tag-version $NEW_VERSION
pnpm version --no-git-tag-version $NEW_VERSION
echo "New version: $NEW_VERSION"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV

- name: 🔄 Update package-lock.json
run: npm install
run: pnpm install

- name: 📤 Publish to NPM Dev Channel
run: npm publish --tag dev
run: pnpm publish --tag dev --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Jira.js changelog

## 5.1.1

- Fixing CommonJS requiring. Thanks to solshark ([solshark](https://github.com/solshark)) for reporting this issue ([#381](https://github.com/MrRefactoring/jira.js/issues/381))

## 5.1.0

- Version 2 Client
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jira.js",
"version": "5.1.0",
"version": "5.1.1",
"description": "A comprehensive JavaScript/TypeScript library designed for both Node.JS and browsers, facilitating seamless interaction with the Atlassian Jira API.",
"repository": "https://github.com/MrRefactoring/jira.js.git",
"homepage": "https://mrrefactoring.github.io/jira.js",
Expand Down Expand Up @@ -33,13 +33,14 @@
"engines": {
"node": ">=20.0.0"
},
"main": "./dist/index.cjs.js",
"types": "./dist/index.d.ts",
"module": "./dist/index.mjs",
"main": "./dist/index.cjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"scripts": {
Expand Down Expand Up @@ -91,7 +92,7 @@
"dependencies": {
"axios": "^1.9.0",
"mime": "^4.0.7",
"zod": "^3.24.3"
"zod": "^3.24.4"
},
"devDependencies": {
"@eslint/js": "^9.26.0",
Expand All @@ -113,7 +114,7 @@
"tslib": "^2.8.1",
"typedoc": "^0.28.4",
"typescript": "^5.8.3",
"typescript-eslint": "^8.31.1",
"vitest": "^3.1.2"
"typescript-eslint": "^8.32.0",
"vitest": "^3.1.3"
}
}
Loading