@neovici/cfg 1.12.0 → 1.13.0

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/eslint/index.js CHANGED
@@ -1,5 +1,3 @@
1
- const path = require('path');
2
-
3
1
  module.exports = {
4
2
  env: {
5
3
  browser: true,
@@ -135,10 +133,5 @@ module.exports = {
135
133
  files: ['**/*.test.js'],
136
134
  extends: './test'
137
135
  }
138
- ],
139
- settings: {
140
- 'import/resolver': {
141
- [path.resolve('./eslint/node-enhanced.js')]: {},
142
- }
143
- }
136
+ ]
144
137
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cfg",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Configuration for Neovici packages",
5
5
  "homepage": "https://github.com/Neovici/cfg#readme",
6
6
  "bugs": {
@@ -48,14 +48,12 @@
48
48
  "@babel/core": "^7.16.0",
49
49
  "@babel/eslint-parser": "^7.16.0",
50
50
  "@web/test-runner-playwright": "^0.8.8",
51
- "enhanced-resolve": "^5.9.1",
52
51
  "eslint": "^8.2.0",
53
52
  "eslint-config-prettier": "^8.4.0",
54
53
  "eslint-import-resolver-alias": "^1.1.2",
55
54
  "eslint-plugin-html": "^6.2.0",
56
55
  "eslint-plugin-import": "^2.25.0",
57
56
  "eslint-plugin-mocha": "^10.0.0",
58
- "is-core-module": "^2.8.1",
59
57
  "prettier": "^2.5.0"
60
58
  },
61
59
  "devDependencies": {
@@ -1,60 +0,0 @@
1
- /* eslint-disable */
2
- const resolve = require('enhanced-resolve'),
3
- path = require('path'),
4
- isCore = require('is-core-module');
5
-
6
- exports.interfaceVersion = 2;
7
-
8
- exports.resolve = function (source, file, config) {
9
- let resolvedPath;
10
-
11
- if (isCore(source)) {
12
- return { found: true, path: null };
13
- }
14
-
15
- try {
16
- const cachedFilter = function (pkg, dir) { return packageFilter(pkg, dir, config); };
17
- resolvedPath = resolve.sync(source, opts(file, config, cachedFilter));
18
- return { found: true, path: resolvedPath };
19
- } catch (err) {
20
- return { found: false };
21
- }
22
- };
23
-
24
- function opts(file, config, packageFilter) {
25
- return Object.assign({
26
- // more closely matches Node (#333)
27
- // plus 'mjs' for native modules! (#939)
28
- extensions: ['.mjs', '.js', '.json', '.node'],
29
- },
30
- config,
31
- {
32
- // path.resolve will handle paths relative to CWD
33
- basedir: path.dirname(path.resolve(file)),
34
- packageFilter,
35
- });
36
- }
37
-
38
- function identity(x) { return x; }
39
-
40
- function packageFilter(pkg, dir, config) {
41
- let found = false;
42
- const file = path.join(dir, 'dummy.js');
43
- if (pkg.module) {
44
- try {
45
- resolve.sync(String(pkg.module).replace(/^(?:\.\/)?/, './'), opts(file, config, identity));
46
- pkg.main = pkg.module;
47
- found = true;
48
- } catch (err) {
49
- }
50
- }
51
- if (!found && pkg['jsnext:main']) {
52
- try {
53
- resolve.sync(String(pkg['jsnext:main']).replace(/^(?:\.\/)?/, './'), opts(file, config, identity));
54
- pkg.main = pkg['jsnext:main'];
55
- found = true;
56
- } catch (err) {
57
- }
58
- }
59
- return pkg;
60
- }