@wix/sdk 1.17.5 → 1.17.6

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.
@@ -1,7 +1,5 @@
1
1
  import { unflatten } from 'flat';
2
- import lodash from 'lodash';
3
2
  import { RESTResponseToSDKResponseRenameMap } from '@wix/sdk-runtime/rest-modules';
4
- const { camelCase } = lodash;
5
3
  export class ModifiedFieldsManipulator {
6
4
  BRACKET_PATTERN = /\[(\d+)\]/g;
7
5
  NUMERIC_PATTERN = /^\d+$/;
@@ -198,3 +196,10 @@ function attemptFlatten(transformedModifiedFields, modifiedFieldsManipulator) {
198
196
  }
199
197
  return null;
200
198
  }
199
+ // Simple camelCase implementation to avoid lodash (which uses `new Function()` internally
200
+ // and breaks Cloudflare Workers/Edge runtimes)
201
+ function camelCase(str) {
202
+ return str
203
+ .replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ''))
204
+ .replace(/^./, (c) => c.toLowerCase());
205
+ }
@@ -1,14 +1,9 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.ModifiedFieldsManipulator = void 0;
7
4
  exports.attemptTransformationWithModifiedFields = attemptTransformationWithModifiedFields;
8
5
  const flat_1 = require("flat");
9
- const lodash_1 = __importDefault(require("lodash"));
10
6
  const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
11
- const { camelCase } = lodash_1.default;
12
7
  class ModifiedFieldsManipulator {
13
8
  BRACKET_PATTERN = /\[(\d+)\]/g;
14
9
  NUMERIC_PATTERN = /^\d+$/;
@@ -206,3 +201,10 @@ function attemptFlatten(transformedModifiedFields, modifiedFieldsManipulator) {
206
201
  }
207
202
  return null;
208
203
  }
204
+ // Simple camelCase implementation to avoid lodash (which uses `new Function()` internally
205
+ // and breaks Cloudflare Workers/Edge runtimes)
206
+ function camelCase(str) {
207
+ return str
208
+ .replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ''))
209
+ .replace(/^./, (c) => c.toLowerCase());
210
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk",
3
- "version": "1.17.5",
3
+ "version": "1.17.6",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Ronny Ringel",
@@ -80,7 +80,6 @@
80
80
  "@wix/sdk-types": "1.16.0",
81
81
  "flat": "^6.0.1",
82
82
  "jose": "^5.10.0",
83
- "lodash": "4.17.20",
84
83
  "type-fest": "^4.41.0"
85
84
  },
86
85
  "optionalDependencies": {
@@ -88,7 +87,6 @@
88
87
  },
89
88
  "devDependencies": {
90
89
  "@types/is-ci": "^3.0.4",
91
- "@types/lodash": "4.14.202",
92
90
  "@types/node": "^20.19.25",
93
91
  "@vitest/ui": "^1.6.1",
94
92
  "@wix/ecom": "^1.0.886",
@@ -129,5 +127,5 @@
129
127
  "wallaby": {
130
128
  "autoDetect": true
131
129
  },
132
- "falconPackageHash": "55220a3363629bf5db4212d74519a60b4fc3fd6bd5021522eaed06c1"
130
+ "falconPackageHash": "25d16bf9f75c7cef263c96b55f2354cca27dc38f4cb230c62b00251f"
133
131
  }