Fix for PR #382 [scuttling]#391
Merged
Merged
Conversation
naugtur
approved these changes
Oct 31, 2022
Member
|
@weizman nice catch - sorry to introduce this bug |
Member
|
this change reintroduces the exceptions, we shouldn't need exceptions for normal usage. in the case that we need them for the kernel, we should capture before scuttling and pull it from there |
kumavis
approved these changes
Nov 7, 2022
Member
|
since directories are modified after install, tests may break if deps change |
legobeat
added a commit
that referenced
this pull request
May 30, 2023
c4857f3 browserify,node,tofu,viz: bump @babel packages to latest d557312 devDeps: eslint@^7.32.0->^8.40.0; plugins; lint:fix (#568) 93e1d2a devDeps: minor bump eslint packages (#568) 85a6ae2 core/version - 14.1.0 ccdd3d6 node/deps: yargs@16->17 73e54f6 deps: node-gyp-build@4.2.3->4.6.0 849f288 node/deps: json-stable-stringify@^1.0.1->^1.0.2 e0bf366 node/deps: remove object.fromentries (#555) 82beffa restrict engines.node to < 19.0.0 ced99e5 Bump minimatch from 3.0.4 to 3.1.2 in /packages/node/examples/express d5de5d5 drop uneeded additionalOpts arg and migrate back into using scenario object (#471) dc027eb core/version - 14.0.0 9a4759e node: yarn test:prep: force NODE_ENV=development for test projects setup 1de0a17 core/version - 13.0.0 23a9b06 Bump decode-uri-component in /packages/node/examples/express ec1c9b7 Bump decode-uri-component in /packages/node/test/projects/2 d8ea54f Bump express from 4.17.1 to 4.17.3 in /packages/node/examples/express 73dec5d Bump versions for core/lavapack/browserify (#431) 28e98d4 Bump minimatch from 3.0.4 to 3.1.2 in /packages/node/test/projects/2 e12aedd lint:fix 190391a fix: remove redundant engine entries from package.json (#411) 536e663 Less scary warning in README.md? (#403) 084fbb6 Improve eslint (#409) cee9caf Bump minimum nodejs version to 14.0.0 e90070f Fix for PR #382 [scuttling] (#391)
legobeat
added a commit
that referenced
this pull request
May 30, 2023
c4857f3 browserify,node,tofu,viz: bump @babel packages to latest d557312 devDeps: eslint@^7.32.0->^8.40.0; plugins; lint:fix (#568) 93e1d2a devDeps: minor bump eslint packages (#568) 85a6ae2 core/version - 14.1.0 ccdd3d6 node/deps: yargs@16->17 73e54f6 deps: node-gyp-build@4.2.3->4.6.0 849f288 node/deps: json-stable-stringify@^1.0.1->^1.0.2 e0bf366 node/deps: remove object.fromentries (#555) 82beffa restrict engines.node to < 19.0.0 ced99e5 Bump minimatch from 3.0.4 to 3.1.2 in /packages/node/examples/express d5de5d5 drop uneeded additionalOpts arg and migrate back into using scenario object (#471) dc027eb core/version - 14.0.0 9a4759e node: yarn test:prep: force NODE_ENV=development for test projects setup 1de0a17 core/version - 13.0.0 23a9b06 Bump decode-uri-component in /packages/node/examples/express ec1c9b7 Bump decode-uri-component in /packages/node/test/projects/2 d8ea54f Bump express from 4.17.1 to 4.17.3 in /packages/node/examples/express 73dec5d Bump versions for core/lavapack/browserify (#431) 28e98d4 Bump minimatch from 3.0.4 to 3.1.2 in /packages/node/test/projects/2 e12aedd lint:fix 190391a fix: remove redundant engine entries from package.json (#411) 536e663 Less scary warning in README.md? (#403) 084fbb6 Improve eslint (#409) cee9caf Bump minimum nodejs version to 14.0.0 e90070f Fix for PR #382 [scuttling] (#391)
legobeat
added a commit
that referenced
this pull request
Jun 2, 2023
c4857f3 browserify,node,tofu,viz: bump @babel packages to latest d557312 devDeps: eslint@^7.32.0->^8.40.0; plugins; lint:fix (#568) 93e1d2a devDeps: minor bump eslint packages (#568) 85a6ae2 core/version - 14.1.0 ccdd3d6 node/deps: yargs@16->17 73e54f6 deps: node-gyp-build@4.2.3->4.6.0 849f288 node/deps: json-stable-stringify@^1.0.1->^1.0.2 e0bf366 node/deps: remove object.fromentries (#555) 82beffa restrict engines.node to < 19.0.0 ced99e5 Bump minimatch from 3.0.4 to 3.1.2 in /packages/node/examples/express d5de5d5 drop uneeded additionalOpts arg and migrate back into using scenario object (#471) dc027eb core/version - 14.0.0 9a4759e node: yarn test:prep: force NODE_ENV=development for test projects setup 1de0a17 core/version - 13.0.0 23a9b06 Bump decode-uri-component in /packages/node/examples/express ec1c9b7 Bump decode-uri-component in /packages/node/test/projects/2 d8ea54f Bump express from 4.17.1 to 4.17.3 in /packages/node/examples/express 73dec5d Bump versions for core/lavapack/browserify (#431) 28e98d4 Bump minimatch from 3.0.4 to 3.1.2 in /packages/node/test/projects/2 e12aedd lint:fix 190391a fix: remove redundant engine entries from package.json (#411) 536e663 Less scary warning in README.md? (#403) 084fbb6 Improve eslint (#409) cee9caf Bump minimum nodejs version to 14.0.0 e90070f Fix for PR #382 [scuttling] (#391)
legobeat
added a commit
that referenced
this pull request
Jun 2, 2023
c4857f3 browserify,node,tofu,viz: bump @babel packages to latest d557312 devDeps: eslint@^7.32.0->^8.40.0; plugins; lint:fix (#568) 93e1d2a devDeps: minor bump eslint packages (#568) 85a6ae2 core/version - 14.1.0 ccdd3d6 node/deps: yargs@16->17 73e54f6 deps: node-gyp-build@4.2.3->4.6.0 849f288 node/deps: json-stable-stringify@^1.0.1->^1.0.2 e0bf366 node/deps: remove object.fromentries (#555) 82beffa restrict engines.node to < 19.0.0 ced99e5 Bump minimatch from 3.0.4 to 3.1.2 in /packages/node/examples/express d5de5d5 drop uneeded additionalOpts arg and migrate back into using scenario object (#471) dc027eb core/version - 14.0.0 9a4759e node: yarn test:prep: force NODE_ENV=development for test projects setup 1de0a17 core/version - 13.0.0 23a9b06 Bump decode-uri-component in /packages/node/examples/express ec1c9b7 Bump decode-uri-component in /packages/node/test/projects/2 d8ea54f Bump express from 4.17.1 to 4.17.3 in /packages/node/examples/express 73dec5d Bump versions for core/lavapack/browserify (#431) 28e98d4 Bump minimatch from 3.0.4 to 3.1.2 in /packages/node/test/projects/2 e12aedd lint:fix 190391a fix: remove redundant engine entries from package.json (#411) 536e663 Less scary warning in README.md? (#403) 084fbb6 Improve eslint (#409) cee9caf Bump minimum nodejs version to 14.0.0 e90070f Fix for PR #382 [scuttling] (#391)
legobeat
added a commit
that referenced
this pull request
Jun 2, 2023
- fix: Node.js 18 compatibility (#551) - deps: lavamoat-core@^12.3.0->^14.1.1 - deps: bump @babel packages to latest (#587) - deps: bump json-stable-stringify, node-gyp-build, resolve, yargs (#556) - deps: remove object.fromentries (#555) - change: BREAKING: Minimum Node.js version 14 (#398) - fix: Properly add scuttling functionality (#382, #391) - change: update examples
Merged
boneskull
pushed a commit
to boneskull/LavaMoat
that referenced
this pull request
Feb 6, 2024
- fix: Node.js 18 compatibility (LavaMoat#551) - deps: lavamoat-core@^12.3.0->^14.1.1 - deps: bump @babel packages to latest (LavaMoat#587) - deps: bump json-stable-stringify, node-gyp-build, resolve, yargs (LavaMoat#556) - deps: remove object.fromentries (LavaMoat#555) - change: BREAKING: Minimum Node.js version 14 (LavaMoat#398) - fix: Properly add scuttling functionality (LavaMoat#382, LavaMoat#391) - change: update examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1) Fix the bug
PR #382 code modifications introduce a bug where the array of props to scuttle is no longer an array of props but an array of arrays of props:
This canceled scuttling completely, because instead of attempting to redefine a certain property
my_prop:We ended up with:
commit introducing the bug reference
2) Improve and fix tests to work with scuttling feature for packages
browserify,core,nodeTests infra was not compatible to work in scuttling mode, and the browserify infra required further adjustments to serve us in the future more simply:
runScenarioscalls so that each scenario will determine for itself whether to apply scuttling mode or not (instead of current situation where scuttling can be turned on/off only for all scenarios)core/node/lavapack/browserifydeps rather than the ones from npm (made it very hard to test modifications to bothbrowserifypackage and another package in a single pr)scuttleGlobalThisExceptionsarg)__lavamoatDebugOptions__and__lavamoatSecurityOptions__and only replace the__lavamoatSecurityOptions__placeholder if was explicitly required (this is because bothlavapackandcorecan set__lavamoatSecurityOptions__, but since one uses the other potentially, then one must sometimes skip the replacement in order to allow the other to successfully set it)LavaPackfrom theavoidForLavaMoatCompatibility, and freeze it instead to @kumavis's request