netlify-cli 8.2.0-rc.0 → 8.2.3
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
3
|
"description": "Netlify command line tool",
|
|
4
|
-
"version": "8.2.
|
|
4
|
+
"version": "8.2.3",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Mathias Biilmann <matt@netlify.com> (https://twitter.com/biilmann)",
|
|
@@ -22,9 +22,7 @@
|
|
|
22
22
|
"/src/**/*.ps1",
|
|
23
23
|
"/src/functions-templates/**",
|
|
24
24
|
"!/src/**/node_modules/**",
|
|
25
|
-
"!/src/**/*.test.js"
|
|
26
|
-
"tools/eslint-rules/**",
|
|
27
|
-
"!tools/eslint-rules/**/*.test.js"
|
|
25
|
+
"!/src/**/*.test.js"
|
|
28
26
|
],
|
|
29
27
|
"homepage": "https://github.com/netlify/cli",
|
|
30
28
|
"keywords": [
|
|
@@ -80,14 +78,14 @@
|
|
|
80
78
|
"prettier": "--ignore-path .gitignore --loglevel=warn \"{src,tools,scripts,site,tests,.github}/**/*.{js,md,yml,json,html}\" \"*.{js,yml,json,html}\" \".*.{js,yml,json,html}\" \"!CHANGELOG.md\" \"!npm-shrinkwrap.json\" \"!.github/**/*.md\""
|
|
81
79
|
},
|
|
82
80
|
"dependencies": {
|
|
83
|
-
"@netlify/build": "^
|
|
84
|
-
"@netlify/config": "^17.0.
|
|
81
|
+
"@netlify/build": "^25.0.3",
|
|
82
|
+
"@netlify/config": "^17.0.1",
|
|
85
83
|
"@netlify/framework-info": "^7.0.0",
|
|
86
84
|
"@netlify/local-functions-proxy": "^1.1.1",
|
|
87
85
|
"@netlify/plugin-edge-handlers": "^3.0.0",
|
|
88
86
|
"@netlify/plugins-list": "^6.2.0",
|
|
89
87
|
"@netlify/routing-local-proxy": "^0.34.1",
|
|
90
|
-
"@netlify/zip-it-and-ship-it": "5.
|
|
88
|
+
"@netlify/zip-it-and-ship-it": "5.3.0",
|
|
91
89
|
"@octokit/rest": "^18.0.0",
|
|
92
90
|
"@sindresorhus/slugify": "^1.1.0",
|
|
93
91
|
"ansi-styles": "^5.0.0",
|
|
@@ -193,7 +191,7 @@
|
|
|
193
191
|
"@babel/preset-react": "^7.12.13",
|
|
194
192
|
"@commitlint/cli": "^15.0.0",
|
|
195
193
|
"@commitlint/config-conventional": "^15.0.0",
|
|
196
|
-
"@netlify/eslint-config-node": "^4.0.
|
|
194
|
+
"@netlify/eslint-config-node": "^4.0.2",
|
|
197
195
|
"ava": "^3.15.0",
|
|
198
196
|
"eslint-plugin-local-rules": "file:tools/eslint-rules",
|
|
199
197
|
"eslint-plugin-sort-destructure-keys": "^1.3.5",
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
const { dirname, join, relative, sep } = require('path')
|
|
3
|
-
|
|
4
|
-
/** @type {import('eslint').Rule.RuleModule} */
|
|
5
|
-
module.exports = {
|
|
6
|
-
meta: {
|
|
7
|
-
fixable: 'code',
|
|
8
|
-
docs: {
|
|
9
|
-
description: 'disallow direct import of `chalk` as it should be used with the safeChalk helper',
|
|
10
|
-
},
|
|
11
|
-
schema: [],
|
|
12
|
-
},
|
|
13
|
-
create: (context) => ({
|
|
14
|
-
CallExpression: (node) => {
|
|
15
|
-
if (
|
|
16
|
-
node.callee.name === 'require' &&
|
|
17
|
-
node.arguments &&
|
|
18
|
-
node.arguments[0] &&
|
|
19
|
-
node.arguments[0].value === 'chalk'
|
|
20
|
-
) {
|
|
21
|
-
// if the path is empty it is on the same level and then use the direct file to import from
|
|
22
|
-
let updatedPath = relative(dirname(context.getFilename()), join(context.getCwd(), 'src/utils')) || `.${sep}`
|
|
23
|
-
if (!updatedPath.endsWith('utils')) {
|
|
24
|
-
updatedPath = join(updatedPath, 'command-helpers')
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// always use unix style seperators
|
|
28
|
-
updatedPath = updatedPath.replace(/\\/gm, '/')
|
|
29
|
-
if (!updatedPath.startsWith('.')) {
|
|
30
|
-
updatedPath = `./${updatedPath}`
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
context.report({
|
|
34
|
-
node,
|
|
35
|
-
message:
|
|
36
|
-
'Direct use of Chalk is forbidden. Please use the safe chalk import from `src/utils` that handles colors for json output.',
|
|
37
|
-
fix: (fixer) => fixer.replaceTextRange(node.parent.range, `{chalk} = require('${updatedPath}')`),
|
|
38
|
-
})
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
}),
|
|
42
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const test = require('ava')
|
|
2
|
-
const { RuleTester } = require('eslint')
|
|
3
|
-
|
|
4
|
-
const rule = require('./index')
|
|
5
|
-
|
|
6
|
-
// eslint-disable-next-line no-magic-numbers
|
|
7
|
-
const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 2020 } })
|
|
8
|
-
|
|
9
|
-
test('should run the specified testRunner', (t) => {
|
|
10
|
-
t.notThrows(() => {
|
|
11
|
-
ruleTester.run('no-direct-chalk-import', rule, {
|
|
12
|
-
valid: [
|
|
13
|
-
{
|
|
14
|
-
code: `let chalk = require('../utils')`,
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
invalid: [
|
|
18
|
-
{
|
|
19
|
-
code: `let chalk = require('chalk')`,
|
|
20
|
-
// test the auto fix of the rule
|
|
21
|
-
output: `let {chalk} = require('./src/utils')`,
|
|
22
|
-
errors: [
|
|
23
|
-
{
|
|
24
|
-
message:
|
|
25
|
-
'Direct use of Chalk is forbidden. Please use the safe chalk import from `src/utils` that handles colors for json output.',
|
|
26
|
-
type: 'CallExpression',
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
})
|
|
32
|
-
}, 'Rule scenario should not throw')
|
|
33
|
-
})
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-local-rules",
|
|
3
|
-
"description": "Custom eslint rules for the workspace",
|
|
4
|
-
"version": "0.0.1",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"peerDependencies": {
|
|
7
|
-
"eslint": "^7.21.0",
|
|
8
|
-
"ava": "^3.15.0"
|
|
9
|
-
},
|
|
10
|
-
"engines": {
|
|
11
|
-
"node": "^12.20.0 || ^14.14.0 || >=16.0.0"
|
|
12
|
-
}
|
|
13
|
-
}
|