Skip to content

Commit

Permalink
Bump dev dependencies (#1001)
Browse files Browse the repository at this point in the history
* migrate to @babel/eslint-parser

* bump prettier and eslint-prettier

* bump rimraf to 5

* pin minipass to 6.0.2

minipass 7 uses node builtin import specifier `node:`, which does not support Node.js 14.15

* bump yarn to 3.6.1

* pin minipass to 6.0.2
  • Loading branch information
JLHwung committed Jul 27, 2023
1 parent 70f74d8 commit c9d65eb
Show file tree
Hide file tree
Showing 12 changed files with 2,661 additions and 2,151 deletions.
42 changes: 36 additions & 6 deletions .eslintrc
@@ -1,11 +1,41 @@
{
"env": {
"es6": true,
"node": true
"parser": "@babel/eslint-parser",
"extends": ["eslint:recommended", "eslint-config-prettier"],
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"extends": ["eslint-config-babel", "eslint-config-prettier"],
"plugins": ["prettier"],
"rules": {
"camelcase": "off",
"consistent-return": "off",
"curly": ["error", "multi-line"],
"linebreak-style": ["error", "unix"],
"max-len": ["error", 110, 2],
"new-cap": "off",
"no-case-declarations": "error",
"no-cond-assign": "off",
"no-confusing-arrow": "error",
"no-console": "off",
"no-constant-condition": "off",
"no-empty": "off",
"no-fallthrough": "off",
"no-inner-declarations": "off",
"no-labels": "off",
"no-loop-func": "off",
"no-process-exit": "off",
"no-return-assign": "off",
"no-shadow": "off",
"no-underscore-dangle": "off",
"no-unreachable": "off",
"no-use-before-define": "off",
"no-var": "error",
"prefer-const": "error",
"strict": "off",
"prettier/prettier": "error"
}
},
"env": {
"node": true,
"es6": true
},
"plugins": ["prettier"]
}
783 changes: 0 additions & 783 deletions .yarn/releases/yarn-3.2.3.cjs

This file was deleted.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
@@ -1 +1 @@
yarnPath: .yarn/releases/yarn-3.2.3.cjs
yarnPath: .yarn/releases/yarn-3.6.1.cjs
32 changes: 17 additions & 15 deletions package.json
Expand Up @@ -19,26 +19,24 @@
},
"devDependencies": {
"@ava/babel": "^1.0.1",
"@babel/cli": "^7.19.3",
"@babel/core": "^7.19.6",
"@babel/preset-env": "^7.19.4",
"@babel/cli": "^7.22.9",
"@babel/core": "^7.22.9",
"@babel/eslint-parser": "^7.22.9",
"@babel/preset-env": "^7.22.9",
"ava": "^3.13.0",
"babel-eslint": "^10.1.0",
"babel-plugin-react-intl": "^8.2.25",
"c8": "^8.0.0",
"eslint": "^7.13.0",
"eslint-config-babel": "^9.0.0",
"eslint-config-prettier": "^6.3.0",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-prettier": "^3.0.0",
"husky": "^4.3.0",
"lint-staged": "^10.5.1",
"pnp-webpack-plugin": "^1.6.4",
"prettier": "^2.1.2",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.3",
"pnp-webpack-plugin": "^1.7.0",
"prettier": "^3.0.0",
"react": "^17.0.1",
"react-intl": "^5.9.4",
"react-intl-webpack-plugin": "^0.3.0",
"rimraf": "^3.0.0",
"rimraf": "^5.0.1",
"semver": "7.5.2",
"webpack": "^5.74.0"
},
Expand All @@ -53,6 +51,9 @@
"test": "yarn run lint && yarn run build --source-maps && c8 yarn run test-only",
"test-only": "ava"
},
"resolutions": {
"minipass": "6.0.2"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel-loader.git"
Expand Down Expand Up @@ -116,5 +117,6 @@
"node ./scripts/yarn-install.js",
"git add yarn.lock"
]
}
},
"packageManager": "yarn@3.6.1"
}
7 changes: 3 additions & 4 deletions test/cache.test.js
@@ -1,7 +1,7 @@
import test from "ava";
import fs from "fs";
import path from "path";
import rimraf from "rimraf";
import { rimraf } from "rimraf";
import webpack from "webpack";
import createTestDirectory from "./helpers/createTestDirectory";

Expand Down Expand Up @@ -48,9 +48,8 @@ test.beforeEach.cb(t => {
t.end();
});
});
test.beforeEach.cb(t => rimraf(defaultCacheDir, t.end));
test.afterEach.cb(t => rimraf(t.context.directory, t.end));
test.afterEach.cb(t => rimraf(t.context.cacheDirectory, t.end));
test.beforeEach(() => rimraf(defaultCacheDir));
test.afterEach(t => rimraf([t.context.directory, t.context.cacheDirectory]));

test.cb("should output files to cache directory", t => {
const config = Object.assign({}, globalConfig, {
Expand Down
17 changes: 10 additions & 7 deletions test/helpers/createTestDirectory.js
@@ -1,16 +1,19 @@
import path from "path";
import fs from "fs";
import rimraf from "rimraf";
import { rimraf } from "rimraf";

export default function createTestDirectory(baseDirectory, testTitle, cb) {
const directory = path.join(baseDirectory, escapeDirectory(testTitle));

rimraf(directory, err => {
if (err) return cb(err);
fs.mkdir(directory, { recursive: true }, mkdirErr =>
cb(mkdirErr, directory),
);
});
rimraf(directory)
.then(() => {
fs.mkdir(directory, { recursive: true }, mkdirErr =>
cb(mkdirErr, directory),
);
})
.catch(err => {
cb(err);
});
}

function escapeDirectory(directory) {
Expand Down
4 changes: 2 additions & 2 deletions test/loader.test.js
@@ -1,7 +1,7 @@
import test from "ava";
import fs from "fs";
import path from "path";
import rimraf from "rimraf";
import { rimraf } from "rimraf";
import { satisfies } from "semver";
import webpack from "webpack";
import createTestDirectory from "./helpers/createTestDirectory";
Expand Down Expand Up @@ -38,7 +38,7 @@ test.beforeEach.cb(t => {
});
});

test.afterEach.cb(t => rimraf(t.context.directory, t.end));
test.afterEach(t => rimraf(t.context.directory));

test.cb("should transpile the code snippet", t => {
const config = Object.assign({}, globalConfig, {
Expand Down
4 changes: 2 additions & 2 deletions test/metadata.test.js
@@ -1,7 +1,7 @@
import test from "ava";
import fs from "fs";
import path from "path";
import rimraf from "rimraf";
import { rimraf } from "rimraf";
import webpack from "webpack";
import PnpWebpackPlugin from "pnp-webpack-plugin";
import createTestDirectory from "./helpers/createTestDirectory";
Expand Down Expand Up @@ -48,7 +48,7 @@ test.beforeEach.cb(t => {
});
});

test.afterEach.cb(t => rimraf(t.context.directory, t.end));
test.afterEach(t => rimraf(t.context.directory));

test.cb("should pass metadata code snippet", t => {
const config = Object.assign({}, globalConfig, {
Expand Down
4 changes: 2 additions & 2 deletions test/options.test.js
@@ -1,7 +1,7 @@
import test from "ava";
import fs from "fs";
import path from "path";
import rimraf from "rimraf";
import { rimraf } from "rimraf";
import webpack from "webpack";
import createTestDirectory from "./helpers/createTestDirectory";

Expand Down Expand Up @@ -34,7 +34,7 @@ test.beforeEach.cb(t => {
});
});

test.afterEach.cb(t => rimraf(t.context.directory, t.end));
test.afterEach(t => rimraf(t.context.directory));

test.cb("should interpret options given to the loader", t => {
const config = Object.assign({}, globalConfig, {
Expand Down
4 changes: 2 additions & 2 deletions test/sourcemaps.test.js
@@ -1,7 +1,7 @@
import test from "ava";
import fs from "fs";
import path from "path";
import rimraf from "rimraf";
import { rimraf } from "rimraf";
import webpack from "webpack";
import createTestDirectory from "./helpers/createTestDirectory";
import isWebpack5 from "./helpers/isWebpack5";
Expand Down Expand Up @@ -32,7 +32,7 @@ test.beforeEach.cb(t => {
});
});

test.afterEach.cb(t => rimraf(t.context.directory, t.end));
test.afterEach(t => rimraf(t.context.directory));

test.cb("should output webpack's sourcemap", t => {
const config = Object.assign({}, globalConfig, {
Expand Down

0 comments on commit c9d65eb

Please sign in to comment.