Known patches
Contents
- builtins 3
- chalk 5
- coffeescript 2
- cosmi-config 7
- crypto-random-string 3
- execa 6
- formidable 3
- is-plain-object 5
- jest 29
- js-tokens 6
- js-yaml 4
- mime 2
- minimatch 9
- mkdirp 1
- path-to-regex 6 (also express)
- readable-stream 3
- regenerate-unicode-properties 10
- rollup 3
- schema-utils 3
- semver 7
- signal-exit 4
- yargs 15
builtins 3
chalk 5
node-chalk provides 2 distinct API:
- ES API which is chalk@5
CommonJS API which is both compatible with chalk@4 and chalk@5 (done to help during transition) with some changes
1 @@ -2,7 +2,7 @@
2 const EventEmitter = require('events')
3 const { resolve, dirname, join } = require('path')
4 const Config = require('@npmcli/config')
5 -const chalk = require('chalk')
6 +const {Chalk} = require('chalk')
7 const which = require('which')
8 const fs = require('fs/promises')
9
10 @@ -352,7 +352,7 @@
11 if (!this.color) {
12 level = 0
13 }
14 - this.#chalk = new chalk.Instance({ level })
15 + this.#chalk = new Chalk({ level })
16 }
17 return this.#chalk
18 }
This works well except during typescript transpilation. For package that needs chalk@4 typescript declarations, a workaround can be to install in node_modules (for dh-sequence-nodejs packages: in debian/build_modules) a forged @types/chalk and drop node_modules/chalk link.
download chalk@^4 and copy index.d.ts
create @types/chalk/package.json with this content:
coffeescript 2
See http://coffeescript.org/v2/#breaking-changes-super-this
cosmi-config 7
1 - const config = require('cosmiconfig')
2 - opts = config('postcss', options)
3 + const {cosmiconfig} = require('cosmiconfig')
4 + opts = cosmiconfig('postcss', options)
5
6 - const config = require('cosmiconfig')
7 - const result = config('postcss', options).searchSync(path)
8 + const {cosmiconfigSync} = require('cosmiconfig')
9 + const result = cosmiconfigSync('postcss', options).search(path)
10
crypto-random-string 3
execa 6
formidable 3
is-plain-object 5
- const isPlainObject = require('is-plain-object');
+ const {isPlainObject} = require('is-plain-object');
jest 29
Snapshot format changed with jest 29. To go back to previous format, simply add this in package.json
See https://jestjs.io/docs/upgrading-to-jest29 for more
js-tokens 6
js-token was a regex until version 6, then a function.
js-yaml 4
mime 2
Version 2 is a breaking change from 1.x. Specifically:
lookup() renamed to getType()
extension() renamed to getExtension()
charset() and load() methods have been removed
minimatch 9
mkdirp 1
path-to-regex 6 (also express)
- pathToRegex('*')
+ pathToRegex('(*)')
+ // OR
+ pathToRegex(':foo*')In express:
- app.get("*", ...args)
+ app.get("(*)", ...args)
readable-stream 3
regenerate-unicode-properties 10
rollup 3
"rollup 3" no longer accepts hybrid ES/CJS configuration files. Example:
1 --- a/rollup.config.js
2 +++ b/rollup.config.js
3 @@ -1,7 +1,7 @@
4 -import buble from 'rollup-plugin-buble';
5 -import pkg from './package.json';
6 +const buble = require('rollup-plugin-buble');
7 +const pkg = require('./package.json');
8
9 -export default {
10 +module.exports = {
11 input: 'src/index.js',
12
13 external: [
schema-utils 3
- const validateOptions = require("schema-utils");
+ const validateOptions = require("schema-utils").validate;
- import validateOptions from 'schema-utils';
+ import { validate as validateOptions } from 'schema-utils';
semver 7
signal-exit 4
