fix(install): lifecycle script changes (#8943)

* empty trustedDependencies

* tests

* handle edgecases with default trusted dependencies

* could be zero length

* --trusted and skipped scripts

* resolver too

* second run --trusted

* --trust, better formatting

* more tests

* --trusted applies to dep deps, more tests

* progress

* fix build

* fix crash, make it look good, comments

* alphabetize, verbose log

* feature flag

* update lockfile

* update skipped text

* check update requests first

* be more careful with inline strings

* only with scripts

* fix tests, todo tests

* fix another test

* fix merge

* fix fix merge

* check binding.gyp for tarball and git resolutions

* remove dead code

* debug assert

* move newline printing

* use enum for `__has_install_script`

* oops

* clone packages

* Update src/install/install.zig

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
Dylan Conway
2024-03-07 19:22:21 -08:00
committed by GitHub
parent a927340ce3
commit d37fbbd4e0
24 changed files with 2648 additions and 523 deletions

View File

@@ -258,6 +258,18 @@ fn HashMapMixin(
return self.hasContext(key, undefined);
}
pub fn hasWithHash(self: *Self, key_hash: u64) bool {
assert(key_hash != Self.empty_hash);
for (self.entries[key_hash >> self.shift ..]) |entry| {
if (entry.hash >= key_hash) {
return entry.hash == key_hash;
}
}
return false;
}
pub fn hasContext(self: *Self, key: K, ctx: Context) bool {
const hash = ctx.hash(key);
assert(hash != Self.empty_hash);