@graphql-tools/mock 9.0.21 → 9.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/MockStore.js CHANGED
@@ -173,12 +173,12 @@ class MockStore {
173
173
  if (typeName === '__proto__' || typeName === 'constructor' || typeName === 'prototype') {
174
174
  throw new Error(`Invalid typeName: ${typeName}`);
175
175
  }
176
- if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
177
- throw new Error(`Invalid key: ${key}`);
178
- }
179
176
  if (this.store[typeName] === undefined) {
180
177
  this.store[typeName] = {};
181
178
  }
179
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
180
+ throw new Error(`Invalid key: ${key}`);
181
+ }
182
182
  if (this.store[typeName][key] === undefined) {
183
183
  this.store[typeName][key] = {};
184
184
  }
@@ -295,9 +295,15 @@ class MockStore {
295
295
  noOverride,
296
296
  });
297
297
  }
298
+ if (typeName === '__proto__' || typeName === 'constructor' || typeName === 'prototype') {
299
+ throw new Error(`Invalid typeName: ${typeName}`);
300
+ }
298
301
  if (this.store[typeName] === undefined) {
299
302
  this.store[typeName] = {};
300
303
  }
304
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
305
+ throw new Error(`Invalid key: ${key}`);
306
+ }
301
307
  if (this.store[typeName][key] === undefined) {
302
308
  this.store[typeName][key] = {};
303
309
  }
package/esm/MockStore.js CHANGED
@@ -168,12 +168,12 @@ export class MockStore {
168
168
  if (typeName === '__proto__' || typeName === 'constructor' || typeName === 'prototype') {
169
169
  throw new Error(`Invalid typeName: ${typeName}`);
170
170
  }
171
- if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
172
- throw new Error(`Invalid key: ${key}`);
173
- }
174
171
  if (this.store[typeName] === undefined) {
175
172
  this.store[typeName] = {};
176
173
  }
174
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
175
+ throw new Error(`Invalid key: ${key}`);
176
+ }
177
177
  if (this.store[typeName][key] === undefined) {
178
178
  this.store[typeName][key] = {};
179
179
  }
@@ -290,9 +290,15 @@ export class MockStore {
290
290
  noOverride,
291
291
  });
292
292
  }
293
+ if (typeName === '__proto__' || typeName === 'constructor' || typeName === 'prototype') {
294
+ throw new Error(`Invalid typeName: ${typeName}`);
295
+ }
293
296
  if (this.store[typeName] === undefined) {
294
297
  this.store[typeName] = {};
295
298
  }
299
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
300
+ throw new Error(`Invalid key: ${key}`);
301
+ }
296
302
  if (this.store[typeName][key] === undefined) {
297
303
  this.store[typeName][key] = {};
298
304
  }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@graphql-tools/mock",
3
- "version": "9.0.21",
3
+ "version": "9.0.22",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
7
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
8
8
  },
9
9
  "dependencies": {
10
- "@graphql-tools/schema": "^10.0.22",
11
- "@graphql-tools/utils": "^10.8.5",
10
+ "@graphql-tools/schema": "^10.0.23",
11
+ "@graphql-tools/utils": "^10.8.6",
12
12
  "fast-json-stable-stringify": "^2.1.0",
13
13
  "tslib": "^2.4.0"
14
14
  },