Skip to content
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

[Improvements🛠️]:Update tools directory, CI workflow, and dependencies for better compatibility and performance #1790

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
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
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
node: 18
host: x86
target: x86
- os: macos-m1
- os: macos-latest
node: 18
host: arm64
target: arm64
Expand All @@ -46,15 +46,11 @@ jobs:
architecture: ${{ matrix.host }}

- name: Add yarn (self-hosted)
if: matrix.os == 'macos-m1'
if: matrix.os == 'macos-latest'
run: npm install -g yarn

- name: Add setuptools for Python 3.12 (temp)
if: matrix.os != 'macos-m1'
run: pip install setuptools

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.3
uses: microsoft/setup-msbuild@v2
if: contains(matrix.os, 'windows')
with:
msbuild-architecture: ${{ matrix.target }}
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,30 @@
"type": "git",
"url": "https://github.com/TryGhost/node-sqlite3.git"
},
"engines": {
"node": ">=18"
},
"dependencies": {
"bindings": "^1.5.0",
"node-addon-api": "^7.0.0",
"node-addon-api": "^8.0.0",
"prebuild-install": "^7.1.1",
"tar": "^6.1.11"
"tar": "^7.0.0"
},
"devDependencies": {
"eslint": "8.56.0",
"mocha": "10.2.0",
"prebuild": "12.1.0"
"mocha": "10.4.0",
"prebuild": "13.0.0"
},
"peerDependencies": {
"node-gyp": "8.x"
"node-gyp": "^10.x"
},
"peerDependenciesMeta": {
"node-gyp": {
"optional": true
}
},
"optionalDependencies": {
"node-gyp": "8.x"
"node-gyp": "^10.x"
},
"scripts": {
"install": "prebuild-install -r napi || node-gyp rebuild",
Expand Down
3 changes: 2 additions & 1 deletion tools/BinaryBuilder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ RUN if case $VARIANT in "alpine"*) true;; *) false;; esac; then apk add build-ba
WORKDIR /usr/src/build

COPY . .
RUN npm install --ignore-scripts

RUN npm install --ignore-scripts --maxsockets=1

ENV CFLAGS="${CFLAGS:-} -include ../src/gcc-preinclude.h"
ENV CXXFLAGS="${CXXFLAGS:-} -include ../src/gcc-preinclude.h"
Expand Down
3 changes: 1 addition & 2 deletions tools/semver-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const fs = require('fs');
const path = require('path');
const semver = require('semver');

const supportedVersions = '10.12.0';
const supportedVersions = process.versions.node;

function checkEngines(modulePath) {
const packageJsonPath = path.join(modulePath, 'package.json');
Expand Down Expand Up @@ -30,4 +30,3 @@ for (const dependency of allDependencies) {
const modulePath = path.join(__dirname, '..', 'node_modules', dependency);
checkEngines(modulePath);
}