@graphcommerce/next-config 9.1.0-canary.17 → 9.1.0-canary.19

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.1.0-canary.19
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2499](https://github.com/graphcommerce-org/graphcommerce/pull/2499) [`9cf0450`](https://github.com/graphcommerce-org/graphcommerce/commit/9cf0450a41c4c74292b96f5795c7428f9d6a930c) - Remove the 'ignored' string when loading the graphcommerce config env variable loading, as that isn't always correct ([@paales](https://github.com/paales))
8
+
9
+ ## 9.1.0-canary.18
10
+
11
+ ### Patch Changes
12
+
13
+ - [`62b71d5`](https://github.com/graphcommerce-org/graphcommerce/commit/62b71d5ed1d482fdb5b76dc19ac4d55fc41fb191) - Solve issue: TypeError: InMemoryLRUCache is not a constructor ([@paales](https://github.com/paales))
14
+
3
15
  ## 9.1.0-canary.17
4
16
 
5
17
  ## 9.1.0-canary.16
@@ -215,6 +215,30 @@ it('finds plugins', () => {
215
215
  "targetModule": "@graphcommerce/magento-product",
216
216
  "type": "component",
217
217
  },
218
+ {
219
+ "enabled": true,
220
+ "sourceExport": "OrderItem",
221
+ "sourceModule": "@graphcommerce/magento-product-downloadable/plugins/DownloadableOrderItem",
222
+ "targetExport": "OrderItem",
223
+ "targetModule": "@graphcommerce/magento-customer",
224
+ "type": "component",
225
+ },
226
+ {
227
+ "enabled": true,
228
+ "sourceExport": "InvoiceItem",
229
+ "sourceModule": "@graphcommerce/magento-product-downloadable/plugins/DownloadableInvoiceItem",
230
+ "targetExport": "InvoiceItem",
231
+ "targetModule": "@graphcommerce/magento-customer",
232
+ "type": "component",
233
+ },
234
+ {
235
+ "enabled": true,
236
+ "sourceExport": "CreditMemoItem",
237
+ "sourceModule": "@graphcommerce/magento-product-downloadable/plugins/DownloadableCreditMemoItem",
238
+ "targetExport": "CreditMemoItem",
239
+ "targetModule": "@graphcommerce/magento-customer",
240
+ "type": "component",
241
+ },
218
242
  {
219
243
  "enabled": true,
220
244
  "sourceExport": "CartItemActionCard",
@@ -231,6 +255,54 @@ it('finds plugins', () => {
231
255
  "targetModule": "@graphcommerce/magento-customer",
232
256
  "type": "component",
233
257
  },
258
+ {
259
+ "enabled": true,
260
+ "sourceExport": "cartItemToCartItemInput",
261
+ "sourceModule": "@graphcommerce/magento-product-bundle/plugins/Bundle_cartItemToCartItemInput",
262
+ "targetExport": "cartItemToCartItemInput",
263
+ "targetModule": "@graphcommerce/magento-cart-items",
264
+ "type": "function",
265
+ },
266
+ {
267
+ "enabled": true,
268
+ "sourceExport": "ShipmentItem",
269
+ "sourceModule": "@graphcommerce/magento-product-bundle/plugins/BundleShipmentItem",
270
+ "targetExport": "ShipmentItem",
271
+ "targetModule": "@graphcommerce/magento-customer",
272
+ "type": "component",
273
+ },
274
+ {
275
+ "enabled": true,
276
+ "sourceExport": "ProductPagePrice",
277
+ "sourceModule": "@graphcommerce/magento-product-bundle/plugins/BundleProductPagePrice",
278
+ "targetExport": "ProductPagePrice",
279
+ "targetModule": "@graphcommerce/magento-product",
280
+ "type": "component",
281
+ },
282
+ {
283
+ "enabled": true,
284
+ "sourceExport": "OrderItem",
285
+ "sourceModule": "@graphcommerce/magento-product-bundle/plugins/BundleOrderItem",
286
+ "targetExport": "OrderItem",
287
+ "targetModule": "@graphcommerce/magento-customer",
288
+ "type": "component",
289
+ },
290
+ {
291
+ "enabled": true,
292
+ "sourceExport": "InvoiceItem",
293
+ "sourceModule": "@graphcommerce/magento-product-bundle/plugins/BundleInvoiceItem",
294
+ "targetExport": "InvoiceItem",
295
+ "targetModule": "@graphcommerce/magento-customer",
296
+ "type": "component",
297
+ },
298
+ {
299
+ "enabled": true,
300
+ "sourceExport": "CreditMemoItem",
301
+ "sourceModule": "@graphcommerce/magento-product-bundle/plugins/BundleCreditMemoItem",
302
+ "targetExport": "CreditMemoItem",
303
+ "targetModule": "@graphcommerce/magento-customer",
304
+ "type": "component",
305
+ },
234
306
  {
235
307
  "enabled": true,
236
308
  "sourceExport": "CartItemActionCard",
@@ -247,6 +319,14 @@ it('finds plugins', () => {
247
319
  "targetModule": "@graphcommerce/magento-cart-items",
248
320
  "type": "component",
249
321
  },
322
+ {
323
+ "enabled": true,
324
+ "sourceExport": "AccountMenuItem",
325
+ "sourceModule": "@graphcommerce/magento-payment-tokens/plugins/PaymentTokensAccountMenuItem",
326
+ "targetExport": "AccountMenuItem",
327
+ "targetModule": "@graphcommerce/magento-customer",
328
+ "type": "component",
329
+ },
250
330
  {
251
331
  "enabled": true,
252
332
  "sourceExport": "PaymentMethodContextProvider",
@@ -468,6 +548,14 @@ it('finds plugins', () => {
468
548
  "targetModule": "@graphcommerce/magento-product-configurable",
469
549
  "type": "component",
470
550
  },
551
+ {
552
+ "enabled": true,
553
+ "sourceExport": "cartItemToCartItemInput",
554
+ "sourceModule": "@graphcommerce/magento-product-configurable/plugins/Configurable_cartItemToCartItemInput",
555
+ "targetExport": "cartItemToCartItemInput",
556
+ "targetModule": "@graphcommerce/magento-cart-items",
557
+ "type": "function",
558
+ },
471
559
  {
472
560
  "enabled": true,
473
561
  "sourceExport": "CartItemActionCard",
@@ -1,5 +1,4 @@
1
1
  import { resolveDependenciesSync, sortDependencies } from '../../src/utils/resolveDependenciesSync'
2
-
3
2
  const projectRoot = `${process.cwd()}/examples/magento-graphcms`
4
3
  it('It resolves and sorts dependencies beginning with the root example package and ending with the the packages used everywhere.', () => {
5
4
  const dependencies = resolveDependenciesSync(projectRoot)
@@ -23,6 +22,7 @@ it('It resolves and sorts dependencies beginning with the root example package a
23
22
  "@graphcommerce/magento-product-downloadable" => "packages/magento-product-downloadable",
24
23
  "@graphcommerce/magento-product-bundle" => "packages/magento-product-bundle",
25
24
  "@graphcommerce/magento-product-virtual" => "packages/magento-product-virtual",
25
+ "@graphcommerce/magento-payment-tokens" => "packages/magento-payment-tokens",
26
26
  "@graphcommerce/magento-payment-included" => "packages/magento-payment-included",
27
27
  "@graphcommerce/magento-newsletter" => "packages/magento-newsletter",
28
28
  "@graphcommerce/magento-graphql-rest" => "packages/magento-graphql-rest",
@@ -32,7 +32,6 @@ it('It resolves and sorts dependencies beginning with the root example package a
32
32
  "@graphcommerce/magento-cart-email" => "packages/magento-cart-email",
33
33
  "@graphcommerce/magento-cart-checkout" => "packages/magento-cart-checkout",
34
34
  "@graphcommerce/magento-cart-coupon" => "packages/magento-cart-coupon",
35
- "@graphcommerce/magento-cart-billing-address" => "packages/magento-cart-billing-address",
36
35
  "@graphcommerce/hygraph-dynamic-rows" => "packages/hygraph-dynamic-rows",
37
36
  "@graphcommerce/hygraph-ui" => "packages/hygraph-ui",
38
37
  "@graphcommerce/googletagmanager" => "packages/googletagmanager",
package/dist/index.js CHANGED
@@ -330,175 +330,145 @@ const demoConfig = {
330
330
  previewSecret: "SECRET"
331
331
  };
332
332
 
333
- /******************************************************************************
334
- Copyright (c) Microsoft Corporation.
335
-
336
- Permission to use, copy, modify, and/or distribute this software for any
337
- purpose with or without fee is hereby granted.
338
-
339
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
340
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
341
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
342
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
343
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
344
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
345
- PERFORMANCE OF THIS SOFTWARE.
346
- ***************************************************************************** */
347
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
348
-
349
-
350
333
  var __assign = function() {
351
- __assign = Object.assign || function __assign(t) {
352
- for (var s, i = 1, n = arguments.length; i < n; i++) {
353
- s = arguments[i];
354
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
355
- }
356
- return t;
334
+ __assign = Object.assign || function __assign2(t) {
335
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
336
+ s = arguments[i];
337
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
338
+ }
339
+ return t;
357
340
  };
358
341
  return __assign.apply(this, arguments);
359
342
  };
360
-
361
343
  function __spreadArray(to, from, pack) {
362
344
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
363
- if (ar || !(i in from)) {
364
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
365
- ar[i] = from[i];
366
- }
345
+ if (ar || !(i in from)) {
346
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
347
+ ar[i] = from[i];
348
+ }
367
349
  }
368
350
  return to.concat(ar || Array.prototype.slice.call(from));
369
351
  }
370
-
371
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
352
+ typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
372
353
  var e = new Error(message);
373
354
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
374
355
  };
375
356
 
376
357
  function isNonNullObject(obj) {
377
- return obj !== null && typeof obj === "object";
358
+ return obj !== null && typeof obj === "object";
378
359
  }
379
360
 
380
361
  var hasOwnProperty = Object.prototype.hasOwnProperty;
381
362
  function mergeDeep() {
382
- var sources = [];
383
- for (var _i = 0; _i < arguments.length; _i++) {
384
- sources[_i] = arguments[_i];
385
- }
386
- return mergeDeepArray(sources);
387
- }
388
- // In almost any situation where you could succeed in getting the
389
- // TypeScript compiler to infer a tuple type for the sources array, you
390
- // could just use mergeDeep instead of mergeDeepArray, so instead of
391
- // trying to convert T[] to an intersection type we just infer the array
392
- // element type, which works perfectly when the sources array has a
393
- // consistent element type.
363
+ var sources = [];
364
+ for (var _i = 0; _i < arguments.length; _i++) {
365
+ sources[_i] = arguments[_i];
366
+ }
367
+ return mergeDeepArray(sources);
368
+ }
394
369
  function mergeDeepArray(sources) {
395
- var target = sources[0] || {};
396
- var count = sources.length;
397
- if (count > 1) {
398
- var merger = new DeepMerger();
399
- for (var i = 1; i < count; ++i) {
400
- target = merger.merge(target, sources[i]);
401
- }
370
+ var target = sources[0] || {};
371
+ var count = sources.length;
372
+ if (count > 1) {
373
+ var merger = new DeepMerger();
374
+ for (var i = 1; i < count; ++i) {
375
+ target = merger.merge(target, sources[i]);
402
376
  }
403
- return target;
377
+ }
378
+ return target;
404
379
  }
405
- var defaultReconciler = function (target, source, property) {
406
- return this.merge(target[property], source[property]);
380
+ var defaultReconciler = function(target, source, property) {
381
+ return this.merge(target[property], source[property]);
407
382
  };
408
- var DeepMerger = /** @class */ (function () {
409
- function DeepMerger(reconciler) {
410
- if (reconciler === void 0) { reconciler = defaultReconciler; }
411
- this.reconciler = reconciler;
412
- this.isObject = isNonNullObject;
413
- this.pastCopies = new Set();
414
- }
415
- DeepMerger.prototype.merge = function (target, source) {
416
- var _this = this;
417
- var context = [];
418
- for (var _i = 2; _i < arguments.length; _i++) {
419
- context[_i - 2] = arguments[_i];
420
- }
421
- if (isNonNullObject(source) && isNonNullObject(target)) {
422
- Object.keys(source).forEach(function (sourceKey) {
423
- if (hasOwnProperty.call(target, sourceKey)) {
424
- var targetValue = target[sourceKey];
425
- if (source[sourceKey] !== targetValue) {
426
- var result = _this.reconciler.apply(_this, __spreadArray([target,
427
- source,
428
- sourceKey], context, false));
429
- // A well-implemented reconciler may return targetValue to indicate
430
- // the merge changed nothing about the structure of the target.
431
- if (result !== targetValue) {
432
- target = _this.shallowCopyForMerge(target);
433
- target[sourceKey] = result;
434
- }
435
- }
436
- }
437
- else {
438
- // If there is no collision, the target can safely share memory with
439
- // the source, and the recursion can terminate here.
440
- target = _this.shallowCopyForMerge(target);
441
- target[sourceKey] = source[sourceKey];
442
- }
443
- });
444
- return target;
445
- }
446
- // If source (or target) is not an object, let source replace target.
447
- return source;
448
- };
449
- DeepMerger.prototype.shallowCopyForMerge = function (value) {
450
- if (isNonNullObject(value)) {
451
- if (!this.pastCopies.has(value)) {
452
- if (Array.isArray(value)) {
453
- value = value.slice(0);
454
- }
455
- else {
456
- value = __assign({ __proto__: Object.getPrototypeOf(value) }, value);
457
- }
458
- this.pastCopies.add(value);
383
+ var DeepMerger = (
384
+ /** @class */
385
+ function() {
386
+ function DeepMerger2(reconciler) {
387
+ if (reconciler === void 0) {
388
+ reconciler = defaultReconciler;
389
+ }
390
+ this.reconciler = reconciler;
391
+ this.isObject = isNonNullObject;
392
+ this.pastCopies = /* @__PURE__ */ new Set();
393
+ }
394
+ DeepMerger2.prototype.merge = function(target, source) {
395
+ var _this = this;
396
+ var context = [];
397
+ for (var _i = 2; _i < arguments.length; _i++) {
398
+ context[_i - 2] = arguments[_i];
399
+ }
400
+ if (isNonNullObject(source) && isNonNullObject(target)) {
401
+ Object.keys(source).forEach(function(sourceKey) {
402
+ if (hasOwnProperty.call(target, sourceKey)) {
403
+ var targetValue = target[sourceKey];
404
+ if (source[sourceKey] !== targetValue) {
405
+ var result = _this.reconciler.apply(_this, __spreadArray([
406
+ target,
407
+ source,
408
+ sourceKey
409
+ ], context, false));
410
+ if (result !== targetValue) {
411
+ target = _this.shallowCopyForMerge(target);
412
+ target[sourceKey] = result;
413
+ }
459
414
  }
415
+ } else {
416
+ target = _this.shallowCopyForMerge(target);
417
+ target[sourceKey] = source[sourceKey];
418
+ }
419
+ });
420
+ return target;
421
+ }
422
+ return source;
423
+ };
424
+ DeepMerger2.prototype.shallowCopyForMerge = function(value) {
425
+ if (isNonNullObject(value)) {
426
+ if (!this.pastCopies.has(value)) {
427
+ if (Array.isArray(value)) {
428
+ value = value.slice(0);
429
+ } else {
430
+ value = __assign({ __proto__: Object.getPrototypeOf(value) }, value);
431
+ }
432
+ this.pastCopies.add(value);
460
433
  }
461
- return value;
434
+ }
435
+ return value;
462
436
  };
463
- return DeepMerger;
464
- }());
437
+ return DeepMerger2;
438
+ }()
439
+ );
465
440
 
466
441
  var toString = Object.prototype.toString;
467
- /**
468
- * Deeply clones a value to create a new instance.
469
- */
470
442
  function cloneDeep(value) {
471
- return cloneDeepHelper(value);
443
+ return cloneDeepHelper(value);
472
444
  }
473
445
  function cloneDeepHelper(val, seen) {
474
- switch (toString.call(val)) {
475
- case "[object Array]": {
476
- seen = seen || new Map();
477
- if (seen.has(val))
478
- return seen.get(val);
479
- var copy_1 = val.slice(0);
480
- seen.set(val, copy_1);
481
- copy_1.forEach(function (child, i) {
482
- copy_1[i] = cloneDeepHelper(child, seen);
483
- });
484
- return copy_1;
485
- }
486
- case "[object Object]": {
487
- seen = seen || new Map();
488
- if (seen.has(val))
489
- return seen.get(val);
490
- // High fidelity polyfills of Object.create and Object.getPrototypeOf are
491
- // possible in all JS environments, so we will assume they exist/work.
492
- var copy_2 = Object.create(Object.getPrototypeOf(val));
493
- seen.set(val, copy_2);
494
- Object.keys(val).forEach(function (key) {
495
- copy_2[key] = cloneDeepHelper(val[key], seen);
496
- });
497
- return copy_2;
498
- }
499
- default:
500
- return val;
446
+ switch (toString.call(val)) {
447
+ case "[object Array]": {
448
+ seen = seen || /* @__PURE__ */ new Map();
449
+ if (seen.has(val))
450
+ return seen.get(val);
451
+ var copy_1 = val.slice(0);
452
+ seen.set(val, copy_1);
453
+ copy_1.forEach(function(child, i) {
454
+ copy_1[i] = cloneDeepHelper(child, seen);
455
+ });
456
+ return copy_1;
457
+ }
458
+ case "[object Object]": {
459
+ seen = seen || /* @__PURE__ */ new Map();
460
+ if (seen.has(val))
461
+ return seen.get(val);
462
+ var copy_2 = Object.create(Object.getPrototypeOf(val));
463
+ seen.set(val, copy_2);
464
+ Object.keys(val).forEach(function(key) {
465
+ copy_2[key] = cloneDeepHelper(val[key], seen);
466
+ });
467
+ return copy_2;
501
468
  }
469
+ default:
470
+ return val;
471
+ }
502
472
  }
503
473
 
504
474
  function isObject$1(val) {
@@ -648,7 +618,7 @@ function formatAppliedEnv(applyResult) {
648
618
  return `${chalk.yellowBright(` \u203C ${envVariableFmt}`)} => ${warning.join(", ")}`;
649
619
  }
650
620
  if (!dotVar) return chalk.red(`${envVariableFmt} => ignored (no matching config)`);
651
- if (from === void 0 && to === void 0) return ` = ${baseLog}: (ignored)`;
621
+ if (from === void 0 && to === void 0) return ` = ${baseLog}`;
652
622
  if (from === void 0 && to !== void 0) return ` ${chalk.green("+")} ${baseLog}`;
653
623
  if (from !== void 0 && to === void 0) return ` ${chalk.red("-")} ${baseLog}`;
654
624
  return ` ${chalk.yellowBright("~")} ${baseLog}`;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/next-config",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.1.0-canary.17",
5
+ "version": "9.1.0-canary.19",
6
6
  "type": "module",
7
7
  "types": "./src/index.ts",
8
8
  "exports": {
@@ -19,7 +19,7 @@
19
19
  "prepack": "pkgroll --clean-dist"
20
20
  },
21
21
  "dependencies": {
22
- "@graphql-codegen/cli": "5.0.3",
22
+ "@graphql-codegen/cli": "5.0.5",
23
23
  "@swc/core": "1.10.1",
24
24
  "@swc/wasm-web": "^1.10.1",
25
25
  "@types/circular-dependency-plugin": "^5.0.8",
@@ -43,7 +43,7 @@
43
43
  "zod": "^3.24.1"
44
44
  },
45
45
  "peerDependencies": {
46
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.17",
46
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.19",
47
47
  "@lingui/loader": "*",
48
48
  "@lingui/macro": "*",
49
49
  "@lingui/react": "*",
@@ -223,7 +223,7 @@ export function formatAppliedEnv(applyResult: ApplyResult) {
223
223
 
224
224
  if (!dotVar) return chalk.red(`${envVariableFmt} => ignored (no matching config)`)
225
225
 
226
- if (from === undefined && to === undefined) return ` = ${baseLog}: (ignored)`
226
+ if (from === undefined && to === undefined) return ` = ${baseLog}`
227
227
  if (from === undefined && to !== undefined) return ` ${chalk.green('+')} ${baseLog}`
228
228
  if (from !== undefined && to === undefined) return ` ${chalk.red('-')} ${baseLog}`
229
229
  return ` ${chalk.yellowBright('~')} ${baseLog}`