Skip to content
Open
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
45 changes: 45 additions & 0 deletions .github/workflows/npmAudit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: NPM Audit

on:
pull_request:
workflow_dispatch:
push:
branches:
- master

jobs:
scan:
name: NPM Audit packages
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: ${{ vars.NODE_VERSION }}

- name: Install dependencies
run: npm i
env:
NODE_ENV: production
CI: true
- uses: oke-py/npm-audit-action@3fa1b7654e7ff98cbb75c17f927c076a22991572 # v3.0.0
with:
audit_level: moderate
create_issues: true
create_pr_comments: true
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_assignees: oke-py
issue_labels: vulnerability,test
dedupe_issues: true
json_flag: true
13 changes: 7 additions & 6 deletions .github/workflows/node.js.yml → .github/workflows/unitTest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: Unit Test

on:
push:
Expand All @@ -11,6 +11,7 @@ on:

jobs:
build:
name: Unit Test
runs-on: ${{ matrix.os }}

env:
Expand All @@ -19,19 +20,19 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
node-version: [14.x, 16.x, 18.x]
node-version: [22.20.0, 24.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Install GraphicsMagic and Imagemagick on Ubuntu
if: contains(matrix.os, 'ubuntu')
run: sudo apt-get install -y imagemagick graphicsmagick
run: sudo apt-get install -y imagemagick=7.1.1-21 graphicsmagick=1.3.35-Q16 ghostscript
- name: Install GraphicsMagic and Imagemagick on Windows
if: contains(matrix.os, 'windows')
run: choco install -y imagemagick graphicsmagick
- uses: actions/checkout@v3
run: choco install -y imagemagick --version 7.1.1-21-Q16-HDRI-x64-dll.exe graphicsmagick --version 1.3.35-Q16-win64-dll.exe ghostscript
- uses: actions/checkout@v6.0.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
- run: npm i
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.DS_Store
node_modules
package-lock.json
examples/imgs/*
!examples/imgs/original.jpg
!examples/imgs/original.png
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
2 changes: 1 addition & 1 deletion lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ module.exports = function (proto) {
err = new Error('Command failed: ' + stderr);
err.code = code;
err.signal = signal;
};
}
cb(err, stdout, stderr, cmd);
stdout = stderr = onOut = onErr = onExit = null;
});
Expand Down
132 changes: 132 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gm",
"description": "GraphicsMagick and ImageMagick for node.js",
"version": "1.25.0",
"version": "2.0.1",
"author": "Aaron Heckmann <aaron.heckmann+github@gmail.com>",
"keywords": [
"graphics",
Expand All @@ -14,8 +14,9 @@
"identify",
"compare"
],
"engineStrict": true,
"engines": {
"node": ">=14"
"node": ">=22.20.0"
},
"bugs": {
"url": "http://github.com/aheckmann/gm/issues"
Expand All @@ -35,16 +36,16 @@
},
"repository": {
"type": "git",
"url": "https://github.com/aheckmann/gm.git"
"url": "git+https://github.com/aheckmann/gm.git"
},
"license": "MIT",
"devDependencies": {
"async": "~0.9.0"
"async": "~3.2.6"
},
"dependencies": {
"array-parallel": "~0.1.3",
"array-series": "~0.1.5",
"cross-spawn": "^4.0.0",
"debug": "^3.1.0"
"cross-spawn": "^7.0.6",
"debug": "^4.4.3"
}
}