Skip to content

Commit 2acc28f

Browse files
[5.4] Update npm dependencies (joomla#45784)
* Update npm dependencies --------- Co-authored-by: Dimitris Grammatikogiannis <[email protected]>
1 parent d6e2991 commit 2acc28f

File tree

95 files changed

+2113
-2640
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2113
-2640
lines changed

build/.eslintrc

Lines changed: 0 additions & 87 deletions
This file was deleted.

build/.stylelintrc.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
{
22
"plugins": [
33
"stylelint-scss",
4-
"stylelint-order"
4+
"stylelint-order",
5+
"@stylistic/stylelint-plugin"
56
],
67
"customSyntax": "postcss-scss",
78
"rules": {
8-
"declaration-bang-space-before": "always",
9-
"declaration-bang-space-after": "never",
109
"color-named": "never",
1110
"declaration-block-no-duplicate-properties": true,
1211
"block-no-empty": true,
13-
"no-missing-end-of-source-newline": true,
1412
"color-hex-length": "short",
15-
"color-hex-case": "lower",
1613
"color-no-invalid-hex": true,
17-
"indentation": 2,
18-
"number-leading-zero": "never",
1914
"max-nesting-depth": 4,
2015
"selector-max-compound-selectors": 5,
2116
"order/properties-order": [
@@ -197,23 +192,14 @@
197192
"animation-iteration-count",
198193
"animation-direction"
199194
],
200-
"block-opening-brace-space-before": "always",
201-
"declaration-block-trailing-semicolon": "always",
202-
"declaration-colon-space-after": "always",
203-
"declaration-colon-space-before": "never",
204-
"function-parentheses-space-inside": "never",
205195
"function-url-no-scheme-relative": true,
206196
"function-url-quotes": "always",
207197
"length-zero-no-unit": true,
208-
"no-eol-whitespace": true,
209-
"number-no-trailing-zeros": true,
210198
"property-no-unknown": true,
211199
"property-no-vendor-prefix": true,
212200
"scss/dollar-variable-colon-space-before": "never",
213201
"scss/selector-no-redundant-nesting-selector": true,
214-
"selector-pseudo-class-parentheses-space-inside": "never",
215202
"shorthand-property-no-redundant-values": true,
216-
"string-quotes": "double",
217203
"unit-allowed-list": [
218204
"ch",
219205
"em",
@@ -244,6 +230,21 @@
244230
"dppx",
245231
"%"
246232
],
247-
"value-no-vendor-prefix": true
233+
"value-no-vendor-prefix": true,
234+
"@stylistic/declaration-bang-space-before": "always",
235+
"@stylistic/declaration-bang-space-after": "never",
236+
"@stylistic/no-missing-end-of-source-newline": true,
237+
"@stylistic/color-hex-case": "lower",
238+
"@stylistic/indentation": 2,
239+
"@stylistic/number-leading-zero": "never",
240+
"@stylistic/block-opening-brace-space-before": "always",
241+
"@stylistic/declaration-block-trailing-semicolon": "always",
242+
"@stylistic/declaration-colon-space-after": "always",
243+
"@stylistic/declaration-colon-space-before": "never",
244+
"@stylistic/function-parentheses-space-inside": "never",
245+
"@stylistic/no-eol-whitespace": true,
246+
"@stylistic/number-no-trailing-zeros": true,
247+
"@stylistic/selector-pseudo-class-parentheses-space-inside": "never",
248+
"@stylistic/string-quotes": "double"
248249
}
249250
}

build/build-modules-js/compilecss.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export const stylesheets = async (options, path) => {
3434
} else if (stats.isFile()) {
3535
files.push(`${RootPath}/${path}`);
3636
} else {
37-
// eslint-disable-next-line no-console
3837
console.error(`Unknown path ${path}`);
3938
process.exitCode = 1;
4039
}
@@ -51,7 +50,6 @@ export const stylesheets = async (options, path) => {
5150
const folderPromises = [];
5251

5352
// Loop to get the files that should be compiled via parameter
54-
// eslint-disable-next-line no-restricted-syntax
5553
for (const folder of folders) {
5654
folderPromises.push(recursive(folder, ['!*.+(scss|css)']));
5755
}
@@ -78,7 +76,6 @@ export const stylesheets = async (options, path) => {
7876
}
7977
});
8078

81-
// eslint-disable-next-line no-restricted-syntax
8279
for (const file of files) {
8380
const outputFile = file.replace(`${sep}scss${sep}`, `${sep}css${sep}`)
8481
.replace(`${sep}build${sep}media_source${sep}`, `${sep}media${sep}`)

build/build-modules-js/compilejs.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export const scripts = async (options, path) => {
3535
} else if (stats.isFile()) {
3636
files.push(`${RootPath}/${path}`);
3737
} else {
38-
// eslint-disable-next-line no-console
3938
console.error(`Unknown path ${path}`);
4039
process.exitCode = 1;
4140
}
@@ -49,7 +48,6 @@ export const scripts = async (options, path) => {
4948
const folderPromises = [];
5049

5150
// Loop to get the files that should be compiled via parameter
52-
// eslint-disable-next-line no-restricted-syntax
5351
for (const folder of folders) {
5452
folderPromises.push(recursive(folder, ['!*.+(m|js)']));
5553
}

build/build-modules-js/compress.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export const compressFiles = async (enableBrotli = false) => {
3434
[].concat(...files).map((file) => compressTasks.push(compressFile(file, enableBrotli)));
3535

3636
await Promise.all(compressTasks);
37-
// eslint-disable-next-line no-console
3837
console.log('✅ Done 👍');
3938
bench.stop();
4039
};

build/build-modules-js/error-pages.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ export const createErrorPages = async (options) => {
111111
});
112112

113113
await Promise.all(iniFilesProcess).catch((err) => {
114-
// eslint-disable-next-line no-console
115114
console.error(err);
116115
process.exitCode = -1;
117116
});
@@ -152,15 +151,13 @@ export const createErrorPages = async (options) => {
152151

153152
await writeFile(`${RootPath}${folder}`, template, { encoding: 'utf8', mode: 0o644 });
154153

155-
// eslint-disable-next-line no-console
156154
console.error(`✅ Created the file: ${folder}`);
157155
});
158156
};
159157

160158
Object.keys(options.settings.errorPages).forEach((name) => processPages.push(processPage(name)));
161159

162160
return Promise.all(processPages).catch((err) => {
163-
// eslint-disable-next-line no-console
164161
console.error(err);
165162
process.exitCode = -1;
166163
});

build/build-modules-js/init/cleanup-media.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,17 @@ const {
1616
export const cleanVendors = async () => {
1717
if (process.env.SKIP_COMPOSER_CHECK === 'YES') {
1818
await mkdir('media/vendor/debugbar', { recursive: true, mode: 0o755 });
19-
// eslint-disable-next-line no-console
2019
console.log('Skipping the DebugBar assets...');
2120
return;
2221
}
2322

24-
// eslint-disable-next-line no-console
2523
console.log('Cleanup the Vendor ');
2624

2725
const mediaFolder = await stat(join(RootPath, 'libraries/vendor/php-debugbar/php-debugbar/src/DebugBar/Resources'));
2826

2927
if (await mediaFolder.isDirectory()) {
3028
// Remove the vendor folder
3129
// await remove(join(RootPath, 'media'));
32-
// eslint-disable-next-line no-console
3330
// console.error('/media has been removed.');
3431

3532
// Recreate the media folder
@@ -40,7 +37,6 @@ export const cleanVendors = async () => {
4037
await remove(join(RootPath, 'media/vendor/debugbar/vendor/font-awesome'));
4138
await remove(join(RootPath, 'media/vendor/debugbar/vendor/jquery'));
4239
} else {
43-
// eslint-disable-next-line no-console
4440
console.error("You need to run `npm install` AFTER the command `composer install`!!!. The debug plugin HASN'T installed all its front end assets");
4541
process.exitCode = 1;
4642
}

build/build-modules-js/init/common/concat-files.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const RootPath = process.cwd();
1313
export const concatFiles = async (files, output) => {
1414
const promises = [];
1515

16-
// eslint-disable-next-line no-restricted-syntax
1716
for (const file of files) {
1817
if (existsSync(`${RootPath}/${file}`)) {
1918
promises.push(readFile(`${RootPath}/${file}`, { encoding: 'utf8' }));

build/build-modules-js/init/exemptions/tinymce.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const xmlVersionStr = /(<version>)(.+)(<\/version>)/;
2222
*/
2323
const copyArrayFiles = async (dirName, files, name, type) => {
2424
const promises = [];
25-
// eslint-disable-next-line guard-for-in,no-restricted-syntax
2625
for (const file of files) {
2726
const folderName = dirName === '/' ? '/' : `/${dirName}/`;
2827

build/build-modules-js/init/localise-packages.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const copyFilesTo = async (files, srcDir, destDir) => {
3131
}
3232

3333
// Copy each file
34-
// eslint-disable-next-line no-restricted-syntax,guard-for-in
3534
for (const srcFile in files) {
3635
copyPromises.push(doTheCopy(join(srcDir, srcFile), join(destDir, files[srcFile])));
3736
}
@@ -48,7 +47,6 @@ const resolvePackage = async (vendor, packageName, mediaVendorPath, options, reg
4847
const vendorName = vendor.name || packageName;
4948
const modulePathJson = resolvePackageFile(`${packageName}/package.json`);
5049
const modulePathRoot = dirname(modulePathJson);
51-
// eslint-disable-next-line global-require, import/no-dynamic-require
5250
const moduleOptions = require(modulePathJson);
5351

5452
const promises = [];
@@ -106,7 +104,6 @@ const resolvePackage = async (vendor, packageName, mediaVendorPath, options, reg
106104
});
107105
}
108106

109-
// eslint-disable-next-line no-console
110107
console.log(`${packageName} was updated.`);
111108
};
112109

@@ -134,7 +131,6 @@ export const localisePackages = async (options) => {
134131
}
135132

136133
// Loop to get some text for the package.json
137-
// eslint-disable-next-line guard-for-in, no-restricted-syntax
138134
for (const packageName in options.settings.vendors) {
139135
const vendor = options.settings.vendors[packageName];
140136

0 commit comments

Comments
 (0)