@xylabs/lodash 2.10.6 → 2.10.7

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/package.json CHANGED
@@ -15,12 +15,12 @@
15
15
  "exports": {
16
16
  ".": {
17
17
  "require": {
18
- "types": "./dist/index.d.ts",
19
- "default": "./dist/index.js"
18
+ "types": "./dist/cjsIndex.d.ts",
19
+ "default": "./dist/cjsIndex.js"
20
20
  },
21
21
  "import": {
22
- "types": "./dist/index.d.mts",
23
- "default": "./dist/index.mjs"
22
+ "types": "./dist/esmIndex.d.mts",
23
+ "default": "./dist/esmIndex.mjs"
24
24
  }
25
25
  },
26
26
  "./dist/docs.json": {
@@ -31,8 +31,8 @@
31
31
  },
32
32
  "./package.json": "./package.json"
33
33
  },
34
- "main": "dist/index.js",
35
- "module": "dist/index.mjs",
34
+ "main": "dist/cjsIndex.js",
35
+ "module": "dist/esmIndex.mjs",
36
36
  "scripts": {
37
37
  "package-compile": "tsup && publint",
38
38
  "package-recompile": "tsup && publint"
@@ -45,10 +45,15 @@
45
45
  "esm"
46
46
  ],
47
47
  "dependencies": {
48
- "@types/lodash-es": "^4.17.9",
48
+ "@types/lodash": "^4.14.198",
49
+ "@types/lodash-es": "^4.17.9"
50
+ },
51
+ "optionalDependencies": {
52
+ "lodash": "^4.17.21",
49
53
  "lodash-es": "^4.17.21"
50
54
  },
51
55
  "devDependencies": {
56
+ "@types/lodash": "^4.14.198",
52
57
  "@types/lodash-es": "^4.17.9",
53
58
  "@xylabs/ts-scripts-yarn3": "^2.19.5",
54
59
  "@xylabs/tsconfig": "^2.19.5",
@@ -64,6 +69,6 @@
64
69
  "url": "https://github.com/xylabs/sdk-js.git"
65
70
  },
66
71
  "sideEffects": false,
67
- "types": "./dist/index.d.mts",
68
- "version": "2.10.6"
72
+ "types": "./dist/esmIndex.d.mts",
73
+ "version": "2.10.7"
69
74
  }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable no-restricted-imports */
2
+ import lodash from 'lodash'
3
+
4
+ module.exports = lodash
package/tsup.config.ts CHANGED
@@ -6,9 +6,9 @@ export default defineConfig({
6
6
  cjsInterop: true,
7
7
  clean: true,
8
8
  dts: {
9
- entry: ['src/index.ts'],
9
+ entry: ['src/cjsIndex.ts', 'src/esmIndex.ts'],
10
10
  },
11
- entry: ['src/index.ts'],
11
+ entry: ['src/cjsIndex.ts', 'src/esmIndex.ts'],
12
12
  format: ['cjs', 'esm'],
13
13
  sourcemap: true,
14
14
  splitting: false,
package/dist/index.js DELETED
@@ -1,44 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
-
31
- // src/index.ts
32
- var src_exports = {};
33
- __export(src_exports, {
34
- default: () => src_default
35
- });
36
- module.exports = __toCommonJS(src_exports);
37
- var lodash = __toESM(require("lodash-es"));
38
- __reExport(src_exports, require("lodash-es"), module.exports);
39
- var src_default = lodash;
40
- // Annotate the CommonJS export names for ESM import in node:
41
- 0 && (module.exports = {
42
- ...require("lodash-es")
43
- });
44
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import * as lodash from 'lodash-es'\nexport * from 'lodash-es'\n\n// eslint-disable-next-line import/no-default-export\nexport default lodash\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AACxB,wBAAc,sBADd;AAIA,IAAO,cAAQ;","names":[]}
package/dist/index.mjs DELETED
@@ -1,8 +0,0 @@
1
- // src/index.ts
2
- import * as lodash from "lodash-es";
3
- export * from "lodash-es";
4
- var src_default = lodash;
5
- export {
6
- src_default as default
7
- };
8
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import * as lodash from 'lodash-es'\nexport * from 'lodash-es'\n\n// eslint-disable-next-line import/no-default-export\nexport default lodash\n"],"mappings":";AAAA,YAAY,YAAY;AACxB,cAAc;AAGd,IAAO,cAAQ;","names":[]}
File without changes
File without changes
File without changes