@alwatr/dedupe 5.5.9 → 5.5.10
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 +6 -0
- package/README.md +0 -2
- package/dist/main.cjs +4 -4
- package/dist/main.cjs.map +1 -1
- package/dist/main.mjs +4 -4
- package/dist/main.mjs.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.5.10](https://github.com/Alwatr/nanolib/compare/@alwatr/dedupe@5.5.9...@alwatr/dedupe@5.5.10) (2025-09-09)
|
|
7
|
+
|
|
8
|
+
### 🧹 Miscellaneous Chores
|
|
9
|
+
|
|
10
|
+
* remove trailing newlines from contributing sections in README files ([e8ab1bc](https://github.com/Alwatr/nanolib/commit/e8ab1bc43e0addea5ccd4c897c2cec597cb9e15f))
|
|
11
|
+
|
|
6
12
|
## [5.5.9](https://github.com/Alwatr/nanolib/compare/@alwatr/dedupe@5.5.8...@alwatr/dedupe@5.5.9) (2025-09-06)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @alwatr/dedupe
|
package/README.md
CHANGED
|
@@ -23,5 +23,3 @@ The following companies, organizations, and individuals support Nanolib ongoing
|
|
|
23
23
|
### Contributing
|
|
24
24
|
|
|
25
25
|
Contributions are welcome! Please read our [contribution guidelines](https://github.com/Alwatr/.github/blob/next/CONTRIBUTING.md) before submitting a pull request.
|
|
26
|
-
|
|
27
|
-
|
package/dist/main.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @alwatr/dedupe v5.5.
|
|
1
|
+
/* @alwatr/dedupe v5.5.10 */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -28,10 +28,10 @@ module.exports = __toCommonJS(main_exports);
|
|
|
28
28
|
var import_global_this = require("@alwatr/global-this");
|
|
29
29
|
var import_package_tracer = require("@alwatr/package-tracer");
|
|
30
30
|
var import_polyfill_has_own = require("@alwatr/polyfill-has-own");
|
|
31
|
-
__dev_mode__: import_package_tracer.packageTracer.add("@alwatr/dedupe", "5.5.
|
|
31
|
+
__dev_mode__: import_package_tracer.packageTracer.add("@alwatr/dedupe", "5.5.10");
|
|
32
32
|
var globalThis_ = (0, import_global_this.getGlobalThis)();
|
|
33
33
|
if (typeof globalThis_.__alwatr_dedupe__ === "undefined") {
|
|
34
|
-
globalThis_.__alwatr_dedupe__ = "5.5.
|
|
34
|
+
globalThis_.__alwatr_dedupe__ = "5.5.10";
|
|
35
35
|
} else {
|
|
36
36
|
if (globalThis_.__alwatr_dedupe__ === true) {
|
|
37
37
|
globalThis_.__alwatr_dedupe__ = "1.0.x";
|
|
@@ -41,7 +41,7 @@ if (typeof globalThis_.__alwatr_dedupe__ === "undefined") {
|
|
|
41
41
|
cause: {
|
|
42
42
|
name: "@alwatr/dedupe",
|
|
43
43
|
oldVersion: globalThis_.__alwatr_dedupe__,
|
|
44
|
-
newVersion: "5.5.
|
|
44
|
+
newVersion: "5.5.10"
|
|
45
45
|
}
|
|
46
46
|
})
|
|
47
47
|
);
|
package/dist/main.cjs.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
4
|
"sourcesContent": ["import {getGlobalThis} from '@alwatr/global-this';\nimport {packageTracer} from '@alwatr/package-tracer';\nimport '@alwatr/polyfill-has-own';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\nconst globalThis_ = getGlobalThis<{__alwatr_dedupe__: string | true}>();\n\nif (typeof globalThis_.__alwatr_dedupe__ === 'undefined') {\n globalThis_.__alwatr_dedupe__ = __package_version__;\n}\nelse {\n if (globalThis_.__alwatr_dedupe__ === true) {\n globalThis_.__alwatr_dedupe__ = '1.0.x';\n }\n\n console.error(\n new Error('duplication_detected', {\n cause: {\n name: __package_name__,\n oldVersion: globalThis_.__alwatr_dedupe__,\n newVersion: __package_version__,\n },\n }),\n );\n}\n\nconst list: DictionaryOpt<true> = {};\n\n/**\n * Prevent duplication in any entities like loading node packages.\n * @param name package name including scope. e.g. `@scope/package-name`\n * @param version package version (optional)\n *\n * @example\n * ```typescript\n * deduplicate({name: __package_name__, strict: true});\n * ```\n */\nexport function deduplicate(args: {name: string; strict?: true}): void {\n if (Object.hasOwn(list, args.name)) {\n const error = new Error('duplication_detected', {\n cause: {\n name: args.name,\n },\n });\n\n if (args.strict) {\n throw error;\n }\n else {\n console.error(error);\n }\n }\n\n list[args.name] = true;\n}\n\ndeduplicate({name: __package_name__});\n\n/**\n * Old `definePackage` for backward compatibility.\n * @deprecated Use `deduplicate` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function definePackage(packageName: string, _?: string): void {\n console.warn('`definePackage` in `@alwatr/dedupe` is deprecated. Use `deduplicate` instead.');\n deduplicate({name: packageName});\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAC5B,4BAA4B;AAC5B,8BAAO;AAEP,aAAc,qCAAc,IAAI,kBAAkB,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAC5B,4BAA4B;AAC5B,8BAAO;AAEP,aAAc,qCAAc,IAAI,kBAAkB,QAAmB;AAErE,IAAM,kBAAc,kCAAkD;AAEtE,IAAI,OAAO,YAAY,sBAAsB,aAAa;AACxD,cAAY,oBAAoB;AAClC,OACK;AACH,MAAI,YAAY,sBAAsB,MAAM;AAC1C,gBAAY,oBAAoB;AAAA,EAClC;AAEA,UAAQ;AAAA,IACN,IAAI,MAAM,wBAAwB;AAAA,MAChC,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY,YAAY;AAAA,QACxB,YAAY;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEA,IAAM,OAA4B,CAAC;AAY5B,SAAS,YAAY,MAA2C;AACrE,MAAI,OAAO,OAAO,MAAM,KAAK,IAAI,GAAG;AAClC,UAAM,QAAQ,IAAI,MAAM,wBAAwB;AAAA,MAC9C,OAAO;AAAA,QACL,MAAM,KAAK;AAAA,MACb;AAAA,IACF,CAAC;AAED,QAAI,KAAK,QAAQ;AACf,YAAM;AAAA,IACR,OACK;AACH,cAAQ,MAAM,KAAK;AAAA,IACrB;AAAA,EACF;AAEA,OAAK,KAAK,IAAI,IAAI;AACpB;AAEA,YAAY,EAAC,MAAM,iBAAgB,CAAC;AAO7B,SAAS,cAAc,aAAqB,GAAkB;AACnE,UAAQ,KAAK,+EAA+E;AAC5F,cAAY,EAAC,MAAM,YAAW,CAAC;AACjC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/main.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/* @alwatr/dedupe v5.5.
|
|
1
|
+
/* @alwatr/dedupe v5.5.10 */
|
|
2
2
|
|
|
3
3
|
// src/main.ts
|
|
4
4
|
import { getGlobalThis } from "@alwatr/global-this";
|
|
5
5
|
import { packageTracer } from "@alwatr/package-tracer";
|
|
6
6
|
import "@alwatr/polyfill-has-own";
|
|
7
|
-
__dev_mode__: packageTracer.add("@alwatr/dedupe", "5.5.
|
|
7
|
+
__dev_mode__: packageTracer.add("@alwatr/dedupe", "5.5.10");
|
|
8
8
|
var globalThis_ = getGlobalThis();
|
|
9
9
|
if (typeof globalThis_.__alwatr_dedupe__ === "undefined") {
|
|
10
|
-
globalThis_.__alwatr_dedupe__ = "5.5.
|
|
10
|
+
globalThis_.__alwatr_dedupe__ = "5.5.10";
|
|
11
11
|
} else {
|
|
12
12
|
if (globalThis_.__alwatr_dedupe__ === true) {
|
|
13
13
|
globalThis_.__alwatr_dedupe__ = "1.0.x";
|
|
@@ -17,7 +17,7 @@ if (typeof globalThis_.__alwatr_dedupe__ === "undefined") {
|
|
|
17
17
|
cause: {
|
|
18
18
|
name: "@alwatr/dedupe",
|
|
19
19
|
oldVersion: globalThis_.__alwatr_dedupe__,
|
|
20
|
-
newVersion: "5.5.
|
|
20
|
+
newVersion: "5.5.10"
|
|
21
21
|
}
|
|
22
22
|
})
|
|
23
23
|
);
|
package/dist/main.mjs.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
4
|
"sourcesContent": ["import {getGlobalThis} from '@alwatr/global-this';\nimport {packageTracer} from '@alwatr/package-tracer';\nimport '@alwatr/polyfill-has-own';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\nconst globalThis_ = getGlobalThis<{__alwatr_dedupe__: string | true}>();\n\nif (typeof globalThis_.__alwatr_dedupe__ === 'undefined') {\n globalThis_.__alwatr_dedupe__ = __package_version__;\n}\nelse {\n if (globalThis_.__alwatr_dedupe__ === true) {\n globalThis_.__alwatr_dedupe__ = '1.0.x';\n }\n\n console.error(\n new Error('duplication_detected', {\n cause: {\n name: __package_name__,\n oldVersion: globalThis_.__alwatr_dedupe__,\n newVersion: __package_version__,\n },\n }),\n );\n}\n\nconst list: DictionaryOpt<true> = {};\n\n/**\n * Prevent duplication in any entities like loading node packages.\n * @param name package name including scope. e.g. `@scope/package-name`\n * @param version package version (optional)\n *\n * @example\n * ```typescript\n * deduplicate({name: __package_name__, strict: true});\n * ```\n */\nexport function deduplicate(args: {name: string; strict?: true}): void {\n if (Object.hasOwn(list, args.name)) {\n const error = new Error('duplication_detected', {\n cause: {\n name: args.name,\n },\n });\n\n if (args.strict) {\n throw error;\n }\n else {\n console.error(error);\n }\n }\n\n list[args.name] = true;\n}\n\ndeduplicate({name: __package_name__});\n\n/**\n * Old `definePackage` for backward compatibility.\n * @deprecated Use `deduplicate` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function definePackage(packageName: string, _?: string): void {\n console.warn('`definePackage` in `@alwatr/dedupe` is deprecated. Use `deduplicate` instead.');\n deduplicate({name: packageName});\n}\n"],
|
|
5
|
-
"mappings": ";;;AAAA,SAAQ,qBAAoB;AAC5B,SAAQ,qBAAoB;AAC5B,OAAO;AAEP,aAAc,eAAc,IAAI,kBAAkB,
|
|
5
|
+
"mappings": ";;;AAAA,SAAQ,qBAAoB;AAC5B,SAAQ,qBAAoB;AAC5B,OAAO;AAEP,aAAc,eAAc,IAAI,kBAAkB,QAAmB;AAErE,IAAM,cAAc,cAAkD;AAEtE,IAAI,OAAO,YAAY,sBAAsB,aAAa;AACxD,cAAY,oBAAoB;AAClC,OACK;AACH,MAAI,YAAY,sBAAsB,MAAM;AAC1C,gBAAY,oBAAoB;AAAA,EAClC;AAEA,UAAQ;AAAA,IACN,IAAI,MAAM,wBAAwB;AAAA,MAChC,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY,YAAY;AAAA,QACxB,YAAY;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEA,IAAM,OAA4B,CAAC;AAY5B,SAAS,YAAY,MAA2C;AACrE,MAAI,OAAO,OAAO,MAAM,KAAK,IAAI,GAAG;AAClC,UAAM,QAAQ,IAAI,MAAM,wBAAwB;AAAA,MAC9C,OAAO;AAAA,QACL,MAAM,KAAK;AAAA,MACb;AAAA,IACF,CAAC;AAED,QAAI,KAAK,QAAQ;AACf,YAAM;AAAA,IACR,OACK;AACH,cAAQ,MAAM,KAAK;AAAA,IACrB;AAAA,EACF;AAEA,OAAK,KAAK,IAAI,IAAI;AACpB;AAEA,YAAY,EAAC,MAAM,iBAAgB,CAAC;AAO7B,SAAS,cAAc,aAAqB,GAAkB;AACnE,UAAQ,KAAK,+EAA+E;AAC5F,cAAY,EAAC,MAAM,YAAW,CAAC;AACjC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/dedupe",
|
|
3
3
|
"description": "A package manager helper tool for debug list of defined (imported) packages in your ecosystem and prevent to duplicate import (install) multiple versions of the same package in your project (deduplicate packages).",
|
|
4
|
-
"version": "5.5.
|
|
4
|
+
"version": "5.5.10",
|
|
5
5
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
6
|
"bugs": "https://github.com/Alwatr/nanolib/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@alwatr/global-this": "5.5.
|
|
9
|
-
"@alwatr/package-tracer": "5.5.
|
|
10
|
-
"@alwatr/polyfill-has-own": "5.5.
|
|
8
|
+
"@alwatr/global-this": "5.5.10",
|
|
9
|
+
"@alwatr/package-tracer": "5.5.10",
|
|
10
|
+
"@alwatr/polyfill-has-own": "5.5.10"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@alwatr/nano-build": "6.1.
|
|
14
|
-
"@alwatr/prettier-config": "5.0.
|
|
15
|
-
"@alwatr/tsconfig-base": "6.0.
|
|
16
|
-
"@alwatr/type-helper": "6.0.
|
|
13
|
+
"@alwatr/nano-build": "6.1.1",
|
|
14
|
+
"@alwatr/prettier-config": "5.0.3",
|
|
15
|
+
"@alwatr/tsconfig-base": "6.0.1",
|
|
16
|
+
"@alwatr/type-helper": "6.0.1",
|
|
17
17
|
"typescript": "^5.9.2"
|
|
18
18
|
},
|
|
19
19
|
"exports": {
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
},
|
|
78
78
|
"type": "module",
|
|
79
79
|
"types": "./dist/main.d.ts",
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "cd02a1a9fa579930cd54291ba51ed86241313a6d"
|
|
81
81
|
}
|