Skip to content

Commit

Permalink
feat: upgrade dependencies: svgo, chalk, etc (#342)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: SVGO upgraded to v2, which requires a compatible config file
  • Loading branch information
jquense committed Dec 13, 2021
1 parent 221c6d3 commit 82f3317
Show file tree
Hide file tree
Showing 31 changed files with 3,341 additions and 4,360 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/node_modules/**
**/fixtures/**
**/build/**
**/package.json
**/CHANGELOG.md
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/fixtures/**
**/*.hbs
**/package.json
**/CHANGELOG.md
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"devDependencies": {
"@4c/prettier-config": "^1.1.0",
"eslint-config-4catalyzer": "^1.4.1",
"eslint-config-prettier": "^7.2.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "^24.7.0",
"eslint-plugin-prettier": "^3.4.1",
"lerna": "^3.22.1",
"eslint-plugin-jest": "^25.3.0",
"eslint-plugin-prettier": "^4.0.0",
"lerna": "^4.0.0",
"lint-staged": "^12.1.2"
}
}
2 changes: 1 addition & 1 deletion packages/build/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { debuglog } from 'util';

import { chalk, info, symbols } from '@4c/cli-core/ConsoleUtilities';
import { getPackages } from '@manypkg/get-packages';
import execa from 'execa';
import { execa } from 'execa';
import fsExtra from 'fs-extra';
import Listr from 'listr';

Expand Down
8 changes: 4 additions & 4 deletions packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
},
"dependencies": {
"@4c/cli-core": "^3.0.0",
"@babel/cli": "^7.15.4",
"@babel/core": "^7.15.5",
"@manypkg/get-packages": "^1.1.1",
"@babel/cli": "^7.16.0",
"@babel/core": "^7.16.0",
"@manypkg/get-packages": "^1.1.3",
"cpy": "^8.1.2",
"execa": "^6.0.0",
"fs-extra": "^10.0.0",
"listr": "^0.14.3",
"typescript": "^4.4.3"
"typescript": "^4.5.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-core/GitUtilities.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { relative, resolve } from 'path';

import execa from 'execa';
import { execa } from 'execa';
import gitDefaultBranch from 'git-default-branch';
import slash from 'slash';

Expand Down
10 changes: 5 additions & 5 deletions packages/cli-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
"directory": "packages/cli-core"
},
"dependencies": {
"chalk": "^4.1.2",
"chalk": "^5.0.0",
"execa": "^6.0.0",
"fs-extra": "^10.0.0",
"git-default-branch": "^1.0.0",
"globby": "^12.0.2",
"inquirer": "^8.1.5",
"is-ci": "^3.0.0",
"log-symbols": "^5.0.0",
"inquirer": "^8.2.0",
"is-ci": "^3.0.1",
"log-symbols": "^5.1.0",
"ora": "^6.0.1",
"slash": "^4.0.0",
"strip-ansi": "^7.0.1",
"text-table": "^0.2.0",
"yargs": "^17.1.1"
"yargs": "^17.3.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"pedantic": "^6.0.1",
"svg2c": "^2.0.0",
"ts-doctor": "^2.0.0",
"yargs": "^17.1.1"
"yargs": "^17.3.0"
},
"devDependencies": {
"webpack": "^5.65.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/file-butler/cli.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

import { success } from '@4c/cli-core/ConsoleUtilities';
import { readPackageUpAsync } from 'read-pkg-up';
import { readPackageUp } from 'read-pkg-up';
import Yargs from 'yargs';

import {
Expand Down Expand Up @@ -59,7 +59,7 @@ yargs
async (options) => {
let { publishDir } = options;
if (!publishDir) {
const result = await readPackageUpAsync({
const result = await readPackageUp({
cwd: process.cwd,
normalize: false,
});
Expand Down
4 changes: 2 additions & 2 deletions packages/file-butler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"cpy": "^8.1.2",
"fs-extra": "^10.0.0",
"globby": "^12.0.2",
"read-pkg-up": "^8.0.0",
"yargs": "^17.1.1"
"read-pkg-up": "^9.0.0",
"yargs": "^17.3.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/hooks/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { debuglog } from 'util';

import { findUp } from 'find-up';
import hasYarn from 'has-yarn';
import { readPackageUpAsync } from 'read-pkg-up';
import { readPackageUp } from 'read-pkg-up';

const debug = debuglog('hookem');

Expand All @@ -14,7 +14,7 @@ const isHook = (contents) => contents.includes('# hookem');

async function install() {
const [{ packageJson }, gitDir] = await Promise.all([
readPackageUpAsync(),
readPackageUp(),
findUp('.git', { type: 'directory' }),
]);

Expand Down
8 changes: 4 additions & 4 deletions packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
"@4c/cli": "^3.0.1",
"@4c/jest-preset": "^1.7.0",
"@4c/prettier-config": "^1.1.0",
"jest": "^26.6.3",
"jest": "^27.4.4",
"pinst": "^2.1.6"
},
"dependencies": {
"@4c/cli-core": "^3.0.0",
"find-up": "^6.0.0",
"find-up": "^6.2.0",
"has-yarn": "^3.0.0",
"read-pkg-up": "^8.0.0",
"yargs": "^17.1.1"
"read-pkg-up": "^9.0.0",
"yargs": "^17.3.0"
}
}
11 changes: 3 additions & 8 deletions packages/init/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { fileURLToPath } from 'url';

import { symbols } from '@4c/cli-core/ConsoleUtilities';
import nodePlop from 'node-plop/lib/node-plop.js';
import nodePlop from 'node-plop';

export const command = '$0 [location]';

Expand All @@ -19,15 +19,10 @@ export function builder(_) {
});
}

const filePath = fileURLToPath(new URL('plopfile.cjs', import.meta.url));
const filePath = fileURLToPath(new URL('plopfile.js', import.meta.url));

async function handlerImpl({ location }) {
const plop = nodePlop.default(filePath);

// we need to wait for the promise in plopfile.js to resolve out of band
// because plop doesn't await it internally and this is the only way to get ESM
// working since it requires the file we pass in
await import('./plopfile.cjs').then((m) => m.ready);
const plop = await nodePlop(filePath);

const newPkg = plop.getGenerator('new-package');

Expand Down
8 changes: 4 additions & 4 deletions packages/init/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"dependencies": {
"@4c/cli-core": "^3.0.0",
"find-yarn-workspace-root": "^2.0.0",
"glob": "^7.1.7",
"node-plop": "^0.26.2",
"prettier": "^2.4.1",
"yargs": "^17.1.1"
"glob": "^7.2.0",
"node-plop": "^0.30.0",
"prettier": "^2.5.1",
"yargs": "^17.3.0"
},
"publishConfig": {
"access": "public"
Expand Down
13 changes: 0 additions & 13 deletions packages/init/plopfile.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion packages/intl/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { statSync, writeFileSync } from 'fs';
import { createRequire } from 'module';
import { join, relative } from 'path';

import chalk from 'chalk';
import { chalk } from '@4c/cli-core/ConsoleUtilities';
import glob from 'glob';

const require = createRequire(import.meta.url);
Expand Down
5 changes: 2 additions & 3 deletions packages/intl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@
},
"dependencies": {
"@4c/cli-core": "^3.0.0",
"chalk": "^4.1.2",
"glob": "^7.1.7"
"glob": "^7.2.0"
},
"devDependencies": {
"jest": "^26.6.3"
"jest": "^27.4.4"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 4 additions & 4 deletions packages/pedantic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
},
"dependencies": {
"@4c/cli-core": "^3.0.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
"yargs": "^17.1.1"
"eslint": "^8.4.1",
"prettier": "^2.5.1",
"yargs": "^17.3.0"
},
"devDependencies": {
"@4c/jest-preset": "^1.7.0",
"jest": "^26.6.3"
"jest": "^27.4.4"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 4 additions & 4 deletions packages/rollout/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ import * as GitUtilities from '@4c/cli-core/GitUtilities';
import * as PromptUtilities from '@4c/cli-core/PromptUtilities';
import { createAltPublishDir } from '@4c/file-butler';
import exitHook from 'async-exit-hook';
import chalk from 'chalk';
import execa from 'execa';
import { execa } from 'execa';
import fs from 'fs-extra';
import hasYarn from 'has-yarn';
import Listr from 'listr';
import { readPackageUpAsync } from 'read-pkg-up';
import { readPackageUp } from 'read-pkg-up';
import rimraf from 'rimraf';
import { from } from 'rxjs';
import { catchError } from 'rxjs/operators';
Expand All @@ -21,6 +20,7 @@ import { recommendedBump, updateChangelog } from './conventional-commits.js';
import handleNpmError from './handleNpmError.js';
import { exec } from './rx.js';

const { chalk } = ConsoleUtilities;
const writeJson = (p, json) => fs.writeJson(p, json, { spaces: 2 });

async function runLifecycle(script, pkg) {
Expand Down Expand Up @@ -219,7 +219,7 @@ export const builder = (_) =>

const handlerImpl = async (argv) => {
const cwd = process.cwd();
const { path: pkgPath, packageJson } = await readPackageUpAsync({
const { path: pkgPath, packageJson } = await readPackageUp({
cwd,
normalize: false,
});
Expand Down
2 changes: 1 addition & 1 deletion packages/rollout/handleNpmError.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-param-reassign */
import chalk from 'chalk';
import { chalk } from '@4c/cli-core/ConsoleUtilities';
import listrInput from 'listr-input';
import { throwError } from 'rxjs';
import { catchError } from 'rxjs/operators';
Expand Down
5 changes: 2 additions & 3 deletions packages/rollout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,21 @@
"@4c/cli-core": "^3.0.0",
"@4c/file-butler": "^5.0.0",
"async-exit-hook": "^2.0.1",
"chalk": "^4.1.2",
"conventional-changelog": "^3.1.24",
"conventional-recommended-bump": "^6.1.0",
"execa": "^6.0.0",
"fs-extra": "^10.0.0",
"has-yarn": "^3.0.0",
"listr": "^0.14.3",
"listr-input": "^0.2.0",
"read-pkg-up": "^8.0.0",
"read-pkg-up": "^9.0.0",
"rimraf": "^3.0.0",
"rxjs": "^7.3.0",
"semver": "^7.3.5"
},
"devDependencies": {
"@4c/jest-preset": "^1.7.0",
"jest": "^26.6.3",
"jest": "^27.4.4",
"shelljs": "^0.8.4",
"tmp": "^0.2.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/rollout/rx.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import execa from 'execa';
import { execa } from 'execa';
import rxjs from 'rxjs';
import { filter } from 'rxjs/operators';

Expand Down
2 changes: 1 addition & 1 deletion packages/rollout/tests/conventional-commits.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const tmp = require('tmp');
const {
updateChangelog,
recommendedBump,
} = require('../conventional-commits');
} = require('../conventional-commits.js');

const commit = (...msgs) =>
shell.exec(
Expand Down
14 changes: 7 additions & 7 deletions packages/start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@
},
"dependencies": {
"@4c/cli-core": "^3.0.0",
"@babel/code-frame": "^7.14.5",
"dotenv": "^8.1.0",
"@babel/code-frame": "^7.16.0",
"dotenv": "^10.0.0",
"exists-case": "^0.1.0",
"fork-ts-checker-webpack-plugin": "^6.3.3",
"fork-ts-checker-webpack-plugin": "^6.5.0",
"lodash": "^4.17.21",
"react-dev-utils": "^11.0.1",
"react-dev-utils": "^11.0.4",
"webpack-dev-server": "^3.11.2",
"webpack-log": "^3.0.2",
"webpack-notifier": "^1.13.0",
"webpackbar": "^5.0.0-3"
"webpack-notifier": "^1.14.1",
"webpackbar": "^5.0.2"
},
"devDependencies": {
"webpack": "^5.65.0",
"webpack-atoms": "^16.1.0"
"webpack-atoms": "^17.1.0"
},
"peerDependencies": {
"webpack": ">=5.0.0"
Expand Down

0 comments on commit 82f3317

Please sign in to comment.