Merge branch 'renovate/chalk-5.x' into 'develop'

Update dependency chalk to v5

See merge request pleroma/pleroma-fe!2025
This commit is contained in:
HJ 2025-02-03 14:52:21 +00:00
commit 66f35f15af
5 changed files with 890 additions and 2015 deletions

View file

@ -1,5 +1,5 @@
// https://github.com/shelljs/shelljs // https://github.com/shelljs/shelljs
require('./check-versions')() import('./check-versions.mjs').then(m => m.default())
require('shelljs/global') require('shelljs/global')
env.NODE_ENV = 'production' env.NODE_ENV = 'production'

View file

@ -1,10 +1,7 @@
var semver = require('semver') import semver from 'semver'
var chalk = require('chalk') import chalk from 'chalk'
var packageConfig = require('../package.json')
var exec = function (cmd) { import packageConfig from '../package.json' with { type: 'json' }
return require('child_process')
.execSync(cmd).toString().trim()
}
var versionRequirements = [ var versionRequirements = [
{ {
@ -14,10 +11,10 @@ var versionRequirements = [
} }
] ]
module.exports = function () { export default function () {
var warnings = [] const warnings = []
for (var i = 0; i < versionRequirements.length; i++) { for (let i = 0; i < versionRequirements.length; i++) {
var mod = versionRequirements[i] const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' + warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' + chalk.red(mod.currentVersion) + ' should be ' +
@ -28,8 +25,8 @@ module.exports = function () {
if (warnings.length) { if (warnings.length) {
console.warn(chalk.yellow('\nTo use this template, you must update following to modules:\n')) console.warn(chalk.yellow('\nTo use this template, you must update following to modules:\n'))
for (var i = 0; i < warnings.length; i++) { for (let i = 0; i < warnings.length; i++) {
var warning = warnings[i] const warning = warnings[i]
console.warn(' ' + warning) console.warn(' ' + warning)
} }
console.warn() console.warn()

View file

@ -1,4 +1,4 @@
require('./check-versions')() import('./check-versions.mjs').then(m => m.default())
var config = require('../config') var config = require('../config')
if (!process.env.NODE_ENV) process.env.NODE_ENV = config.dev.env if (!process.env.NODE_ENV) process.env.NODE_ENV = config.dev.env
var path = require('path') var path = require('path')

View file

@ -65,7 +65,7 @@
"babel-loader": "9.2.1", "babel-loader": "9.2.1",
"babel-plugin-lodash": "3.3.4", "babel-plugin-lodash": "3.3.4",
"chai": "4.5.0", "chai": "4.5.0",
"chalk": "1.1.3", "chalk": "5.4.1",
"chromedriver": "132.0.2", "chromedriver": "132.0.2",
"connect-history-api-fallback": "2.0.0", "connect-history-api-fallback": "2.0.0",
"copy-webpack-plugin": "12.0.2", "copy-webpack-plugin": "12.0.2",

2876
yarn.lock

File diff suppressed because it is too large Load diff