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.0 to 0.1.1

8

package.json

@@ -19,5 +19,3 @@ {

"exports": {
"./http": {
"default": "src/http/index.js"
}
"./http": "./src/http/index.js"
},

@@ -53,3 +51,3 @@ "files": [

"sideEffects": false,
"version": "0.1.0",
"version": "0.1.1",
"dependencies": {

@@ -68,3 +66,3 @@ "@babel/runtime-corejs3": "^7.16.3",

"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsdoc": "^37.0.3",
"eslint-plugin-jsdoc": "^37.1.0",
"gulp": "^4.0.2",

@@ -71,0 +69,0 @@ "gulp-eslint-new": "^1.0.0",

@@ -40,2 +40,35 @@ # CGnal Network utils

## Usage with Jest
[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).
Example of Jest configuration:
```javascript
// ...
resolver: "jest-node-exports-resolver",
transformIgnorePatterns: ["node_modules/(?!@cgnal)"],
// ...
```
## Usage with `eslint-plugin-import`
[`eslint-plugin-import`](https://github.com/import-js/eslint-plugin-import) still have to support the aforementioned exports field.
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:
```javascript
// ...
"settings": {
"import/resolver": "@tophat/eslint-import-resolver-require",
}
// ...
```
## NPM scripts and Gulp tasks

@@ -42,0 +75,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