From 5dac9b6a643e91b16e8956f81ec4165ee03dbfc4 Mon Sep 17 00:00:00 2001 From: Erik Moura Date: Sat, 11 Jan 2025 10:27:22 -0300 Subject: [PATCH] feat!: bump `engines` requirement to Node 22 --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 15 ++------------- .nvmrc | 1 + README.md | 2 +- package.json | 4 ++-- yarn.lock | 29 ++++++++++++++++++----------- 6 files changed, 25 insertions(+), 28 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1bc2491a..4101277e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: - node-version: 20.x + node-version: 22.0.0 cache: 'yarn' - name: Install run: yarn install --frozen-lockfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a83a1fae..fe8dea68 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,19 +17,13 @@ jobs: strategy: matrix: node-version: - - '20.10' - - '18.18' - - '16.20' - - '14.16' + - '22.0.0' os: - macos-latest - ubuntu-22.04 - windows-latest runs-on: "${{ matrix.os }}" steps: - - name: Install Rosetta - if: ${{ matrix.os == 'macos-latest' && matrix.node-version == '14.16' }} - run: /usr/sbin/softwareupdate --install-rosetta --agree-to-license - name: Install Linux Dependencies if: ${{ matrix.os == 'ubuntu-22.04' }} run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libasound2 libgtk-3-0 libnss3 libxss1 libxtst6 xvfb libgbm-dev @@ -40,12 +34,7 @@ jobs: with: node-version: "${{ matrix.node-version }}" cache: 'yarn' - architecture: ${{ matrix.os == 'macos-latest' && matrix.node-version == '14.16' && 'x64' || env.RUNNER_ARCH }} - - name: Install (Node.js v16+) - if : ${{ matrix.node-version != '14.16' }} + - name: Install dependencies run: yarn install --frozen-lockfile - - name: Install (Node.js < v16) - if : ${{ matrix.node-version == '14.16' }} - run: yarn install --frozen-lockfile --ignore-engines - name: Test run: yarn test diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..1d975bef --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22.0.0 diff --git a/README.md b/README.md index 421cdfa2..d4e3580d 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ all files together without compression, while having random access support. ### Install -This module requires Node 10 or later. +This module requires Node 22 or later. ```bash $ npm install --engine-strict @electron/asar diff --git a/package.json b/package.json index 559a56dc..503adeff 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "lib" ], "engines": { - "node": ">=10.12.0" + "node": ">=22.0.0" }, "license": "MIT", "homepage": "https://github.com/electron/asar", @@ -43,7 +43,7 @@ }, "devDependencies": { "@types/minimatch": "^3.0.5", - "@types/node": "^12.0.0", + "@types/node": "^22.10.5", "electron": "^22.0.0", "electron-mocha": "^11.0.2", "lodash": "^4.17.15", diff --git a/yarn.lock b/yarn.lock index 73cc2f1e..bda7a3d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -61,15 +61,17 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.10.tgz#4c64759f3c2343b7e6c4b9caf761c7a3a05cee34" integrity sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ== -"@types/node@^12.0.0": - version "12.20.55" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" - integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - "@types/node@^16.11.26": - version "16.18.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.4.tgz#712ba61b4caf091fc6490301b1888356638c17bd" - integrity sha512-9qGjJ5GyShZjUfx2ArBIGM+xExdfLvvaCyQR0t6yRXKPcWCVYF/WemtX/uIU3r7FYECXRXkIiw2Vnhn6y8d+pw== + version "16.18.123" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.123.tgz#9073e454ee52ce9e2de038e7e0cf90f65c9abd56" + integrity sha512-/n7I6V/4agSpJtFDKKFEa763Hc1z3hmvchobHS1TisCOTKD5nxq8NJ2iK7SRIMYL276Q9mgWOx2AWp5n2XI6eA== + +"@types/node@^22.10.5": + version "22.10.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.5.tgz#95af89a3fb74a2bb41ef9927f206e6472026e48b" + integrity sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ== + dependencies: + undici-types "~6.20.0" "@types/responselike@^1.0.0": version "1.0.0" @@ -332,9 +334,9 @@ electron-window@^0.8.0: is-electron-renderer "^2.0.0" electron@^22.0.0: - version "22.3.25" - resolved "https://registry.yarnpkg.com/electron/-/electron-22.3.25.tgz#a9a70b63a6712c658cd7fab343129b2a78450f80" - integrity sha512-AjrP7bebMs/IPsgmyowptbA7jycTkrJC7jLZTb5JoH30PkBC6pZx/7XQ0aDok82SsmSiF4UJDOg+HoLrEBiqmg== + version "22.3.27" + resolved "https://registry.yarnpkg.com/electron/-/electron-22.3.27.tgz#b77451a53f0c502e7559cceac28ac58eb289eef8" + integrity sha512-7Rht21vHqj4ZFRnKuZdFqZFsvMBCmDqmjetiMqPtF+TmTBiGne1mnstVXOA/SRGhN2Qy5gY5bznJKpiqogjM8A== dependencies: "@electron/get" "^2.0.0" "@types/node" "^16.11.26" @@ -1071,6 +1073,11 @@ typescript@^5.5.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"