Skip to content

Commit

Permalink
Merge branch 'main' into typescript-eslint-v6
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Jul 11, 2023
2 parents c6da106 + 30ff3ac commit edc781b
Show file tree
Hide file tree
Showing 263 changed files with 2,271 additions and 1,657 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ module.exports = {
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/e2e-tests-breaking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ jobs:
- create-react-app
- vue-cli
- jest
- react-native
# todo: Enable this test when metro-source-map does not reassign NodePath cache
# https://github.com/facebook/metro/blob/29bb5f2ad3319ba8f4764c3993aa85c15f59af23/packages/metro-source-map/src/generateFunctionMap.js#L182
# react-native
- prettier
- angular-cli
steps:
- name: Get yarn1 cache directory path
id: yarn1-cache-dir-path
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests-esm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ jobs:
fail-fast: false
matrix:
project:
- babel
- create-react-app
- prettier
steps:
- name: Get yarn1 cache directory path
id: yarn1-cache-dir-path
Expand Down Expand Up @@ -82,5 +84,3 @@ jobs:
path: /tmp/verdaccio-workspace
- name: Test
run: ./scripts/integration-tests/e2e-${{ matrix.project }}.sh
env:
USE_ESM: true
1 change: 1 addition & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
- jest
- react-native
- prettier
- angular-cli
steps:
- name: Get yarn1 cache directory path
id: yarn1-cache-dir-path
Expand Down
312 changes: 156 additions & 156 deletions .yarn/releases/yarn-3.6.0.cjs → .yarn/releases/yarn-3.6.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ packageExtensions:
# It doesn't support Prettier 3 yet
prettier: "^2.0.0"

yarnPath: .yarn/releases/yarn-3.6.0.cjs
yarnPath: .yarn/releases/yarn-3.6.1.cjs
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,51 @@ This file contains the changelog starting frm v7.15.0.

<!-- DO NOT CHANGE THESE COMMENTS - See .github/actions/trigger-github-release/update-changelog.js -->
<!-- insert-new-changelog-here -->
## v7.22.8 (2023-07-06)

#### :leftwards_arrow_with_hook: Revert
* `babel-core`, `babel-traverse`
* [#15754](https://github.com/babel/babel/pull/15754) Revert "Use `NodePath#hub` as part of the paths cache key" ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
## v7.22.7 (2023-07-06)

#### :bug: Bug Fix
* `babel-generator`
* [#15719](https://github.com/babel/babel/pull/15719) fix: Avoid internally generating negative source maps columns ([@liuxingbaoyu](https://github.com/liuxingbaoyu))
* `babel-core`, `babel-traverse`
* [#15725](https://github.com/babel/babel/pull/15725) Use `NodePath#hub` as part of the paths cache key ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* Other
* [#15747](https://github.com/babel/babel/pull/15747) fix: export `meta` from `eslint-parser/experimental-worker` ([@JLHwung](https://github.com/JLHwung))

#### :house: Internal
* `babel-core`, `babel-traverse`
* [#15702](https://github.com/babel/babel/pull/15702) Refactor visitors merging ([@nullableVoidPtr](https://github.com/nullableVoidPtr))
## v7.22.6 (2023-07-04)

#### :bug: Bug Fix
* `babel-compat-data`, `babel-helper-compilation-targets`, `babel-preset-env`
* [#15727](https://github.com/babel/babel/pull/15727) Add opera mobile compat data ([@JLHwung](https://github.com/JLHwung))
* `babel-plugin-transform-optional-chaining`
* [#15739](https://github.com/babel/babel/pull/15739) Fix transform of `delete a?.b` in function params ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* `babel-helper-split-export-declaration`, `babel-plugin-transform-modules-commonjs`
* [#15736](https://github.com/babel/babel/pull/15736) fix: Default export for duplicate names ([@liuxingbaoyu](https://github.com/liuxingbaoyu))
* `babel-compat-data`, `babel-preset-env`
* [#15726](https://github.com/babel/babel/pull/15726) update compat-data sources ([@JLHwung](https://github.com/JLHwung))
* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-runtime-corejs3`, `babel-runtime`
* [#15705](https://github.com/babel/babel/pull/15705) Fix handling of sync error in `@@asyncDispose` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* `babel-standalone`
* [#15707](https://github.com/babel/babel/pull/15707) fix: Support transforming Explicit Resource Management in `stage-2` ([@liuxingbaoyu](https://github.com/liuxingbaoyu))
* `babel-core`
* [#15626](https://github.com/babel/babel/pull/15626) fix: Works correctly with `--frozen-intrinsics` ([@liuxingbaoyu](https://github.com/liuxingbaoyu))

#### :house: Internal
* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-classes`
* [#15700](https://github.com/babel/babel/pull/15700) Minor class transform cleanups ([@JLHwung](https://github.com/JLHwung))

#### :microscope: Output optimization
* `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-typescript`
* [#15740](https://github.com/babel/babel/pull/15740) Compress output for optional chain with multiple `?.` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-property-in-object`, `babel-traverse`
* [#15741](https://github.com/babel/babel/pull/15741) Inject tmp vars in the params list of IIFEs when possible ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
## v7.22.5 (2023-06-08)

#### :bug: Bug Fix
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FLOW_COMMIT = 105ad30f566f401db9cafcb49cd2831fb29e87c5
TEST262_COMMIT = 2f0193d4cf583091f7717b7851270a75a78826e4
TEST262_COMMIT = 8ce9864511c1c83ba2d0b351da3390c9e33fd60e
TYPESCRIPT_COMMIT = d87d0adcd30ac285393bf3bfbbb4d94d50c4f3c9

SOURCES = packages codemods eslint
Expand Down
4 changes: 4 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
"use strict";

if (typeof it === "function") {
throw new Error("Monorepo root's babel.config.js loaded by a test.");
}

const pathUtils = require("path");
const fs = require("fs");
const { parseSync } = require("@babel/core");
Expand Down
5 changes: 3 additions & 2 deletions eslint/babel-eslint-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@babel/eslint-parser",
"version": "7.22.5",
"version": "7.22.7",
"description": "ESLint parser that allows for linting of experimental syntax transformed by Babel",
"author": "The Babel Team (https://babel.dev/team)",
"license": "MIT",
Expand Down Expand Up @@ -32,9 +32,10 @@
},
"dependencies": {
"@nicolo-ribaudo/eslint-scope-5-internals": "condition:BABEL_8_BREAKING ? : 5.1.1-v1",
"@nicolo-ribaudo/semver-v6": "condition:BABEL_8_BREAKING ? : ^6.3.3",
"eslint-scope": "condition:BABEL_8_BREAKING ? ^7.1.1 : ",
"eslint-visitor-keys": "condition:BABEL_8_BREAKING ? ^3.3.0 : ^2.1.0",
"semver": "condition:BABEL_8_BREAKING ? ^7.3.4 : ^6.3.0"
"semver": "condition:BABEL_8_BREAKING ? ^7.3.4 : "
},
"devDependencies": {
"@babel/core": "workspace:^",
Expand Down
5 changes: 5 additions & 0 deletions eslint/babel-eslint-parser/src/experimental-worker.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ const baseParse = require("./parse.cjs");
const { WorkerClient } = require("./client.cjs");
const client = new WorkerClient();

exports.meta = {
name: "@babel/eslint-parser/experimental-worker",
version: PACKAGE_JSON.version,
};

exports.parseForESLint = function (code, options = {}) {
const normalizedOptions = normalizeESLintConfig(options);
const ast = baseParse(code, normalizedOptions, client);
Expand Down
4 changes: 3 additions & 1 deletion eslint/babel-eslint-parser/src/parse.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"use strict";

const semver = require("semver");
const semver = process.env.BABEL_8_BREAKING
? require("semver")
: require("@nicolo-ribaudo/semver-v6");
const convert = require("./convert/index.cjs");

const babelParser = require(require.resolve("@babel/parser", {
Expand Down
13 changes: 12 additions & 1 deletion eslint/babel-eslint-parser/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,20 @@ import escope from "eslint-scope";
import unpad from "dedent";
import { fileURLToPath } from "url";
import { createRequire } from "module";
import { parseForESLint } from "../lib/index.cjs";
import { parseForESLint as parseForESLintOriginal } from "../lib/index.cjs";
import { ESLint } from "eslint";

function parseForESLint(code, options) {
return parseForESLintOriginal(code, {
requireConfigFile: false,
...options,
babelOptions: {
configFile: false,
...options.babelOptions,
},
});
}

const ESLINT_VERSION = ESLint.version;
const isESLint7 = ESLINT_VERSION.startsWith("7.");
const dirname = path.dirname(fileURLToPath(import.meta.url));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ export default function verifyAndAssertMessages(
parserOptions: {
sourceType,
requireConfigFile: false,
...(overrideConfig && overrideConfig.parserOptions),
babelOptions: {
configFile: path.resolve(
path.dirname(fileURLToPath(import.meta.url)),
"../../../babel-eslint-shared-fixtures/config/babel.config.js",
),
...(overrideConfig &&
overrideConfig.parserOptions &&
overrideConfig.parserOptions.babelOptions),
},
...(overrideConfig && overrideConfig.parserOptions),
},
});

Expand Down
4 changes: 4 additions & 0 deletions lib/semver.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "@nicolo-ribaudo/semver-v6" {
export { default } from "semver";
export * from "semver";
}
31 changes: 17 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel",
"version": "7.22.5",
"version": "7.22.8",
"version_babel8": "8.0.0-alpha",
"private": true,
"type": "commonjs",
Expand All @@ -18,7 +18,7 @@
"test:runtime:bundlers": "node test/runtime-integration/bundlers.cjs",
"test:runtime:node": "node test/runtime-integration/node.cjs"
},
"packageManager": "yarn@3.6.0",
"packageManager": "yarn@3.6.1",
"devDependencies": {
"$repo-utils": "link:./scripts/repo-utils",
"@babel/cli": "^7.21.5",
Expand All @@ -41,21 +41,21 @@
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-replace": "^5.0.2",
"@types/jest": "^29.5.2",
"@types/node": "^18.11.7",
"@typescript-eslint/eslint-plugin": "6.0.0-alpha.158",
"@typescript-eslint/parser": "6.0.0-alpha.158",
"@types/node": "^20.3.3",
"@typescript-eslint/eslint-plugin": "6.0.0",
"@typescript-eslint/parser": "6.0.0",
"babel-plugin-transform-charcodes": "^0.2.0",
"c8": "^7.12.0",
"chalk": "^5.0.0",
"charcodes": "^0.2.0",
"core-js": "^3.30.2",
"eslint": "^8.22.0",
"eslint": "^8.44.0",
"eslint-formatter-codeframe": "^7.32.1",
"eslint-import-resolver-node": "^0.3.6",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.1.5",
"eslint-plugin-jest": "^27.2.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "5.0.0-alpha.1",
"eslint-plugin-prettier": "5.0.0-alpha.2",
"glob": "^10.2.2",
"gulp": "^4.0.2",
"gulp-filter": "^7.0.0",
Expand All @@ -68,7 +68,7 @@
"jest-worker": "^29.5.0",
"lint-staged": "^13.0.3",
"mergeiterator": "^1.4.4",
"prettier": "3.0.0-alpha.12",
"prettier": "^3.0.0",
"rollup": "^2.79.1",
"rollup-plugin-dts": "^5.3.0",
"rollup-plugin-polyfill-node": "^0.12.0",
Expand All @@ -77,7 +77,7 @@
"shelljs": "^0.8.5",
"test262-stream": "^1.4.0",
"through2": "^4.0.0",
"typescript": "^5.0.2"
"typescript": "^5.1.6"
},
"workspaces": [
"codemods/*",
Expand All @@ -88,13 +88,16 @@
"benchmark"
],
"resolutions": {
"browserslist": "npm:4.21.5",
"caniuse-lite": "npm:1.0.30001460",
"core-js-compat": "npm:3.29.0",
"electron-to-chromium": "npm:1.4.320",
"browserslist": "npm:4.21.9",
"caniuse-lite": "npm:1.0.30001508",
"core-js-compat": "npm:3.31.0",
"electron-to-chromium": "npm:1.4.441",
"glob-watcher/chokidar": "npm:^3.4.0",
"@types/babel__core": "link:./nope",
"@types/babel__traverse": "link:./nope",
"@typescript-eslint/eslint-plugin": "6.0.0",
"@typescript-eslint/parser": "6.0.0",
"@typescript-eslint/utils": "6.0.0",
"@babel/parser/@babel/types": "workspace:*",
"@babel/plugin-syntax-unicode-sets-regex/@babel/helper-create-regexp-features-plugin": "workspace:*",
"babel-plugin-polyfill-corejs2/@babel/compat-data": "workspace:*"
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@babel/cli",
"version": "7.22.5",
"version": "7.22.6",
"description": "Babel command line.",
"author": "The Babel Team (https://babel.dev/team)",
"homepage": "https://babel.dev/docs/en/next/babel-cli",
Expand Down Expand Up @@ -42,10 +42,10 @@
"devDependencies": {
"@babel/core": "workspace:^",
"@babel/helper-fixtures": "workspace:^",
"@nicolo-ribaudo/semver-v6": "^6.3.3",
"@types/fs-readdir-recursive": "^1.1.0",
"@types/glob": "^7.2.0",
"rimraf": "^3.0.0",
"semver": "^6.3.0"
"rimraf": "^3.0.0"
},
"bin": {
"babel": "./bin/babel.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-cli/test/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import readdir from "fs-readdir-recursive";
import * as helper from "@babel/helper-fixtures";
import rimraf from "rimraf";
import semver from "semver";
import semver from "@nicolo-ribaudo/semver-v6";
import child from "child_process";
import path from "path";
import fs from "fs";
Expand Down

0 comments on commit edc781b

Please sign in to comment.