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

Update ci and packages #183

Merged
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
24 changes: 12 additions & 12 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ jobs:
name: "Linux Tests"
strategy:
matrix:
container: ["centos:7", "ubuntu:18.04"]
node: [12, 14]
container: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
node: [18, 20, 22]
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true
Expand All @@ -47,13 +49,13 @@ jobs:
name: "MacOS Tests"
strategy:
matrix:
node: [12, 14]
node: [18, 20, 22]
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true
Expand All @@ -67,20 +69,18 @@ jobs:
name: "Windows Tests"
strategy:
matrix:
node: [12, 14]
node: [18, 20, 22]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true

- run: |
npm install --global yarn
npm install --global node-gyp@9.0.0
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
yarn
yarn test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ lib
# extraneous operating system items
.DS_Store

# Visual Studio Code
.vscode/

# IntelliJ WebStorm
.idea/

# ignore test folders
nsfw-stress-test
mockfs
Expand Down
6 changes: 3 additions & 3 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"include_dirs": [
"includes",
"<!@(node -p \"require('node-addon-api').include\")"
"<!(node -p \"require('node-addon-api').include_dir\")"
],
"cflags!": ["-fno-exceptions"],
"cflags_cc!": ["-fno-exceptions"],
Expand All @@ -29,10 +29,10 @@
],
"msvs_settings": {
"VCCLCompilerTool": {
"DisableSpecificWarnings": [ "4506", "4538", "4793" ]
"DisableSpecificWarnings": [ ]
},
"VCLinkerTool": {
"AdditionalOptions": [ "/ignore:4248" ]
"AdditionalOptions": [ ]
}
}
}],
Expand Down
6 changes: 3 additions & 3 deletions includes/win32/Watcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ class Watcher
void resizeBuffers(std::size_t size);

std::string getUTF8Directory(std::wstring path) ;
bool Watcher::isExcluded(const std::wstring &fileName);
bool isExcluded(const std::wstring &fileName);

std::wstring Watcher::getWatchedPathFromHandle();
void Watcher::checkWatchedPath();
std::wstring getWatchedPathFromHandle();
void checkWatchedPath();

std::atomic<bool> mRunning;
SingleshotSemaphore mHasStartedSemaphore;
Expand Down
4 changes: 2 additions & 2 deletions js/scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ const cp = require('child_process');
if (process.platform !== 'win32' && process.platform !== 'darwin') {
// When ran as a npm script we can invoke npm bins such as node-gyp and mocha directly
exec('node-gyp rebuild', { env: { ...process.env, NSFW_TEST_SLOW: 1 } });
exec('mocha --exit --expose-gc js/spec/index-slow-spec.js');
exec('mocha --exit --v8-expose-gc js/spec/index-slow-spec.js');
exec('node-gyp rebuild');
}
exec('mocha --exit --expose-gc js/spec/index-spec.js');
exec('mocha --exit --v8-expose-gc js/spec/index-spec.js');

/**
* @param {string} commandline ...
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
],
"homepage": "https://github.com/axosoft/node-simple-file-watcher",
"dependencies": {
"node-addon-api": "^5.0.0"
"node-addon-api": "*"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint": "8.x",
"executive": "^1.6.3",
"fs-extra": "^7.0.0",
"mocha": "^7.1.1"
"fs-extra": "^11.2.0",
"globals": "^15.8.0",
"mocha": "^10.6.0"
},
"keywords": [
"FileWatcher",
Expand Down
Loading