@alwatr/dedupe
Advanced tools
Comparing version 1.0.14 to 1.1.0
@@ -6,2 +6,30 @@ # Change Log | ||
## [1.1.0](https://github.com/Alwatr/nanolib/compare/@alwatr/dedupe@1.0.14...@alwatr/dedupe@1.1.0) (2024-09-29) | ||
### Features | ||
* **dedupe:** add `definePackage` to use `deduplicate` for backward compatibility ([990b994](https://github.com/Alwatr/nanolib/commit/990b994ff7a633f6f337a5b96cdd82dc9638c0d6)) by @AliMD | ||
* **dedupe:** refactor & new api ([393d873](https://github.com/Alwatr/nanolib/commit/393d8730456749e88fc01b7680c025889de53f36)) by @mohammadhonarvar | ||
### Bug Fixes | ||
* all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @mohammadhonarvar | ||
* **dedupe:** add a missing `import` & use `__package_name__` ([1ebbe92](https://github.com/Alwatr/nanolib/commit/1ebbe926549ce11111a791f8d72c9d296597c803)) by @mohammadhonarvar | ||
* **dedupe:** update `demo` based on new API ([650f159](https://github.com/Alwatr/nanolib/commit/650f1591c754231ca7d0c36a9cf98384af30aa44)) by @mohammadhonarvar | ||
### Code Refactoring | ||
* update Dictionary type definitions ([c94cbc4](https://github.com/Alwatr/nanolib/commit/c94cbc4523864e2cc47828ccf5508b68945ac2b8)) by @AliMD | ||
* use new type-helper global types and remove all import types ([08b5d08](https://github.com/Alwatr/nanolib/commit/08b5d08c03c7c315382337239de0426462f384b8)) by @AliMD | ||
### Miscellaneous Chores | ||
* **dedupe:** change the license to AGPL-3.0 ([f48165c](https://github.com/Alwatr/nanolib/commit/f48165c4cc9aa0bfc5cf433500fd3de3d45fc8ab)) by @ArmanAsadian | ||
* Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @AliMD | ||
### Dependencies update | ||
* bump @types/node ([3d80fed](https://github.com/Alwatr/nanolib/commit/3d80fedaf720af792feb060c2f81c737ebb84e11)) by @dependabot[bot] | ||
* **dedupe:** update ([ce988ec](https://github.com/Alwatr/nanolib/commit/ce988ec4cf0f4be8fa0fb026eae65c31acc7055e)) by @mohammadhonarvar | ||
## [1.0.14](https://github.com/Alwatr/nanolib/compare/@alwatr/dedupe@1.0.13...@alwatr/dedupe@1.0.14) (2024-09-21) | ||
@@ -8,0 +36,0 @@ |
@@ -1,10 +0,8 @@ | ||
import type { Dictionary } from '@alwatr/type-helper'; | ||
import '@alwatr/polyfill-has-own'; | ||
declare global { | ||
var __alwatr_dedupe__: true; | ||
var __package_version__: string; | ||
var __alwatr_dedupe__: string | true; | ||
} | ||
export declare const definedPackageList: Dictionary<string>; | ||
/** | ||
* Global define package for managing package versions to prevent version conflicts. | ||
* @param packageName package name including scope. e.g. `@scope/package-name` | ||
* Prevent duplication in any entities like loading node packages. | ||
* @param name package name including scope. e.g. `@scope/package-name` | ||
* @param version package version (optional) | ||
@@ -14,6 +12,14 @@ * | ||
* ```typescript | ||
* definePackage('@scope/package-name', __package_version__); | ||
* deduplicate({name: __package_name__, strict: true}); | ||
* ``` | ||
*/ | ||
export declare function definePackage(packageName: string, version?: string): void; | ||
export declare function deduplicate(args: { | ||
name: string; | ||
strict?: true; | ||
}): void; | ||
/** | ||
* Old `definePackage` for backward compatibility. | ||
* @deprecated Use `deduplicate` instead. | ||
*/ | ||
export declare function definePackage(packageName: string, _?: string): void; | ||
//# sourceMappingURL=main.d.ts.map |
{ | ||
"name": "@alwatr/dedupe", | ||
"version": "1.0.14", | ||
"version": "1.1.0", | ||
"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).", | ||
@@ -37,3 +37,3 @@ "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>", | ||
}, | ||
"license": "MIT", | ||
"license": "AGPL-3.0-only", | ||
"files": [ | ||
@@ -62,3 +62,3 @@ "**/*.{js,mjs,cjs,map,d.ts,html,md}", | ||
"d": "yarn run build:es && DEBUG=1 yarn node", | ||
"build": "yarn run build:ts & yarn run build:es", | ||
"build": "yarn run build:ts && yarn run build:es", | ||
"build:es": "nano-build --preset=module", | ||
@@ -71,11 +71,15 @@ "build:ts": "tsc --build", | ||
}, | ||
"dependencies": { | ||
"@alwatr/global-scope": "^1.1.22", | ||
"@alwatr/package-tracer": "^1.0.0", | ||
"@alwatr/polyfill-has-own": "^1.1.0" | ||
}, | ||
"devDependencies": { | ||
"@alwatr/nano-build": "^1.3.10", | ||
"@alwatr/prettier-config": "^1.0.4", | ||
"@alwatr/tsconfig-base": "^1.2.0", | ||
"@alwatr/type-helper": "^1.2.6", | ||
"@types/node": "^22.5.5", | ||
"@alwatr/nano-build": "^1.4.0", | ||
"@alwatr/prettier-config": "^1.0.5", | ||
"@alwatr/tsconfig-base": "^1.3.0", | ||
"@alwatr/type-helper": "^2.0.0", | ||
"typescript": "^5.6.2" | ||
}, | ||
"gitHead": "6d82461cfdee936b30cbc67473a5a5048773255a" | ||
"gitHead": "cc1ea8b688232dcc60e9ebc904ec5566bc25c1ac" | ||
} |
@@ -8,11 +8,25 @@ # Dedupe | ||
```ts | ||
import {definePackage} from '@alwatr/dedupe'; | ||
import {deduplicate} from '@alwatr/dedupe'; | ||
definePackage('@alwatr/logger', '2.0.0'); | ||
deduplicate({name: '@alwatr/dedupe'}); | ||
``` | ||
You can use `__package_version__` to automatically obtain the version of the package if you are using @alwatr/nano-build to build your package. | ||
You can use `__package_name__` to obtain automatically the version of the package if you are using @alwatr/nano-build to build your package. | ||
```ts | ||
definePackage('@alwatr/logger', __package_version__); | ||
definePackage({name: __package_name__}); | ||
``` | ||
## Sponsors | ||
The following companies, organizations, and individuals support Nitrobase ongoing maintenance and development. Become a Sponsor to get your logo on our README and website. | ||
[![Exir Studio](https://avatars.githubusercontent.com/u/181194967?s=200&v=4)](https://exirstudio.com) | ||
### Contributing | ||
Contributions are welcome! Please read our [contribution guidelines](https://github.com/Alwatr/.github/blob/next/CONTRIBUTING.md) before submitting a pull request. | ||
### License | ||
This project is licensed under the [AGPL-3.0 License](LICENSE). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52208
5
35
32
3
3
70
1
+ Added@alwatr/global-scope@^1.1.22
+ Added@alwatr/global-scope@1.1.26(transitive)
+ Added@alwatr/package-tracer@1.0.8(transitive)
+ Added@alwatr/polyfill-has-own@1.1.8(transitive)