New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import babel-plugin-transform-unicode-property-regex #6499
Import babel-plugin-transform-unicode-property-regex #6499
Conversation
"version": "3.0.0", | ||
"description": "Compile Unicode property escapes in Unicode regular expressions to ES5.", | ||
"homepage": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-unicode-property-regex", | ||
"main": "dist/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are using lib/index.js
in our packages
"main": "lib/index.js", |
"dist" | ||
], | ||
"scripts": { | ||
"build": "babel src -d dist", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove these scripts and devDeps since we have a build/test runner already
"@babel/helper-plugin-test-runner": "7.0.0-beta.3"
@@ -0,0 +1,55 @@ | |||
# babel-plugin-transform-unicode-property-regex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be @babel/plugin-transform-unicode-property-regex
## Installation | ||
|
||
```sh | ||
$ npm install babel-plugin-transform-unicode-property-regex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.26.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-register": "^6.26.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use Babel 7?
Original: https://github.com/mathiasbynens/babel-plugin-transform-unicode-property-regex Moving it into the official Babel repository makes it easier to maintain the transform.
@mathiasbynens mind if I make a few cleanup tweaks to this PR? |
@existentialism Of course not! Go ahead :) Thanks! |
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/5376/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
@@ -13,6 +13,6 @@ | |||
"@babel/plugin-transform-class-properties": "7.0.0-beta.3", | |||
"@babel/plugin-transform-object-rest-spread": "7.0.0-beta.3", | |||
"@babel/plugin-transform-optional-catch-binding": "7.0.0-beta.3", | |||
"babel-plugin-transform-unicode-property-regex": "^2.0.5" | |||
"@babel/plugin-transform-unicode-property-regex": "7.0.0-beta.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, almost done |
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-unicode-property-regex.git" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think .git
should be removed, since that url doesn't point to the git repo itself but to a subdirectory.
@@ -2,7 +2,7 @@ | |||
"name": "@babel/plugin-transform-unicode-property-regex", | |||
"version": "7.0.0-beta.3", | |||
"description": "Compile Unicode property escapes in Unicode regular expressions to ES5.", | |||
"homepage": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-unicode-property-regex", | |||
"homepage": "https://babeljs.io/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other transforms in packages point to the tree
URL. Why would this one be different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we handle the homepage
key relatively inconsistently: most transforms don't have it, except transform-regenerator which has the tree URL; the rest point to the website.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on npm
The url to the project homepage.
So I think the site sounds right? shrug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm… The “project” in this case is this particular transform, not Babel itself (which is the parent project) IMHO. No big deal either way :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with either, if we want to do the url of the package then we should change everything, although I thought repo covers that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's decide and normalize in a followup PR?
SGTM
|
Original: https://github.com/mathiasbynens/babel-plugin-transform-unicode-property-regex
Moving it into the official Babel repository makes it easier to maintain the transform.