@cgnal/net
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -16,3 +16,3 @@ { | ||
"engines": { | ||
"node": ">=12.0.0" | ||
"node": ">=14.0.0" | ||
}, | ||
@@ -51,24 +51,24 @@ "exports": { | ||
"sideEffects": false, | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"dependencies": { | ||
"@babel/runtime-corejs3": "^7.16.3", | ||
"core-js": "^3.19.2", | ||
"@babel/runtime-corejs3": "^7.19.4", | ||
"core-js": "^3.25.5", | ||
"lamb": "^0.60.0", | ||
"superagent": "^6.1.0" | ||
"superagent": "^8.0.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/preset-env": "^7.16.4", | ||
"@cgnal/eslint-config": "^0.1.1", | ||
"@babel/preset-env": "^7.19.4", | ||
"@cgnal/eslint-config": "^0.2.0", | ||
"@jsdevtools/version-bump-prompt": "^6.1.0", | ||
"del": "^6.0.0", | ||
"del": "^6.1.1", | ||
"docdash": "^1.2.0", | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-jsdoc": "^37.1.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-jsdoc": "^39.3.6", | ||
"gulp": "^4.0.2", | ||
"gulp-eslint-new": "^1.0.0", | ||
"gulp-eslint-new": "^1.6.0", | ||
"gulp-jest": "^4.0.4", | ||
"gulp-jsdoc3": "^3.0.0", | ||
"gulp-shell": "^0.8.0", | ||
"jest": "^27.4.2" | ||
"jest": "^29.2.0" | ||
} | ||
} |
@@ -42,11 +42,24 @@ # CGnal Network utils | ||
[Jest](https://jestjs.io/) currently (v27.4.2 at the time of writing) doesn't play nice with ES modules and [`package.json` exports](https://nodejs.org/api/packages.html#subpath-exports). | ||
See [this issue](https://github.com/facebook/jest/issues/9771) about the exports support status. | ||
Both problems are easily solved for the time being with a config tweak and the support of [`jest-node-exports-resolver`](https://github.com/k-g-a/jest-node-exports-resolver). | ||
[Jest](https://jestjs.io/) currently (v27.4.2 at the time of writing) doesn't play nice with ES modules and [`package.json` exports](https://nodejs.org/api/packages.html#subpath-exports). See [this issue](https://github.com/facebook/jest/issues/9771) about the exports support status. | ||
Example of Jest configuration: | ||
Both problems are easily solved for the time being with a config tweak and, optionally, the support of [`jest-node-exports-resolver`](https://github.com/k-g-a/jest-node-exports-resolver). | ||
Example of Jest configuration without an extra resolver: | ||
```javascript | ||
// ... | ||
moduleNameMapper: { | ||
"@cgnal/([^/]+)/(.+)": "<rootDir>/node_modules/@cgnal/$1/src/$2" | ||
}, | ||
transformIgnorePatterns: ["node_modules/(?!@cgnal)"], | ||
// ... | ||
``` | ||
Example of Jest configuration with the extra resolver: | ||
```javascript | ||
// ... | ||
resolver: "jest-node-exports-resolver", | ||
@@ -62,2 +75,3 @@ transformIgnorePatterns: ["node_modules/(?!@cgnal)"], | ||
You can refer to [this issue](https://github.com/import-js/eslint-plugin-import/issues/1868) to track the situation. | ||
In the meanwhile you can add a custom resolver such as [`@tophat/eslint-import-resolver-require`](https://github.com/tophat/eslint-import-resolver-require) and tweak your configuration to use it: | ||
@@ -69,3 +83,3 @@ | ||
"settings": { | ||
"import/resolver": "@tophat/eslint-import-resolver-require", | ||
"import/resolver": "@tophat/eslint-import-resolver-require" | ||
} | ||
@@ -72,0 +86,0 @@ |
13057
116
+ Addedasap@2.0.6(transitive)
+ Addeddezalgo@1.0.4(transitive)
+ Addedform-data@4.0.0(transitive)
+ Addedformidable@2.1.2(transitive)
+ Addedhexoid@1.0.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedsuperagent@8.1.2(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedform-data@3.0.1(transitive)
- Removedformidable@1.2.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedsuperagent@6.1.0(transitive)
- Removedutil-deprecate@1.0.2(transitive)
Updatedcore-js@^3.25.5
Updatedsuperagent@^8.0.2