Skip to content

v5.1.1 #385

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 3 commits into from
May 8, 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
52 changes: 26 additions & 26 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: 🛠️ CI

on:
push:
Expand All @@ -14,103 +14,103 @@

jobs:
build:
name: Build
name: 🏗️ Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- name: Checkout sources
- name: 🔄 Checkout sources
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: ⚙️ Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Installing dependencies
- name: 📌 Installing dependencies
run: pnpm install --frozen-lockfile
- name: Building sources
- name: 🛠️ Building sources
run: pnpm run build

lint:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Lint Code
name: 🔍 Lint Code
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- name: Checkout sources
- name: 🔄 Checkout sources
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: ⚙️ Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Installing dependencies
- name: 📌 Installing dependencies
run: pnpm install --frozen-lockfile
- name: Linting
- name: Linting
run: pnpm run lint
env:
CI: true

test_unit:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Unit Tests
name: 🧪 Unit Tests
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- name: Checkout sources
- name: 🔄 Checkout sources
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: ⚙️ Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Installing dependencies
- name: 📌 Installing dependencies
run: pnpm install --frozen-lockfile
- name: Running unit tests
- name: 🚀 Running unit tests
run: pnpm run test:unit

test_integration:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Integration Tests
name: 🧩 Integration Tests
needs:
- lint
- test_unit
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
node-version: [20.x, 22.x]
steps:
- name: Checkout sources
- name: 🔄 Checkout sources
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: ⚙️ Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Installing dependencies
- name: 📌 Installing dependencies
run: pnpm install --frozen-lockfile
- name: Creating `.env` file
- name: 📝 Creating `.env` file
run: |
touch .env
echo HOST=${{ secrets.HOST }} >> .env
echo EMAIL=${{ secrets.EMAIL }} >> .env
echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
- name: Running integration tests
- name: 🚀 Running integration tests
run: pnpm run test:integration

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
38 changes: 23 additions & 15 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,54 @@
name: Publish to NPM Dev Channel
name: 🚀 Publish to NPM Dev Channel

on:
workflow_dispatch

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

permissions:
contents: read


jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
- 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
- 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
- name: 🔄 Update package-lock.json
run: pnpm install

- name: Publish to NPM Dev Channel
run: npm publish --tag dev
- name: 📤 Publish to NPM Dev Channel
run: pnpm publish --tag dev --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49 changes: 25 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,69 +13,69 @@ permissions:

jobs:
build-and-test:
name: Build and Test
name: 🏗️ Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- name: 🔄 Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js ${{ env.NODE_VERSION }}
- name: ⚙️ Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

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

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

- name: Run build
- name: 🛠️ Run build
run: pnpm run build

- name: Run lint
- name: 🔍 Run lint
run: pnpm run lint
env:
CI: true

- name: Run unit tests
- name: 🧪 Run unit tests
run: pnpm run test:unit

- name: Run integration tests
- name: 🧩 Run integration tests
run: pnpm run test:integration
env:
HOST: ${{ secrets.HOST }}
EMAIL: ${{ secrets.EMAIL }}
API_TOKEN: ${{ secrets.API_TOKEN }}

publish-package:
name: Publish Package
name: 🚀 Publish Package
needs: build-and-test
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
- name: 🔄 Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

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

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

- name: Get and validate version
- name: 🔖 Get and validate version
id: version
run: |
if [[ $GITHUB_REF == refs/tags/v* ]]; then
Expand Down Expand Up @@ -103,47 +103,48 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

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

- name: Build package
- name: 🛠️ Build package
run: pnpm run build

- name: Publish to NPM
- name: 📤 Publish to NPM
run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

deploy-documentation:
name: Deploy Documentation
name: 📚 Deploy Documentation
needs: publish-package
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- name: 🔄 Checkout repository
uses: actions/checkout@v4
with:
ref: master

- name: Setup Node.js ${{ env.NODE_VERSION }}
- name: ⚙️ Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

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

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

- name: Generate documentation
- name: 📝 Generate documentation
run: pnpm run doc

- name: Deploy to docs branch
- name: 🚀 Deploy to docs branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: docs
folder: docs
clean: true
token: '${{ secrets.PAT }}'
commit-message: "docs: Update documentation for v${{ needs.publish-package.outputs.version }} [skip ci]"
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# 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))
- Fixing ESM imports in TypeScript declarations. Thanks to Alex Grand ([Arilas](https://github.com/Arilas)) for reporting this issue ([#383](https://github.com/MrRefactoring/jira.js/issues/383))
---
- **Special thanks to [GervinFung](https://github.com/GervinFung) for the npm package [`ts-add-js-extension`](https://github.com/GervinFung/ts-add-js-extension), which helps resolve TypeScript ESM import paths.**

## 5.1.0

- Version 2 Client
Expand Down
Loading