Skip to content

Commit 718bfb2

Browse files
Merge pull request #183 from julianmesa-gitkraken/update-CI-and-packages
Update ci and packages
2 parents 13a84d9 + 30bdf10 commit 718bfb2

File tree

7 files changed

+683
-1078
lines changed

7 files changed

+683
-1078
lines changed

.github/workflows/tests.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@ jobs:
1313
name: "Linux Tests"
1414
strategy:
1515
matrix:
16-
container: ["centos:7", "ubuntu:18.04"]
17-
node: [12, 14]
16+
container: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
17+
node: [18, 20, 22]
1818
runs-on: ubuntu-latest
1919
container:
2020
image: ${{ matrix.container }}
21+
env:
22+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
2123
steps:
22-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2325

2426
- name: Use Node.js ${{ matrix.node }}
25-
uses: actions/setup-node@v2
27+
uses: actions/setup-node@v4
2628
with:
2729
node-version: ${{ matrix.node }}
2830
check-latest: true
@@ -47,13 +49,13 @@ jobs:
4749
name: "MacOS Tests"
4850
strategy:
4951
matrix:
50-
node: [12, 14]
52+
node: [18, 20, 22]
5153
runs-on: macOS-latest
5254
steps:
53-
- uses: actions/checkout@v2
55+
- uses: actions/checkout@v4
5456

5557
- name: Use Node.js ${{ matrix.node }}
56-
uses: actions/setup-node@v2
58+
uses: actions/setup-node@v4
5759
with:
5860
node-version: ${{ matrix.node }}
5961
check-latest: true
@@ -67,20 +69,18 @@ jobs:
6769
name: "Windows Tests"
6870
strategy:
6971
matrix:
70-
node: [12, 14]
72+
node: [18, 20, 22]
7173
runs-on: windows-latest
7274
steps:
73-
- uses: actions/checkout@v2
75+
- uses: actions/checkout@v4
7476

7577
- name: Use Node.js ${{ matrix.node }}
76-
uses: actions/setup-node@v2
78+
uses: actions/setup-node@v4
7779
with:
7880
node-version: ${{ matrix.node }}
7981
check-latest: true
8082

8183
- run: |
8284
npm install --global yarn
83-
npm install --global [email protected]
84-
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
8585
yarn
8686
yarn test

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ lib
3131
# extraneous operating system items
3232
.DS_Store
3333

34+
# Visual Studio Code
35+
.vscode/
36+
37+
# IntelliJ WebStorm
38+
.idea/
39+
3440
# ignore test folders
3541
nsfw-stress-test
3642
mockfs

binding.gyp

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
],
1010
"include_dirs": [
1111
"includes",
12-
"<!@(node -p \"require('node-addon-api').include\")"
12+
"<!(node -p \"require('node-addon-api').include_dir\")"
1313
],
1414
"cflags!": ["-fno-exceptions"],
1515
"cflags_cc!": ["-fno-exceptions"],
@@ -29,10 +29,10 @@
2929
],
3030
"msvs_settings": {
3131
"VCCLCompilerTool": {
32-
"DisableSpecificWarnings": [ "4506", "4538", "4793" ]
32+
"DisableSpecificWarnings": [ ]
3333
},
3434
"VCLinkerTool": {
35-
"AdditionalOptions": [ "/ignore:4248" ]
35+
"AdditionalOptions": [ ]
3636
}
3737
}
3838
}],

includes/win32/Watcher.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ class Watcher
3737
void resizeBuffers(std::size_t size);
3838

3939
std::string getUTF8Directory(std::wstring path) ;
40-
bool Watcher::isExcluded(const std::wstring &fileName);
40+
bool isExcluded(const std::wstring &fileName);
4141

42-
std::wstring Watcher::getWatchedPathFromHandle();
43-
void Watcher::checkWatchedPath();
42+
std::wstring getWatchedPathFromHandle();
43+
void checkWatchedPath();
4444

4545
std::atomic<bool> mRunning;
4646
SingleshotSemaphore mHasStartedSemaphore;

js/scripts/test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ const cp = require('child_process');
33
if (process.platform !== 'win32' && process.platform !== 'darwin') {
44
// When ran as a npm script we can invoke npm bins such as node-gyp and mocha directly
55
exec('node-gyp rebuild', { env: { ...process.env, NSFW_TEST_SLOW: 1 } });
6-
exec('mocha --exit --expose-gc js/spec/index-slow-spec.js');
6+
exec('mocha --exit --v8-expose-gc js/spec/index-slow-spec.js');
77
exec('node-gyp rebuild');
88
}
9-
exec('mocha --exit --expose-gc js/spec/index-spec.js');
9+
exec('mocha --exit --v8-expose-gc js/spec/index-spec.js');
1010

1111
/**
1212
* @param {string} commandline ...

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@
3030
],
3131
"homepage": "https://github.com/axosoft/node-simple-file-watcher",
3232
"dependencies": {
33-
"node-addon-api": "^5.0.0"
33+
"node-addon-api": "*"
3434
},
3535
"devDependencies": {
36-
"eslint": "^6.8.0",
36+
"eslint": "8.x",
3737
"executive": "^1.6.3",
38-
"fs-extra": "^7.0.0",
39-
"mocha": "^7.1.1"
38+
"fs-extra": "^11.2.0",
39+
"globals": "^15.8.0",
40+
"mocha": "^10.6.0"
4041
},
4142
"keywords": [
4243
"FileWatcher",

0 commit comments

Comments
 (0)