Socket
Socket
Sign inDemoInstall

@cgnal/net

Package Overview
Dependencies
41
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.1.2

24

package.json

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc