Skip to content

Commit

Permalink
use helper-plugin-utils in named-capturing-groups
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Apr 27, 2022
1 parent 99d3abd commit beda280
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/babel-parser/src/plugins/flow/index.js
Expand Up @@ -353,7 +353,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
return type;
}

flowParsePredicate(): N.FlowType {
flowParsePredicate(): N.FlowPredicate {
const node = this.startNode();
const moduloLoc = this.state.startLoc;
this.next(); // eat `%`
Expand Down
Expand Up @@ -21,7 +21,8 @@
},
"bugs": "https://github.com/babel/babel/issues",
"dependencies": {
"@babel/helper-create-regexp-features-plugin": "workspace:^"
"@babel/helper-create-regexp-features-plugin": "workspace:^",
"@babel/helper-plugin-utils": "workspace:^"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
Expand Down
@@ -1,7 +1,12 @@
/* eslint-disable @babel/development/plugin-name */
import { createRegExpFeaturePlugin } from "@babel/helper-create-regexp-features-plugin";
import { declare } from "@babel/helper-plugin-utils";

export default function (core, options) {
export interface Options {
runtime?: boolean;
}

export default declare((api, options: Options) => {
const { runtime = true } = options;
if (typeof runtime !== "boolean") {
throw new Error("The 'runtime' option must be boolean");
Expand All @@ -12,4 +17,4 @@ export default function (core, options) {
feature: "namedCaptureGroups",
options: { runtime },
});
}
});
13 changes: 7 additions & 6 deletions yarn.lock
Expand Up @@ -2702,6 +2702,7 @@ __metadata:
"@babel/core": "workspace:^"
"@babel/helper-create-regexp-features-plugin": "workspace:^"
"@babel/helper-plugin-test-runner": "workspace:^"
"@babel/helper-plugin-utils": "workspace:^"
core-js: ^3.22.1
peerDependencies:
"@babel/core": ^7.0.0
Expand Down Expand Up @@ -15133,22 +15134,22 @@ fsevents@^1.2.7:
linkType: hard

"typescript@npm:~4.5.0":
version: 4.5.2
resolution: "typescript@npm:4.5.2"
version: 4.5.5
resolution: "typescript@npm:4.5.5"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 74f9ce65d532bdf5d0214b3f60cf37992180023388c87a11ee6f838a803067ef0b63c600fa501b0deb07f989257dce1e244c9635ed79feca40bbccf6e0aa1ebc
checksum: 506f4c919dc8aeaafa92068c997f1d213b9df4d9756d0fae1a1e7ab66b585ab3498050e236113a1c9e57ee08c21ec6814ca7a7f61378c058d79af50a4b1f5a5e
languageName: node
linkType: hard

"typescript@patch:typescript@~4.5.0#~builtin<compat/typescript>":
version: 4.5.2
resolution: "typescript@patch:typescript@npm%3A4.5.2#~builtin<compat/typescript>::version=4.5.2&hash=493e53"
version: 4.5.5
resolution: "typescript@patch:typescript@npm%3A4.5.5#~builtin<compat/typescript>::version=4.5.5&hash=493e53"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 53838d56aba6fcc947d63aa0771e5d966b1b648fddafed6e221d7f38c71219c4e036ece8cfe9e35ed80cf5a35ff4eb958934c993f99c3233773ec4f9ccd53f69
checksum: c05c318d79c690f101d7ffb34cd6c7d6bbd884d3af9cefe7749ad0cd6be43c7082f098280982ca945dcba23fde34a08fed9602bb26540936baf8c0520727d3ba
languageName: node
linkType: hard

Expand Down

0 comments on commit beda280

Please sign in to comment.