Skip to content

Commit

Permalink
fix: ignore node_gyp_bins if it exists (#1391)
Browse files Browse the repository at this point in the history
  • Loading branch information
VerteDinde committed Aug 11, 2022
1 parent a6db65f commit b0f27bc
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/copy-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const DEFAULT_IGNORES = [
'/yarn\\.lock$',
'/\\.git($|/)',
'/node_modules/\\.bin($|/)',
'\\.o(bj)?$'
'\\.o(bj)?$',
'/node_gyp_bins($|/)'
]

function populateIgnoredPaths (opts) {
Expand Down
1 change: 1 addition & 0 deletions test/copy-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ test('generateIgnoredOutDirs ignores all possible platform/arch permutations', (
t.is(ignores.length, util.allPlatformArchCombosCount)
})

test('ignore default: node_gyp_bins files', util.testSinglePlatform(ignoreTest, null, 'node_gyp_bins'))
test('ignore default: .o files', util.testSinglePlatform(ignoreTest, null, 'ignore.o'))
test('ignore default: .obj files', util.testSinglePlatform(ignoreTest, null, 'ignore.obj'))
test('ignore default: package manager lock files', util.testSinglePlatform(async (t, opts) => {
Expand Down
3 changes: 2 additions & 1 deletion test/darwin.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,11 @@ if (!(process.env.CI && process.platform === 'win32')) {
const finalPath = (await packager(opts))[0]
const plistObj = await parseInfoPlist(t, opts, finalPath)
t.is(typeof plistObj.ElectronAsarIntegrity, 'object')
// Note: If updating thr basic app fixture (used here in baseOpts), ths hash should also be updated.
t.deepEqual(plistObj.ElectronAsarIntegrity, {
'Resources/app.asar': {
algorithm: 'SHA256',
hash: '27f2dba4273f6c119000ec7059c27d86e27306d5dbbb83cfdfb862d92c679574'
hash: '2ef4c03f6fc8adf03f782b40fddcfcdd26d1f3f3669ecedffeea5de5d28897c3'
}
})
}))
Expand Down
Empty file.
1 change: 1 addition & 0 deletions test/fixtures/basic/node_modules/ffi-napi/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion test/fixtures/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"devDependencies": {
"ncp": "^2.0.0",
"run-waterfall": "^1.1.1",
"electron-prebuilt": "1.4.13"
"electron-prebuilt": "1.4.13",
"ffi-napi": "4.0.3"
}
}

0 comments on commit b0f27bc

Please sign in to comment.