@putout/engine-loader 13.1.0 → 13.1.1

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/lib/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const {nanomemoize} = require('nano-memoize');
4
-
5
3
  const {loadPlugin} = require('./load/load');
6
4
  const {createAsyncLoader} = require('./load/async-loader');
7
5
  const {parsePluginNames} = require('./plugins/parse-plugin-names');
@@ -21,7 +19,7 @@ const {check, checkRule} = require('./check');
21
19
  const {isArray} = Array;
22
20
 
23
21
  module.exports.loadPluginsAsync = loadPluginsAsync;
24
- module.exports.loadProcessorsAsync = nanomemoize(async (options, load) => {
22
+ module.exports.loadProcessorsAsync = async (options, load) => {
25
23
  check(options);
26
24
 
27
25
  const {processors = []} = options;
@@ -40,7 +38,7 @@ module.exports.loadProcessorsAsync = nanomemoize(async (options, load) => {
40
38
  }
41
39
 
42
40
  return await Promise.all(list);
43
- });
41
+ };
44
42
 
45
43
  module.exports.createAsyncLoader = createAsyncLoader;
46
44
 
@@ -126,3 +124,4 @@ function extendRules(rule, plugin) {
126
124
 
127
125
  return result;
128
126
  }
127
+
package/lib/load/load.js CHANGED
@@ -52,7 +52,13 @@ const {PUTOUT_YARN_PNP = 'putout'} = process.env;
52
52
  const createCustomRequire = once(() => createRequire(require.resolve(PUTOUT_YARN_PNP)));
53
53
  const createPutoutRequire = once(() => createRequire(require.resolve('putout')));
54
54
 
55
- // That's all for Yarn P'n'P//// We need to create a couple version of require for plugins, formatters and processors:// - declared in 🐊Putout package.json;// - declared in module that want to extend 🐊Putout;//// https://yarnpkg.com/advanced/rulebook#modules-shouldnt-hardcode-node_modules-paths-to-access-other-modules
55
+ // That's all for Yarn P'n'P
56
+ //
57
+ // We need to create a couple version of require for plugins, formatters and processors:
58
+ // - declared in 🐊Putout package.json;
59
+ // - declared in module that want to extend 🐊Putout;
60
+ //
61
+ // https://yarnpkg.com/advanced/rulebook#modules-shouldnt-hardcode-node_modules-paths-to-access-other-modules
56
62
  function getModulePath(name) {
57
63
  let path;
58
64
 
@@ -9,11 +9,11 @@ const {
9
9
  getLoadedRules,
10
10
  } = require('../rules');
11
11
 
12
- const {createAsyncLoader} = require('../load/async-loader');
13
12
  const {parsePluginNames} = require('./parse-plugin-names');
14
13
  const validatePlugin = require('./validate-plugin');
15
14
  const {filterEnabledPlugins} = require('./filter-enabled-plugins');
16
15
 
16
+ const {createAsyncLoader} = require('../load/async-loader');
17
17
  const {check, checkRule} = require('../check');
18
18
 
19
19
  const loadPluginAsync = createAsyncLoader('plugin');
@@ -25,7 +25,6 @@ module.exports.loadPluginsAsync = async (options) => {
25
25
 
26
26
  const cookedRules = parseRules(rules);
27
27
  const loadedRules = getLoadedRules(cookedRules);
28
-
29
28
  const items = parsePluginNames(pluginNames);
30
29
 
31
30
  const plugins = await loadPlugins({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/engine-loader",
3
- "version": "13.1.0",
3
+ "version": "13.1.1",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "load plugins and prepare them to run",
@@ -47,7 +47,7 @@
47
47
  "@putout/plugin-remove-unused-variables": "*",
48
48
  "@putout/processor-javascript": "*",
49
49
  "@putout/processor-markdown": "*",
50
- "c8": "^9.0.0",
50
+ "c8": "^10.0.0",
51
51
  "eslint": "^9.0.0",
52
52
  "eslint-plugin-n": "^17.0.0",
53
53
  "eslint-plugin-putout": "^22.0.0",