Skip to content

Commit

Permalink
DO NOT MERGE experiment: what if we rebuild yarn.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jun 24, 2023
1 parent 0b7ec35 commit 9552d7f
Show file tree
Hide file tree
Showing 10 changed files with 1,521 additions and 1,238 deletions.
2 changes: 2 additions & 0 deletions packages/swing-store/src/swingStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ export function makeSwingStoreExporter(dirPath, exportMode = 'current') {
async function* getExportData() {
const kvPairs = sqlGetAllKVData.iterate();
for (const kv of kvPairs) {
// @ts-expect-error yark.lock update causes "Object is of type 'unknown'"
if (getKeyType(kv.key) === 'consensus') {
// @ts-expect-error yark.lock update causes "Object is of type 'unknown'"
yield [`kv.${kv.key}`, kv.value];
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/swing-store/test/test-snapstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ test('compress to cache file; closes snapshot stream', async t => {
sqlGetSnapshot.pluck(true);
const snapshotGZ = sqlGetSnapshot.get(hash);
t.truthy(snapshotGZ);
// @ts-expect-error yark.lock update causes "Object is of type 'unknown'"
const contents = zlib.gunzipSync(snapshotGZ);
t.is(contents.toString(), 'abc', 'gunzip(contents) matches original');
const logInfo = { vatID: 'fakeVatID', ...exportInfo };
Expand Down
24 changes: 0 additions & 24 deletions patches/bl++readable-stream+3.6.1.patch

This file was deleted.

32 changes: 32 additions & 0 deletions patches/commander+10.0.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff --git a/node_modules/commander/lib/error.js b/node_modules/commander/lib/error.js
index e7cde9c..3a1b078 100644
--- a/node_modules/commander/lib/error.js
+++ b/node_modules/commander/lib/error.js
@@ -16,7 +16,12 @@ class CommanderError extends Error {
super(message);
// properly capture stack trace in Node.js
Error.captureStackTrace(this, this.constructor);
- this.name = this.constructor.name;
+ Object.defineProperty(this, 'name', {
+ value: this.constructor.name,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
this.code = code;
this.exitCode = exitCode;
this.nestedError = undefined;
@@ -37,7 +42,12 @@ class InvalidArgumentError extends CommanderError {
super(1, 'commander.invalidArgument', message);
// properly capture stack trace in Node.js
Error.captureStackTrace(this, this.constructor);
- this.name = this.constructor.name;
+ Object.defineProperty(this, 'name', {
+ value: this.constructor.name,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
}
}

File renamed without changes.
44 changes: 44 additions & 0 deletions patches/follow-redirects+1.15.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/node_modules/follow-redirects/index.js b/node_modules/follow-redirects/index.js
index 3e199c1..c0335aa 100644
--- a/node_modules/follow-redirects/index.js
+++ b/node_modules/follow-redirects/index.js
@@ -578,15 +578,35 @@ function createErrorType(code, message, baseClass) {
// Create constructor
function CustomError(properties) {
Error.captureStackTrace(this, this.constructor);
- Object.assign(this, properties || {});
+ Object.defineProperties(
+ this,
+ Object.getOwnPropertyDescriptors(properties || {})
+ );
this.code = code;
- this.message = this.cause ? message + ": " + this.cause.message : message;
+ Object.defineProperty(this, 'message', {
+ value: this.cause ? message + ": " + this.cause.message : message,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
}

// Attach constructor and set default properties
CustomError.prototype = new (baseClass || Error)();
- CustomError.prototype.constructor = CustomError;
- CustomError.prototype.name = "Error [" + code + "]";
+ Object.defineProperties(CustomError.prototype, {
+ constructor: {
+ value: CustomError,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ },
+ name: {
+ value: "Error [" + code + "]",
+ writable: true,
+ enumerable: true,
+ configurable: true
+ }
+ });
return CustomError;
}

File renamed without changes.
17 changes: 17 additions & 0 deletions patches/readable-stream+3.6.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/node_modules/readable-stream/errors.js b/node_modules/readable-stream/errors.js
index 8471526..34307f3 100644
--- a/node_modules/readable-stream/errors.js
+++ b/node_modules/readable-stream/errors.js
@@ -21,6 +21,12 @@ function createErrorType(code, message, Base) {
}
}

+ Object.defineProperty(NodeError.prototype, 'name', {
+ value: Base.name,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
NodeError.prototype.name = Base.name;
NodeError.prototype.code = code;

2 changes: 1 addition & 1 deletion patches/rxjs+7.5.5.patch → patches/rxjs+7.8.1.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js b/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js
index 98a6e52..af7d91a 100644
index 98a6e52..815dd25 100644
--- a/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js
+++ b/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js
@@ -7,8 +7,18 @@ function createErrorClass(createImpl) {
Expand Down
Loading

0 comments on commit 9552d7f

Please sign in to comment.