Skip to content

Commit

Permalink
test: Nevermind, go with a simple module
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrieseberg committed Oct 8, 2024
1 parent 63ac94e commit 8a12916
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 65 deletions.
2 changes: 1 addition & 1 deletion test/fixture/native-app1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@types/node": "^12.0.10",
"better-sqlite3": "11.3.0"
"windows-active-process": "1.1.1"
},
"dependencies": {
"@newrelic/native-metrics": "5.3.0",
Expand Down
63 changes: 8 additions & 55 deletions test/fixture/native-app1/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,7 @@ bcrypt@5.0.0:
node-addon-api "^3.0.0"
node-pre-gyp "0.15.0"

better-sqlite3@11.3.0:
version "11.3.0"
resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-11.3.0.tgz#f10b32ddff665c33176d148e707bd1e57dfd0284"
integrity sha512-iHt9j8NPYF3oKCNOO5ZI4JwThjt3Z6J6XrcwG85VNMVzv1ByqrHWv5VILEbCMFWDsoHhXvQ7oC8vgRXFAKgl9w==
dependencies:
bindings "^1.5.0"
prebuild-install "^7.1.1"

bindings@^1.2.1, bindings@^1.3.0, bindings@^1.5.0:
bindings@^1.2.1, bindings@^1.3.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df"
integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==
Expand Down Expand Up @@ -292,13 +284,6 @@ decompress-response@^4.2.0:
dependencies:
mimic-response "^2.0.0"

decompress-response@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc"
integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==
dependencies:
mimic-response "^3.1.0"

deep-extend@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
Expand Down Expand Up @@ -747,11 +732,6 @@ mimic-response@^2.0.0:
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43"
integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==

mimic-response@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9"
integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==

minimatch@^3.0.4, minimatch@^3.1.1:
version "3.1.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
Expand Down Expand Up @@ -913,13 +893,6 @@ node-abi@^2.21.0:
dependencies:
semver "^5.4.1"

node-abi@^3.3.0:
version "3.68.0"
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.68.0.tgz#8f37fb02ecf4f43ebe694090dcb52e0c4cc4ba25"
integrity sha512-7vbj10trelExNjFSBm5kTvZXXa7pZyKWx9RCKIyqe6I9Ev3IzGpQoqBP3a+cOdxY+pWj6VkP28n/2wWysBHD/A==
dependencies:
semver "^7.3.5"

node-addon-api@^1.6.2:
version "1.7.2"
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d"
Expand Down Expand Up @@ -1116,24 +1089,6 @@ prebuild-install@^6.0.1:
tar-fs "^2.0.0"
tunnel-agent "^0.6.0"

prebuild-install@^7.1.1:
version "7.1.2"
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.2.tgz#a5fd9986f5a6251fbc47e1e5c65de71e68c0a056"
integrity sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==
dependencies:
detect-libc "^2.0.0"
expand-template "^2.0.3"
github-from-package "0.0.0"
minimist "^1.2.3"
mkdirp-classic "^0.5.3"
napi-build-utils "^1.0.1"
node-abi "^3.3.0"
pump "^3.0.0"
rc "^1.2.7"
simple-get "^4.0.0"
tar-fs "^2.0.0"
tunnel-agent "^0.6.0"

process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
Expand Down Expand Up @@ -1284,15 +1239,6 @@ simple-get@^3.0.3:
once "^1.3.1"
simple-concat "^1.0.0"

simple-get@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543"
integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==
dependencies:
decompress-response "^6.0.0"
once "^1.3.1"
simple-concat "^1.0.0"

smart-buffer@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae"
Expand Down Expand Up @@ -1493,6 +1439,13 @@ wide-align@^1.1.0, wide-align@^1.1.2, wide-align@^1.1.5:
dependencies:
string-width "^1.0.2 || 2 || 3 || 4"

windows-active-process@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/windows-active-process/-/windows-active-process-1.1.1.tgz#e64605d8a3f6d8811ea290fdbcec3f885e41f11c"
integrity sha512-L/ZF2JxmqQZxp8gPWTu4BOLsVms/ykZVdkkfQj4xtXvZiPOqRAiuI5gvjQS6WfXcRpSm6j8HrgB1KyG9/I2Mcg==
dependencies:
bindings "^1.2.1"

wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
Expand Down
18 changes: 9 additions & 9 deletions test/rebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('rebuilder', () => {
});

it('should not have rebuilt top level devDependencies', async () => {
await expectNativeModuleToNotBeRebuilt(testModulePath, 'better-sqlite3');
await expectNativeModuleToNotBeRebuilt(testModulePath, 'windows-active-process');
});

it('should not download files in the module directory', async () => {
Expand Down Expand Up @@ -169,7 +169,7 @@ describe('rebuilder', () => {
buildPath: testModulePath,
electronVersion: testElectronVersion,
arch: process.arch,
onlyModules: ['better-sqlite3', 'ref-napi'], // TODO: check to see if there's a bug with scoped modules
onlyModules: ['windows-active-process', 'ref-napi'], // TODO: check to see if there's a bug with scoped modules
force: true
});
let built = 0;
Expand All @@ -185,17 +185,17 @@ describe('rebuilder', () => {
before(async () => await resetTestModule(testModulePath));
after(async() => await cleanupTestModule(testModulePath));

it('should have rebuilt better-sqlite3 module in Debug mode', async () => {
it('should have rebuilt windows-active-process module in Debug mode', async () => {
await rebuild({
buildPath: testModulePath,
electronVersion: testElectronVersion,
arch: process.arch,
onlyModules: ['better-sqlite3'],
onlyModules: ['windows-active-process'],
force: true,
debug: true
});
await expectNativeModuleToBeRebuilt(testModulePath, 'better-sqlite3', { buildType: 'Debug' });
await expectNativeModuleToNotBeRebuilt(testModulePath, 'better-sqlite3');
await expectNativeModuleToBeRebuilt(testModulePath, 'windows-active-process', { buildType: 'Debug' });
await expectNativeModuleToNotBeRebuilt(testModulePath, 'windows-active-process');
});
});

Expand All @@ -205,16 +205,16 @@ describe('rebuilder', () => {
before(async () => await resetTestModule(testModulePath));
after(async() => await cleanupTestModule(testModulePath));

it('should have rebuilt better-sqlite3 module using clang mode', async () => {
it('should have rebuilt windows-active-process module using clang mode', async () => {
await rebuild({
buildPath: testModulePath,
electronVersion: testElectronVersion,
arch: process.arch,
onlyModules: ['better-sqlite3'],
onlyModules: ['windows-active-process'],
force: true,
useElectronClang: true
});
await expectNativeModuleToBeRebuilt(testModulePath, 'better-sqlite3');
await expectNativeModuleToBeRebuilt(testModulePath, 'windows-active-process');
});
});
});

0 comments on commit 8a12916

Please sign in to comment.