forked from enviPath/enviPy
Current Dev State
This commit is contained in:
654
static/js/ketcher2/node_modules/babel-preset-env/CHANGELOG.md
generated
vendored
Normal file
654
static/js/ketcher2/node_modules/babel-preset-env/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,654 @@
|
||||
# Changelog
|
||||
|
||||
## v1.6.0 (2017-07-04)
|
||||
|
||||
### :rocket: New Feature
|
||||
|
||||
- Bump compat-table for node8 support ([#363](https://github.com/babel/babel-preset-env/pull/363)) (@existentialism)
|
||||
|
||||
We updated our mappings to support native trailing function commas and string paddings in Node.js 8+.
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Handle `chromeandroid` browserslist value ([#367](https://github.com/babel/babel-preset-env/pull/367)) (@yavorsky)
|
||||
|
||||
We added support for using browserslist's `chromeandroid` in `targets`.
|
||||
|
||||
### :memo: Documentation
|
||||
|
||||
- Tweak uglify option docs ([#368](https://github.com/babel/babel-preset-env/pull/368)) (@existentialism)
|
||||
|
||||
Thanks to @graingert and @pfiaux for pointing out some needed updates to the `uglify-js`-related docs.
|
||||
|
||||
## v1.5.2 (2017-06-07)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Ensure explicit targets always override browsers key targets ([#346](https://github.com/babel/babel-preset-env/pull/346)) (@existentialism)
|
||||
|
||||
`browser` targets should be overridden by explicit targets, and we inadvertently broke this when we landed string version support.
|
||||
|
||||
## v1.5.1 (2017-05-22)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Compile with loose mode ([#322](https://github.com/babel/babel-preset-env/pull/332)) (@existentialism)
|
||||
|
||||
## v1.5.0 (2017-05-19)
|
||||
|
||||
### :rocket: New Feature
|
||||
|
||||
- Support target versions as strings ([#321](https://github.com/babel/babel-preset-env/pull/321)) (@existentialism)
|
||||
|
||||
We were originally waiting on 2.x for a breaking change, but since node v7.10
|
||||
and other targets are causing some pain, we decided to land a backwards
|
||||
compatible version.
|
||||
|
||||
### :house: Internal
|
||||
|
||||
- Backport: use preset-env and remove flow-strip-types ([#324](https://github.com/babel/babel-preset-env/pull/324)) (@yavorsky)
|
||||
- Bump electron-to-chromium ([#329](https://github.com/babel/babel-preset-env/pull/329)) (@existentialism)
|
||||
- Tweak version mappings to match compat-table updates ([#323](https://github.com/babel/babel-preset-env/pull/323)) (@existentialism)
|
||||
- Bump browserslist ([#319](https://github.com/babel/babel-preset-env/pull/319)) (@existentialism)
|
||||
- Bump compat-table ([#307](https://github.com/babel/babel-preset-env/pull/307)) (@existentialism)
|
||||
- Add debug-fixtures and test/tmp to .eslintignore ([#305](https://github.com/babel/babel-preset-env/pull/305)) (@yavorsky)
|
||||
|
||||
## v1.4.0 (2017-04-14)
|
||||
|
||||
### :rocket: New Feature
|
||||
|
||||
- Support `spec` option ([#98](https://github.com/babel/babel-preset-env/pull/98)) (@Kovensky)
|
||||
|
||||
Added an option to enable more spec compliant, but potentially slower, transformations for any plugins in this preset that support them.
|
||||
|
||||
- Bump compat-table for Edge 15 support ([#273](https://github.com/babel/babel-preset-env/pull/273)) (@existentialism)
|
||||
|
||||
We updated our mappings so that you can get native support for async/await and other goodies when targeting Edge 15!
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Add Android browser to name map ([#270](https://github.com/babel/babel-preset-env/pull/270)) (@existentialism)
|
||||
|
||||
Fixed a bug that was ignoring Android targets in browserslist queries (for example: "Android >= 4").
|
||||
|
||||
### :memo: Documentation
|
||||
|
||||
- Clarify note about loading polyfills only once ([#282](https://github.com/babel/babel-preset-env/pull/282)) (@darahak)
|
||||
- Add a reminder about include/exclude options ([#275](https://github.com/babel/babel-preset-env/pull/275)) (@existentialism)
|
||||
|
||||
### :house: Internal
|
||||
|
||||
- Chore: reduce package size. ([#281](https://github.com/babel/babel-preset-env/pull/281)) (@evilebottnawi)
|
||||
- Remove deprecated comment ([#271](https://github.com/babel/babel-preset-env/pull/271)) (@yavorsky)
|
||||
|
||||
## v1.3.3 (2017-04-07)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Support electron version in a string format ([#252](https://github.com/babel/babel-preset-env/pull/252)) (@yavorsky)
|
||||
|
||||
Adding electron as a target was an inadvertent breaking change as it no longer
|
||||
allowed string versions. We added an exception for now, even though it is
|
||||
inconsistent with other versions. Just as a note, the upcoming version 2.x will
|
||||
allow _both_ number and string versions.
|
||||
|
||||
- Ensure const-check plugin order ([#257](https://github.com/babel/babel-preset-env/pull/257)) (@existentialism)
|
||||
|
||||
We now force the `const-es2015-check` plugin to run first (so that it can
|
||||
correctly report issues before they get transpiled away).
|
||||
|
||||
### :rocket: New Feature
|
||||
|
||||
- Allow use `babel-plugin-` prefix for include and exclude ([#242](https://github.com/babel/babel-preset-env/pull/242)) (@yavorsky)
|
||||
|
||||
The `include` and `exclude` options now allow both prefixed (`babel-plugin-transform-es2015-spread`)
|
||||
and prefix-less (`transform-es2015-spread`) plugin names.
|
||||
|
||||
### :memo: Documentation
|
||||
|
||||
- Note babel plugin prefix handling in include/exclude ([#245](https://github.com/babel/babel-preset-env/pull/245)) (@existentialism)
|
||||
- Fix README: debug option shows info in stdout. ([#236](https://github.com/babel/babel-preset-env/pull/236)) (@Gerhut)
|
||||
|
||||
### :house: Internal
|
||||
|
||||
- Add simple smoke-test ([#240](https://github.com/babel/babel-preset-env/pull/240)) (@existentialism)
|
||||
- Add prepublish script (@existentialism)
|
||||
|
||||
## v1.3.2 (2017-03-30)
|
||||
|
||||
- Fixed an issue with a broken publish
|
||||
|
||||
## v1.3.1 (2017-03-30)
|
||||
|
||||
- Fixed a regression with missing files due to `.npmignore`.
|
||||
|
||||
## v1.3.0 (2017-03-30)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Add check for ArrayBuffer[Symbol.species] ([#233](https://github.com/babel/babel-preset-env/pull/233)) (@existentialism)
|
||||
|
||||
We now properly check for `Symbol.species` support in ArrayBuffer and include the
|
||||
polyfill if necessary. This should, as a side effect, fix ArrayBuffer-related
|
||||
errors on IE9.
|
||||
|
||||
### :nail_care: Polish
|
||||
|
||||
- Fill data with electron as a target. ([#229](https://github.com/babel/babel-preset-env/pull/229)) (@yavorsky)
|
||||
|
||||
We've simplified things by adding `electron` as a target instead of doing a bunch of
|
||||
things at runtime. Electron targets should now also be displayed in the debug output.
|
||||
|
||||
- separate default builtins for platforms ([#226](https://github.com/babel/babel-preset-env/pull/226)) (@restrry)
|
||||
|
||||
If you are targeting the `node` environment exclusively, the always-included web polyfills
|
||||
(like `dom.iterable`, and a few others) will now no longer be included.
|
||||
|
||||
### :memo: Documentation
|
||||
|
||||
* remove deprecated projects ([#223](https://github.com/babel/babel-preset-env/pull/223)) [skip ci] (@stevemao)
|
||||
|
||||
### :house: Internal
|
||||
|
||||
* npmignore: Add related to build data and codecov. ([#216](https://github.com/babel/babel-preset-env/pull/216)) (@yavorsky)
|
||||
|
||||
## v1.2.2 (2017-03-14)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Refactor browser data parsing to handle families ([#208](https://github.com/babel/babel-preset-env/pull/208)) (@existentialism)
|
||||
|
||||
When parsing plugin data, we weren't properly handling browser families. This caused
|
||||
`transform-es2015-block-scoping` and other plugins to be incorrectly added for Edge >= 12.
|
||||
(s/o to @mgol for the the report and review!)
|
||||
|
||||
- Add typed array methods to built-ins features. ([#198](https://github.com/babel/babel-preset-env/pull/198)) (@yavorsky)
|
||||
|
||||
Fixes an issue where some TypedArray features were not being polyfilled properly. (s/o to @alippai for the report!)
|
||||
|
||||
### :memo: Documentation
|
||||
|
||||
- Fixed minor typo in readme ([#199](https://github.com/babel/babel-preset-env/pull/199)) (@bl4ckdu5t)
|
||||
- Add built-ins, better links, compat-table url, etc ([#195](https://github.com/babel/babel-preset-env/pull/195)) (@yavorsky)
|
||||
- Change CONTRIBUTING.md to use absolute paths ([#194](https://github.com/babel/babel-preset-env/pull/194)) (@aaronang)
|
||||
|
||||
### :house: Internal
|
||||
|
||||
- Bump plugins ([#201](https://github.com/babel/babel-preset-env/pull/201)) (@yavorsky)
|
||||
- Enable code coverage ([#200](https://github.com/babel/babel-preset-env/pull/200)) (@alxpy)
|
||||
- Increase mocha timeout to 10s ([#202](https://github.com/babel/babel-preset-env/pull/202)) (@yavorsky)
|
||||
|
||||
## v1.2.1 (2017-03-06)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Add transform-duplicate-keys mapping ([#192](https://github.com/babel/babel-preset-env/pull/192)) (@existentialism)
|
||||
|
||||
Our plugin data was missing a mapping for the `transform-duplicate-keys` plugin which caused it to never be included. (s/o to @Timer for the report!)
|
||||
|
||||
### :memo: Documentation
|
||||
|
||||
- Clarify reasons for the uglify option in README.md ([#188](https://github.com/babel/babel-preset-env/pull/188)) (@mikegreiling)
|
||||
|
||||
## v1.2.0 (2017-03-03)
|
||||
|
||||
### :rocket: New Feature
|
||||
|
||||
- Add uglify as a target ([#178](https://github.com/babel/babel-preset-env/pull/178)) (@yavorsky)
|
||||
|
||||
Support for `uglify` as a target is now available! This will enable all plugins and, as a result, fully compiles your code to ES5. Note, that useBuiltIns will work as before, and only the polyfills that your other target(s) need will be included.
|
||||
|
||||
```json
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"chrome": 55,
|
||||
"uglify": true
|
||||
},
|
||||
"useBuiltIns": true,
|
||||
"modules": false
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Respect older versions in invert equals map ([#180](https://github.com/babel/babel-preset-env/pull/180)) (@danez)
|
||||
|
||||
Fixes a number of bugs that caused some incorrect and/or missing environment data when parsing `compat-table`.
|
||||
|
||||
## v1.1.11 (2017-03-01)
|
||||
|
||||
This release primarily upgrades `compat-table`, which adds support for async on Node 7.6!
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Fix hasBeenWarned condition. ([#175](https://github.com/babel/babel-preset-env/pull/175)) (@yavorsky)
|
||||
|
||||
### :memo: Documentation
|
||||
|
||||
- Add yarn example. ([#174](https://github.com/babel/babel-preset-env/pull/174)) (@yavorsky)
|
||||
|
||||
### :house: Internal
|
||||
|
||||
- Bump compat-table ([#177](https://github.com/babel/babel-preset-env/pull/177)) (@existentialism)
|
||||
- Add electron version exception test ([#176](https://github.com/babel/babel-preset-env/pull/176)) (@existentialism)
|
||||
|
||||
## v1.1.10 (2017-02-24)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Drop use of lodash/intersection from checkDuplicateIncludeExcludes ([#173](https://github.com/babel/babel-preset-env/pull/173)) (@existentialism)
|
||||
|
||||
## v1.1.9 (2017-02-24)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Add tests for debug output ([#156](https://github.com/babel/babel-preset-env/pull/156)) (@existentialism)
|
||||
|
||||
Since we've (mostly @yavorsky) have fixed a number of bugs recently with the `debug` option output, we added the ability to assert stdout matches what we expect. Read the updated [CONTRIBUTING.md](https://github.com/babel/babel-preset-env/blob/master/CONTRIBUTING.md#testing-the-debug-option) for more info.
|
||||
|
||||
- Fixes #143. Log correct targets. ([#155](https://github.com/babel/babel-preset-env/pull/155)) (@yavorsky)
|
||||
|
||||
This fixes a bug in the `debug` output where incorrect target(s) were being displayed for why a particular plugin/preset was being included.
|
||||
|
||||
Given targets:
|
||||
|
||||
```txt
|
||||
{
|
||||
"firefox": 52,
|
||||
"node": 7.4
|
||||
}
|
||||
```
|
||||
|
||||
Before:
|
||||
|
||||
```txt
|
||||
Using plugins:
|
||||
transform-es2015-destructuring {"node":6.5}
|
||||
transform-es2015-for-of {"node":6.5}
|
||||
transform-es2015-function-name {"node":6.5}
|
||||
transform-es2015-literals {"node":4}
|
||||
transform-exponentiation-operator {"firefox":52}
|
||||
syntax-trailing-function-commas {"firefox":52}
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```txt
|
||||
Using plugins:
|
||||
transform-es2015-destructuring {"firefox":52}
|
||||
transform-es2015-for-of {"firefox":52}
|
||||
transform-es2015-function-name {"firefox":52}
|
||||
transform-es2015-literals {"firefox":52}
|
||||
transform-exponentiation-operator {"node":7.4}
|
||||
syntax-trailing-function-commas {"node":7.4}
|
||||
```
|
||||
|
||||
### :memo: Documentation
|
||||
|
||||
- Fix compat-table link in contributing.md (@existentialism)
|
||||
- Update README examples to fix website ([#151](https://github.com/babel/babel-preset-env/pull/)) (@existentialism)
|
||||
- Fix few typos ([#146](https://github.com/babel/babel-preset-env/pull/146)) (@existentialism)
|
||||
- Add configuration example to clarify `debug: true` ([#138](https://github.com/babel/babel-preset-env/pull/138)) (@yavorsky)
|
||||
- Fix CHANGELOG’s v1.1.8 updates typo. ([#136](https://github.com/babel/babel-preset-env/pull/136)) (@yavorsky)
|
||||
- README: Update `debug: true` example. ([#138](https://github.com/babel/babel-preset-env/pull/138)) (@yavorsky)
|
||||
|
||||
### :house: Internal
|
||||
|
||||
- update compat ([#169](https://github.com/babel/babel-preset-env/pull/169)) (@hzoo)
|
||||
- Use external Electron to Chromium library ([#144](https://github.com/babel/babel-preset-env/pull/144)) (@Kilian)
|
||||
- Update yarn lockfile ([#152](https://github.com/babel/babel-preset-env/pull/152)) (@existentialism)
|
||||
- Extract option normalization into independant file ([#125](https://github.com/babel/babel-preset-env/pull/125)) (@baer)
|
||||
- Update yarnfile ([#145](https://github.com/babel/babel-preset-env/pull/145)) (@baer)
|
||||
- devDeps: eslint-config-babel v5.0.0 ([#139](https://github.com/babel/babel-preset-env/pull/139)) (@kaicataldo)
|
||||
- Update compat-table, build data ([#135](https://github.com/babel/babel-preset-env/pull/135)) (@hzoo)
|
||||
|
||||
## v1.1.8 (2017-01-10)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Debug: Transformations before logs. ([#128](https://github.com/babel/babel-preset-env/pull/128)) (@yavorsky)
|
||||
|
||||
Makes sure that all transformations on `targets` (such as `exclude`/`include`) are run before logging out with the `debug` option. Fixes ([#127](https://github.com/babel/babel-preset-env/issues/127)).
|
||||
|
||||
### :house: Internal
|
||||
|
||||
- Remove unnecessary extension. ([#131](https://github.com/babel/babel-preset-env/pull/131)) (@roman-yakobnyuk)
|
||||
- Include yarn.lock and update CI. ([#124](https://github.com/babel/babel-preset-env/pull/124)) (@existentialism)
|
||||
|
||||
## v1.1.7 (2017-01-09)
|
||||
|
||||
Had a publishing issue in the previous release.
|
||||
|
||||
## v1.1.6 (2017-01-06)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Explicitly resolve lowest browser version. ([#121](https://github.com/babel/babel-preset-env/pull/121)) (@brokenmass)
|
||||
|
||||
```js
|
||||
{
|
||||
"targets": {
|
||||
"browsers": ["ios >= 6"] // was resolving to {ios: 10} rather than {ios: 6}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## v1.1.5 (2017-01-04)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
- Show error if target version is not a number. ([#107](https://github.com/babel/babel-preset-env/pull/107)) (@existentialism)
|
||||
|
||||
```js
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"chrome": "52", // will error since it's not a number,
|
||||
"chrome": 52 // correct!
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
- Fix targets for the `debug` option. ([#109](https://github.com/babel/babel-preset-env/pull/109)) (@yavorsky)
|
||||
|
||||
Now it prints the transformed targets/environments rather than the browsers query.
|
||||
|
||||
```txt
|
||||
Using targets:
|
||||
{
|
||||
"chrome": 53,
|
||||
"ie": 10,
|
||||
"node": 6
|
||||
}
|
||||
|
||||
Modules transform: false
|
||||
|
||||
Using plugins:
|
||||
transform-es2015-arrow-functions {"chrome":47,"node":6}
|
||||
transform-es2015-block-scoped-functions {"chrome":41,"ie":11,"node":4}
|
||||
|
||||
Using polyfills:
|
||||
es6.typed.uint8-clamped-array {"chrome":5,"node":0.12}
|
||||
es6.map {"chrome":51,"node":6.5}
|
||||
```
|
||||
|
||||
## v1.1.4 (2016-12-16)
|
||||
|
||||
v1.1.2-v1.1.4
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
The new `exclude`/`include` options weren't working correctly for built-ins. ([#102](https://github.com/babel/babel-preset-env/pull/102)).
|
||||
|
||||
Also fixes an issue with debug option.
|
||||
|
||||
## v1.1.1 (2016-12-13)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
Regression with the previous release due to using `Object.values` (ES2017). This wasn't caught because we are using babel-register to run tests and includes polyfills so it didn't fail on CI even though we have Node 0.10 as an env. Looking into fixing this to prevent future issues.
|
||||
|
||||
## v1.1.0 (2016-12-13)
|
||||
|
||||
### :rocket: New Feature
|
||||
|
||||
- Add `exclude` option, rename `whitelist` to `include` ([#89](https://github.com/babel/babel-preset-env/pull/89)) (@hzoo)
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"browsers": ["last 2 versions", "safari >= 7"]
|
||||
},
|
||||
"include": ["transform-es2015-arrow-functions"],
|
||||
"exclude": [
|
||||
"transform-regenerator",
|
||||
"transform-async-to-generator",
|
||||
"map"
|
||||
],
|
||||
"useBuiltIns": true
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
`"exclude": ["transform-regenerator"]` doesn't transform generators and removes `regeneratorRuntime` from being imported.
|
||||
|
||||
`"exclude": ["transform-async-to-generator"]` doesn't use the built-in async-to-gen transform so you can use something like [fast-async](https://github.com/MatAtBread/fast-async).
|
||||
|
||||
`"exclude": ["map"]` doesn't include the `Map` polyfill if you know you aren't using it in your code (w/ `useBuiltIns`). (We will figure out a way to automatically do this [#84](https://github.com/babel/babel-preset-env/issues/84)).
|
||||
|
||||
If you pass a wrong plugin it will error: valid options for `include/exclude` are in [/data/plugin-features.js](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js) and [/data/built-in-features.js](https://github.com/babel/babel-preset-env/blob/master/data/built-in-features.js) (without the `es6.`)
|
||||
|
||||
### :house: Internal
|
||||
|
||||
- Optimize result filtration. ([#77](https://github.com/babel/babel-preset-env/pull/77)) (@yavorsky)
|
||||
- Update eslint config to align with other babel projects ([#79](https://github.com/babel/babel-preset-env/pull/79)) (@baer)
|
||||
- Update pathnames to avoid uppercase ([#80](https://github.com/babel/babel-preset-env/pull/80)) (@baer)
|
||||
- Refactor build data for clarity/consistency ([#81](https://github.com/babel/babel-preset-env/pull/81)) (@baer)
|
||||
- Update linting rules to cover all js ([#82](https://github.com/babel/babel-preset-env/pull/82)) (@baer)
|
||||
- Cleanup lib before rebuilding ([#87](https://github.com/babel/babel-preset-env/pull/87)) (@baer)
|
||||
- Move linting dependency to be dev only ([#88](https://github.com/babel/babel-preset-env/pull/88)) (@baer)
|
||||
|
||||
### :memo: Documentation
|
||||
|
||||
- Fix typo ([#78](https://github.com/babel/babel-preset-env/pull/78)) (@rohmanhm)
|
||||
- Fix PR link in changelog. ([#75](https://github.com/babel/babel-preset-env/pull/75)) (@nhajidin)
|
||||
|
||||
## v1.0.2 (2016-12-10)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
* Fix issue with Object.getOwnPropertySymbols ([#71](https://github.com/babel/babel-preset-env/pull/71)) ([@existentialism](https://github.com/existentialism))
|
||||
|
||||
Was requiring the wrong module kinda of like in v1.0.1:
|
||||
|
||||
https://github.com/zloirock/core-js#ecmascript-6-symbol
|
||||
|
||||
```diff
|
||||
-import "core-js/modules/es6.object.get-own-property-symbols";
|
||||
```
|
||||
|
||||
The test is just a part of `Symbol`.
|
||||
|
||||
## v1.0.1 (2016-12-10)
|
||||
|
||||
### :bug: Bug Fix
|
||||
|
||||
* Fix regenerator import ([#68](https://github.com/babel/babel-preset-env/pull/68)) ([@hzoo](https://github.com/hzoo))
|
||||
|
||||
We were outputting an invalid path for `regenerator`!
|
||||
|
||||
```diff
|
||||
+import "regenerator-runtime/runtime";
|
||||
-import "core-js/modules/regenerator-runtime/runtime"-
|
||||
```
|
||||
|
||||
## v1.0.0 (2016-12-09)
|
||||
|
||||
### :rocket: New Feature
|
||||
|
||||
* Add `useBuiltIns` option ([#56](https://github.com/babel/babel-preset-env/pull/56)) ([@hzoo](https://github.com/hzoo)), ([@yavorsky](https://github.com/yavorsky)), ([@existentialism](https://github.com/existentialism))
|
||||
|
||||
A way to apply `babel-preset-env` for polyfills (via `"babel-polyfill"``).
|
||||
|
||||
> This option will apply a new Babel plugin that replaces `require("babel-polyfill")` with the individual requires for `babel-polyfill` based on the target environments.
|
||||
|
||||
Install
|
||||
|
||||
```
|
||||
npm install babel-polyfill --save
|
||||
```
|
||||
|
||||
In
|
||||
|
||||
```js
|
||||
import "babel-polyfill"; // create an entry js file that contains this
|
||||
// or
|
||||
import "core-js";
|
||||
```
|
||||
|
||||
Out (different based on environment)
|
||||
|
||||
```js
|
||||
// chrome 55
|
||||
import "core-js/modules/es7.string.pad-start"; // haha left_pad
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
```
|
||||
|
||||
`.babelrc` Usage
|
||||
|
||||
```js
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"electron": 1.4
|
||||
},
|
||||
"modules": false, // webpack 2
|
||||
"useBuiltIns": true // new option
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
> Also looking to make an easier integration point via Webpack with this method. Please reach out if you have ideas!
|
||||
|
||||
---
|
||||
|
||||
* Support [Electron](http://electron.atom.io/) ([#55](https://github.com/babel/babel-preset-env/pull/55)) ([@paulcbetts](https://github.com/paulcbetts))
|
||||
|
||||
Electron is also an environment, so [Paul went ahead](https://twitter.com/paulcbetts/status/804507070103851008) and added support for this!
|
||||
|
||||
`.babelrc` Usage
|
||||
|
||||
```js
|
||||
{
|
||||
"presets": [ ["env", {"targets": { "electron": 1.4 }}]]
|
||||
}
|
||||
```
|
||||
|
||||
> Currently we are manually updating the data in [/data/electron-to-chromium.js](https://github.com/babel/babel-preset-env/blob/master/data/electron-to-chromium.js), but [@kevinsawicki](https://github.com/kevinsawicki) says we could generate the data from [atom-shell/dist/index.json](https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/index.json) as well! (Someone should make a PR :smile:)
|
||||
|
||||
|
||||
|
||||
## v0.0.9 (2016-11-24)
|
||||
|
||||
### :rocket: New Feature
|
||||
|
||||
* Support Opera ([#48](https://github.com/babel/babel-preset-env/pull/48)) (Henry Zhu)
|
||||
|
||||
Was as simple as modifying the chrome version and subtracting 13! (so chrome 54 = opera 41)
|
||||
|
||||
```js
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"opera": 41
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## v0.0.8 (2016-11-16)
|
||||
|
||||
### :nail_care: Polish
|
||||
|
||||
* Only print the debug info once ([#46](https://github.com/babel/babel-preset-env/pull/46) (Henry Zhu)
|
||||
|
||||
When using the `debug` option it was printing the data for each file processed rather than once.
|
||||
|
||||
```js
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"debug": true
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## v0.0.7 (2016-11-02)
|
||||
|
||||
### :rocket: New Feature
|
||||
|
||||
* hardcode a current node version option ([#35](https://github.com/babel/babel-preset-env/pull/35)) (Henry Zhu)
|
||||
|
||||
```js
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"node": "current" // parseFloat(process.versions.node)
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
* add 'whitelist' option ([#31](https://github.com/babel/babel-preset-env/pull/31)) (Henry Zhu)
|
||||
|
||||
```js
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"chrome": 52
|
||||
},
|
||||
"whitelist": ["transform-es2015-arrow-functions"]
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
* Add more aliases (Henry Zhu)
|
||||
* Update plugin data: firefox 52 supports async/await! ([#29](https://github.com/babel/babel-preset-env/pull/29)) (Henry Zhu)
|
||||
|
||||
### :bug: Bug Fixes
|
||||
|
||||
* Use compat-table equals option ([#36](https://github.com/babel/babel-preset-env/pull/36)) (Henry Zhu)
|
||||
|
||||
Compute and use `compat-table` equivalents
|
||||
|
||||
```js
|
||||
{
|
||||
"safari6": "phantom",
|
||||
"chrome44": "iojs",
|
||||
"chrome50": "node64",
|
||||
"chrome51": "node65",
|
||||
"chrome54": "node7",
|
||||
"chrome30": "android44",
|
||||
"chrome37": "android50",
|
||||
"chrome39": "android51",
|
||||
"safari7": "ios7",
|
||||
"safari71_8": "ios8",
|
||||
"safari9": "ios9",
|
||||
"safari10": "ios10",
|
||||
"chrome50": "node6"
|
||||
}
|
||||
```
|
||||
|
||||
* Change default behavior to act the same as babel-preset-latest ([#33](https://github.com/babel/babel-preset-env/pull/33)) (Henry Zhu)
|
||||
|
||||
```js
|
||||
{ "presets": ["env"] } // should act the same as babel-preset-latest
|
||||
```
|
||||
|
||||
## Internal
|
||||
|
||||
* Add fixture helper for tests ([#28](https://github.com/babel/babel-preset-env/pull/28)) (Henry Zhu)
|
||||
93
static/js/ketcher2/node_modules/babel-preset-env/CONTRIBUTING.md
generated
vendored
Normal file
93
static/js/ketcher2/node_modules/babel-preset-env/CONTRIBUTING.md
generated
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
# Contributing
|
||||
|
||||
## Adding a new plugin to support (when approved in the next ECMAScript version)
|
||||
|
||||
### Update [`plugin-features.js`](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js)
|
||||
|
||||
*Example:*
|
||||
|
||||
If you were going to add `**` which is in ES2016:
|
||||
|
||||
Find the relevant entries on [compat-table](https://kangax.github.io/compat-table/es2016plus/#test-exponentiation_(**)_operator):
|
||||
|
||||
`exponentiation (**) operator`
|
||||
|
||||
Find the corresponding babel plugin:
|
||||
|
||||
`transform-exponentiation-operator`
|
||||
|
||||
And add them in this structure:
|
||||
|
||||
```js
|
||||
// es2016
|
||||
"transform-exponentiation-operator": {
|
||||
features: [
|
||||
"exponentiation (**) operator",
|
||||
],
|
||||
},
|
||||
```
|
||||
|
||||
### Update [`built-in-features.js`](https://github.com/babel/babel-preset-env/blob/master/data/built-in-features.js)
|
||||
|
||||
*Example:*
|
||||
|
||||
In case you want to add `Object.values` which is in ES2017:
|
||||
|
||||
Find the relevant feature and subfeature on [compat-table](https://kangax.github.io/compat-table/es2016plus/#test-Object_static_methods_Object.values)
|
||||
and split it with `/`:
|
||||
|
||||
`Object static methods / Object.values`
|
||||
|
||||
Find the corresponding module on [core-js](https://github.com/zloirock/core-js/tree/master/modules):
|
||||
|
||||
`es7.object.values.js`
|
||||
|
||||
Find required ES version in [`built-in-features.js`](https://github.com/babel/babel-preset-env/blob/master/data/built-in-features.js) and add the new feature:
|
||||
|
||||
```js
|
||||
const es2017 = {
|
||||
//...
|
||||
"es7.object.values": "Object static methods / Object.values"
|
||||
}
|
||||
```
|
||||
|
||||
### Update [`plugins.json`](https://github.com/babel/babel-preset-env/blob/master/data/plugins.json)
|
||||
|
||||
Until `compat-table` is a standalone npm module for data we are using the git url
|
||||
|
||||
`"compat-table": "kangax/compat-table#[latest-commit-hash]"`,
|
||||
|
||||
So we update and then run `npm run build-data`. If there are no changes, then `plugins.json` will be the same.
|
||||
|
||||
## Tests
|
||||
|
||||
### Running tests locally
|
||||
|
||||
```bash
|
||||
npm test
|
||||
```
|
||||
|
||||
### Checking code coverage locally
|
||||
|
||||
```bash
|
||||
npm run coverage
|
||||
```
|
||||
|
||||
### Writing tests
|
||||
|
||||
#### General
|
||||
|
||||
All the tests for `babel-preset-env` exist in the `test/fixtures` folder. The
|
||||
test setup and conventions are exactly the same as testing a Babel plugin, so
|
||||
please read our [documentation on writing tests](https://github.com/babel/babel/blob/master/CONTRIBUTING.md#babel-plugin-x).
|
||||
|
||||
#### Testing the `debug` option
|
||||
|
||||
Testing debug output to `stdout` is similar. Under the `test/debug-fixtures`,
|
||||
create a folder with a descriptive name of your test, and add the following:
|
||||
|
||||
* Add a `options.json` file (just as the other tests, this is essentially a
|
||||
`.babelrc`) with the desired test configuration (required)
|
||||
* Add a `stdout.txt` file with the expected debug output. For added
|
||||
convenience, if there is no `stdout.txt` present, the test runner will
|
||||
generate one for you.
|
||||
21
static/js/ketcher2/node_modules/babel-preset-env/LICENSE
generated
vendored
Normal file
21
static/js/ketcher2/node_modules/babel-preset-env/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Babel
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
406
static/js/ketcher2/node_modules/babel-preset-env/README.md
generated
vendored
Normal file
406
static/js/ketcher2/node_modules/babel-preset-env/README.md
generated
vendored
Normal file
@ -0,0 +1,406 @@
|
||||
# babel-preset-env [](https://www.npmjs.com/package/babel-preset-env) [](https://travis-ci.org/babel/babel-preset-env) [](https://www.npmjs.com/package/babel-preset-env) [](https://codecov.io/github/babel/babel-preset-env)
|
||||
|
||||
> A Babel preset that can automatically determine the Babel plugins and polyfills you need based on your supported environments.
|
||||
|
||||
```sh
|
||||
npm install babel-preset-env --save-dev
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"browsers": ["last 2 versions", "safari >= 7"]
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Check out the many options (especially `useBuiltIns` to polyfill less)!
|
||||
|
||||
- [How it Works](#how-it-works)
|
||||
- [Install](#install)
|
||||
- [Usage](#usage)
|
||||
- [Options](#options)
|
||||
- [Examples](#examples)
|
||||
- [Caveats](#caveats)
|
||||
- [Other Cool Projects](#other-cool-projects)
|
||||
|
||||
## How it Works
|
||||
|
||||
### Determine environment support for ECMAScript features
|
||||
|
||||
Use external data such as [`compat-table`](https://github.com/kangax/compat-table) to determine browser support. (We should create PRs there when necessary)
|
||||
|
||||

|
||||
|
||||
We can periodically run [build-data.js](https://github.com/babel/babel-preset-env/blob/master/scripts/build-data.js) which generates [plugins.json](https://github.com/babel/babel-preset-env/blob/master/data/plugins.json).
|
||||
|
||||
Ref: [#7](https://github.com/babel/babel-preset-env/issues/7)
|
||||
|
||||
### Maintain a mapping between JavaScript features and Babel plugins
|
||||
|
||||
> Currently located at [plugin-features.js](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js).
|
||||
|
||||
This should be straightforward to do in most cases. There might be cases where plugins should be split up more or certain plugins aren't standalone enough (or impossible to do).
|
||||
|
||||
### Support all plugins in Babel that are considered `latest`
|
||||
|
||||
> Default behavior without options is the same as `babel-preset-latest`.
|
||||
|
||||
It won't include `stage-x` plugins. env will support all plugins in what we consider the latest version of Javascript (by matching what we do in [`babel-preset-latest`](http://babeljs.io/docs/plugins/preset-latest/)).
|
||||
|
||||
Ref: [#14](https://github.com/babel/babel-preset-env/issues/14)
|
||||
|
||||
### Determine the lowest common denominator of plugins to be included in the preset
|
||||
|
||||
If you are targeting IE 8 and Chrome 55 it will include all plugins required by IE 8 since you would need to support both still.
|
||||
|
||||
### Support a target option `"node": "current"` to compile for the currently running node version.
|
||||
|
||||
For example, if you are building on Node 4, arrow functions won't be converted, but they will if you build on Node 0.12.
|
||||
|
||||
### Support a `browsers` option like autoprefixer
|
||||
|
||||
Use [browserslist](https://github.com/ai/browserslist) to declare supported environments by performing queries like `> 1%, last 2 versions`.
|
||||
|
||||
Ref: [#19](https://github.com/babel/babel-preset-env/pull/19)
|
||||
|
||||
## Install
|
||||
|
||||
With [npm](https://www.npmjs.com):
|
||||
|
||||
```sh
|
||||
npm install --save-dev babel-preset-env
|
||||
```
|
||||
|
||||
Or [yarn](https://yarnpkg.com):
|
||||
|
||||
```sh
|
||||
yarn add babel-preset-env --dev
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
The default behavior without options runs all transforms (behaves the same as [babel-preset-latest](https://babeljs.io/docs/plugins/preset-latest/)).
|
||||
|
||||
```json
|
||||
{
|
||||
"presets": ["env"]
|
||||
}
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
For more information on setting options for a preset, refer to the [plugin/preset options](http://babeljs.io/docs/plugins/#plugin-preset-options) documentation.
|
||||
|
||||
### `targets`
|
||||
|
||||
`{ [string]: number | string }`, defaults to `{}`.
|
||||
|
||||
Takes an object of environment versions to support.
|
||||
|
||||
Each target environment takes a number or a string (we recommend using a string when specifying minor versions like `node: "6.10"`).
|
||||
|
||||
Example environments: `chrome`, `opera`, `edge`, `firefox`, `safari`, `ie`, `ios`, `android`, `node`, `electron`.
|
||||
|
||||
The [data](https://github.com/babel/babel-preset-env/blob/master/data/plugins.json) for this is generated by running the [build-data script](https://github.com/babel/babel-preset-env/blob/master/scripts/build-data.js) which pulls in data from [compat-table](https://kangax.github.io/compat-table).
|
||||
|
||||
### `targets.node`
|
||||
|
||||
`number | string | "current" | true`
|
||||
|
||||
If you want to compile against the current node version, you can specify `"node": true` or `"node": "current"`, which would be the same as `"node": parseFloat(process.versions.node)`.
|
||||
|
||||
### `targets.browsers`
|
||||
|
||||
`Array<string> | string`
|
||||
|
||||
A query to select browsers (ex: last 2 versions, > 5%) using [browserslist](https://github.com/ai/browserslist).
|
||||
|
||||
Note, browsers' results are overridden by explicit items from `targets`.
|
||||
|
||||
### `targets.uglify`
|
||||
|
||||
`true`
|
||||
|
||||
When using `uglify-js` to minify your code, you may run into syntax errors when targeting later browsers since `uglify-js` does not support any ES2015+ syntax.
|
||||
|
||||
To prevent these errors - set the `uglify` option to `true`, which enables all transformation plugins and as a result, your code is fully compiled to ES5. However, the `useBuiltIns` option will still work as before and only include the polyfills that your target(s) need.
|
||||
|
||||
> Uglify has support for ES2015 syntax via [uglify-es](https://github.com/mishoo/UglifyJS2/tree/harmony). If you are using syntax unsupported by `uglify-es`, we recommend using [Babili](https://github.com/babel/babili).
|
||||
|
||||
> Note: This option is deprecated in 2.x and replaced with a [`forceAllTransforms` option](https://github.com/babel/babel-preset-env/pull/264).
|
||||
|
||||
### `spec`
|
||||
|
||||
`boolean`, defaults to `false`.
|
||||
|
||||
Enable more spec compliant, but potentially slower, transformations for any plugins in this preset that support them.
|
||||
|
||||
### `loose`
|
||||
|
||||
`boolean`, defaults to `false`.
|
||||
|
||||
Enable "loose" transformations for any plugins in this preset that allow them.
|
||||
|
||||
### `modules`
|
||||
|
||||
`"amd" | "umd" | "systemjs" | "commonjs" | false`, defaults to `"commonjs"`.
|
||||
|
||||
Enable transformation of ES6 module syntax to another module type.
|
||||
|
||||
Setting this to `false` will not transform modules.
|
||||
|
||||
### `debug`
|
||||
|
||||
`boolean`, defaults to `false`.
|
||||
|
||||
Outputs the targets/plugins used and the version specified in [plugin data version](https://github.com/babel/babel-preset-env/blob/master/data/plugins.json) to `console.log`.
|
||||
|
||||
### `include`
|
||||
|
||||
`Array<string>`, defaults to `[]`.
|
||||
|
||||
> NOTE: `whitelist` is deprecated and will be removed in the next major in favor of this.
|
||||
|
||||
An array of plugins to always include.
|
||||
|
||||
Valid options include any:
|
||||
|
||||
- [Babel plugins](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js) - both with (`babel-plugin-transform-es2015-spread`) and without prefix (`transform-es2015-spread`) are supported.
|
||||
|
||||
- [Built-ins](https://github.com/babel/babel-preset-env/blob/master/data/built-in-features.js), such as `map`, `set`, or `object.assign`.
|
||||
|
||||
This option is useful if there is a bug in a native implementation, or a combination of a non-supported feature + a supported one doesn't work.
|
||||
|
||||
For example, Node 4 supports native classes but not spread. If `super` is used with a spread argument, then the `transform-es2015-classes` transform needs to be `include`d, as it is not possible to transpile a spread with `super` otherwise.
|
||||
|
||||
> NOTE: The `include` and `exclude` options _only_ work with the [plugins included with this preset](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js); so, for example, including `transform-do-expressions` or excluding `transform-function-bind` will throw errors. To use a plugin _not_ included with this preset, add them to your [config](https://babeljs.io/docs/usage/babelrc/) directly.
|
||||
|
||||
### `exclude`
|
||||
|
||||
`Array<string>`, defaults to `[]`.
|
||||
|
||||
An array of plugins to always exclude/remove.
|
||||
|
||||
The possible options are the same as the `include` option.
|
||||
|
||||
This option is useful for "blacklisting" a transform like `transform-regenerator` if you don't use generators and don't want to include `regeneratorRuntime` (when using `useBuiltIns`) or for using another plugin like [fast-async](https://github.com/MatAtBread/fast-async) instead of [Babel's async-to-gen](http://babeljs.io/docs/plugins/transform-async-generator-functions/).
|
||||
|
||||
### `useBuiltIns`
|
||||
|
||||
`boolean`, defaults to `false`.
|
||||
|
||||
A way to apply `babel-preset-env` for polyfills (via "babel-polyfill").
|
||||
|
||||
> NOTE: This does not currently polyfill experimental/stage-x built-ins like the regular "babel-polyfill" does.
|
||||
> This will only work with npm >= 3 (which should be used with Babel 6 anyway)
|
||||
|
||||
```
|
||||
npm install babel-polyfill --save
|
||||
```
|
||||
|
||||
This option enables a new plugin that replaces the statement `import "babel-polyfill"` or `require("babel-polyfill")` with individual requires for `babel-polyfill` based on environment.
|
||||
|
||||
> NOTE: Only use `require("babel-polyfill");` once in your whole app.
|
||||
> Multiple imports or requires of `babel-polyfill` will throw an error since it can cause global collisions and other issues that are hard to trace.
|
||||
> We recommend creating a single entry file that only contains the `require` statement.
|
||||
|
||||
**In**
|
||||
|
||||
```js
|
||||
import "babel-polyfill";
|
||||
```
|
||||
|
||||
**Out (different based on environment)**
|
||||
|
||||
```js
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
```
|
||||
|
||||
This will also work for `core-js` directly (`import "core-js";`)
|
||||
|
||||
```
|
||||
npm install core-js --save
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Examples
|
||||
|
||||
### Export with various targets
|
||||
|
||||
```js
|
||||
export class A {}
|
||||
```
|
||||
|
||||
#### Target only Chrome 52
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"chrome": 52
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Out**
|
||||
|
||||
```js
|
||||
class A {}
|
||||
exports.A = A;
|
||||
```
|
||||
|
||||
#### Target Chrome 52 with webpack 2/rollup and loose mode
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"chrome": 52
|
||||
},
|
||||
"modules": false,
|
||||
"loose": true
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Out**
|
||||
|
||||
```js
|
||||
export class A {}
|
||||
```
|
||||
|
||||
#### Target specific browsers via browserslist
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"chrome": 52,
|
||||
"browsers": ["last 2 versions", "safari 7"]
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Out**
|
||||
|
||||
```js
|
||||
export var A = function A() {
|
||||
_classCallCheck(this, A);
|
||||
};
|
||||
```
|
||||
|
||||
#### Target latest node via `node: true` or `node: "current"`
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"node": "current"
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Out**
|
||||
|
||||
```js
|
||||
class A {}
|
||||
exports.A = A;
|
||||
```
|
||||
|
||||
### Show debug output
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"presets": [
|
||||
[ "env", {
|
||||
"targets": {
|
||||
"safari": 10
|
||||
},
|
||||
"modules": false,
|
||||
"useBuiltIns": true,
|
||||
"debug": true
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**stdout**
|
||||
|
||||
```sh
|
||||
Using targets:
|
||||
{
|
||||
"safari": 10
|
||||
}
|
||||
|
||||
Modules transform: false
|
||||
|
||||
Using plugins:
|
||||
transform-exponentiation-operator {}
|
||||
transform-async-to-generator {}
|
||||
|
||||
Using polyfills:
|
||||
es7.object.values {}
|
||||
es7.object.entries {}
|
||||
es7.object.get-own-property-descriptors {}
|
||||
web.timers {}
|
||||
web.immediate {}
|
||||
web.dom.iterable {}
|
||||
```
|
||||
|
||||
### Include and exclude specific plugins/built-ins
|
||||
|
||||
> always include arrow functions, explicitly exclude generators
|
||||
|
||||
```json
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": {
|
||||
"browsers": ["last 2 versions", "safari >= 7"]
|
||||
},
|
||||
"include": ["transform-es2015-arrow-functions", "es6.map"],
|
||||
"exclude": ["transform-regenerator", "es6.set"]
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Caveats
|
||||
|
||||
If you get a `SyntaxError: Unexpected token ...` error when using the [object-rest-spread](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-object-rest-spread) transform then make sure the plugin has been updated to, at least, `v6.19.0`.
|
||||
|
||||
## Other Cool Projects
|
||||
|
||||
- [babel-preset-modern-browsers](https://github.com/christophehurpeau/babel-preset-modern-browsers)
|
||||
- ?
|
||||
181
static/js/ketcher2/node_modules/babel-preset-env/data/built-in-features.js
generated
vendored
Normal file
181
static/js/ketcher2/node_modules/babel-preset-env/data/built-in-features.js
generated
vendored
Normal file
@ -0,0 +1,181 @@
|
||||
// https://github.com/zloirock/core-js
|
||||
|
||||
const typedArrayMethods = [
|
||||
"typed arrays / %TypedArray%.from",
|
||||
"typed arrays / %TypedArray%.of",
|
||||
"typed arrays / %TypedArray%.prototype.subarray",
|
||||
"typed arrays / %TypedArray%.prototype.join",
|
||||
"typed arrays / %TypedArray%.prototype.indexOf",
|
||||
"typed arrays / %TypedArray%.prototype.lastIndexOf",
|
||||
"typed arrays / %TypedArray%.prototype.slice",
|
||||
"typed arrays / %TypedArray%.prototype.every",
|
||||
"typed arrays / %TypedArray%.prototype.filter",
|
||||
"typed arrays / %TypedArray%.prototype.forEach",
|
||||
"typed arrays / %TypedArray%.prototype.map",
|
||||
"typed arrays / %TypedArray%.prototype.reduce",
|
||||
"typed arrays / %TypedArray%.prototype.reduceRight",
|
||||
"typed arrays / %TypedArray%.prototype.reverse",
|
||||
"typed arrays / %TypedArray%.prototype.some",
|
||||
"typed arrays / %TypedArray%.prototype.sort",
|
||||
"typed arrays / %TypedArray%.prototype.copyWithin",
|
||||
"typed arrays / %TypedArray%.prototype.find",
|
||||
"typed arrays / %TypedArray%.prototype.findIndex",
|
||||
"typed arrays / %TypedArray%.prototype.fill",
|
||||
"typed arrays / %TypedArray%.prototype.keys",
|
||||
"typed arrays / %TypedArray%.prototype.values",
|
||||
"typed arrays / %TypedArray%.prototype.entries",
|
||||
"typed arrays / %TypedArray%.prototype[Symbol.iterator]",
|
||||
"typed arrays / %TypedArray%[Symbol.species]",
|
||||
];
|
||||
|
||||
const es2015 = {
|
||||
"es6.typed.array-buffer": "typed arrays / ArrayBuffer[Symbol.species]",
|
||||
"es6.typed.data-view": "typed arrays / DataView",
|
||||
"es6.typed.int8-array": {
|
||||
features: ["typed arrays / Int8Array"].concat(typedArrayMethods)
|
||||
},
|
||||
"es6.typed.uint8-array": {
|
||||
features: ["typed arrays / Uint8Array"].concat(typedArrayMethods)
|
||||
},
|
||||
"es6.typed.uint8-clamped-array": {
|
||||
features: ["typed arrays / Uint8ClampedArray"].concat(typedArrayMethods)
|
||||
},
|
||||
"es6.typed.int16-array": {
|
||||
features: ["typed arrays / Int16Array"].concat(typedArrayMethods)
|
||||
},
|
||||
"es6.typed.uint16-array": {
|
||||
features: ["typed arrays / Uint16Array"].concat(typedArrayMethods)
|
||||
},
|
||||
"es6.typed.int32-array": {
|
||||
features: ["typed arrays / Int32Array"].concat(typedArrayMethods)
|
||||
},
|
||||
"es6.typed.uint32-array": {
|
||||
features: ["typed arrays / Uint32Array"].concat(typedArrayMethods)
|
||||
},
|
||||
"es6.typed.float32-array": {
|
||||
features: ["typed arrays / Float32Array"].concat(typedArrayMethods)
|
||||
},
|
||||
"es6.typed.float64-array": {
|
||||
features: ["typed arrays / Float64Array"].concat(typedArrayMethods)
|
||||
},
|
||||
|
||||
"es6.map": "Map",
|
||||
"es6.set": "Set",
|
||||
"es6.weak-map": "WeakMap",
|
||||
"es6.weak-set": "WeakSet",
|
||||
|
||||
// Proxy not implementable
|
||||
|
||||
"es6.reflect.apply": "Reflect / Reflect.apply",
|
||||
"es6.reflect.construct": "Reflect / Reflect.construct",
|
||||
"es6.reflect.define-property": "Reflect / Reflect.defineProperty",
|
||||
"es6.reflect.delete-property": "Reflect / Reflect.deleteProperty",
|
||||
"es6.reflect.get": "Reflect / Reflect.get",
|
||||
"es6.reflect.get-own-property-descriptor": "Reflect / Reflect.getOwnPropertyDescriptor",
|
||||
"es6.reflect.get-prototype-of": "Reflect / Reflect.getPrototypeOf",
|
||||
"es6.reflect.has": "Reflect / Reflect.has",
|
||||
"es6.reflect.is-extensible": "Reflect / Reflect.isExtensible",
|
||||
"es6.reflect.own-keys": "Reflect / Reflect.ownKeys",
|
||||
"es6.reflect.prevent-extensions": "Reflect / Reflect.preventExtensions",
|
||||
"es6.reflect.set": "Reflect / Reflect.set",
|
||||
"es6.reflect.set-prototype-of": "Reflect / Reflect.setPrototypeOf",
|
||||
|
||||
"es6.promise": "Promise",
|
||||
|
||||
"es6.symbol": {
|
||||
features: [
|
||||
"Symbol",
|
||||
"Object static methods / Object.getOwnPropertySymbols",
|
||||
"well-known symbols / Symbol.hasInstance",
|
||||
"well-known symbols / Symbol.isConcatSpreadable",
|
||||
"well-known symbols / Symbol.iterator",
|
||||
"well-known symbols / Symbol.match",
|
||||
"well-known symbols / Symbol.replace",
|
||||
"well-known symbols / Symbol.search",
|
||||
"well-known symbols / Symbol.species",
|
||||
"well-known symbols / Symbol.split",
|
||||
"well-known symbols / Symbol.toPrimitive",
|
||||
"well-known symbols / Symbol.toStringTag",
|
||||
"well-known symbols / Symbol.unscopables",
|
||||
]
|
||||
},
|
||||
|
||||
"es6.object.assign": "Object static methods / Object.assign",
|
||||
"es6.object.is": "Object static methods / Object.is",
|
||||
"es6.object.set-prototype-of": "Object static methods / Object.setPrototypeOf",
|
||||
|
||||
"es6.function.name": "function \"name\" property",
|
||||
|
||||
"es6.string.raw": "String static methods / String.raw",
|
||||
"es6.string.from-code-point": "String static methods / String.fromCodePoint",
|
||||
|
||||
"es6.string.code-point-at": "String.prototype methods / String.prototype.codePointAt",
|
||||
// "String.prototype methods / String.prototype.normalize" not implemented
|
||||
"es6.string.repeat": "String.prototype methods / String.prototype.repeat",
|
||||
"es6.string.starts-with": "String.prototype methods / String.prototype.startsWith",
|
||||
"es6.string.ends-with": "String.prototype methods / String.prototype.endsWith",
|
||||
"es6.string.includes": "String.prototype methods / String.prototype.includes",
|
||||
|
||||
"es6.regexp.flags": "RegExp.prototype properties / RegExp.prototype.flags",
|
||||
"es6.regexp.match": "RegExp.prototype properties / RegExp.prototype[Symbol.match]",
|
||||
"es6.regexp.replace": "RegExp.prototype properties / RegExp.prototype[Symbol.replace]",
|
||||
"es6.regexp.split": "RegExp.prototype properties / RegExp.prototype[Symbol.split]",
|
||||
"es6.regexp.search": "RegExp.prototype properties / RegExp.prototype[Symbol.search]",
|
||||
|
||||
"es6.array.from": "Array static methods / Array.from",
|
||||
"es6.array.of": "Array static methods / Array.of",
|
||||
|
||||
"es6.array.copy-within": "Array.prototype methods / Array.prototype.copyWithin",
|
||||
"es6.array.find": "Array.prototype methods / Array.prototype.find",
|
||||
"es6.array.find-index": "Array.prototype methods / Array.prototype.findIndex",
|
||||
"es6.array.fill": "Array.prototype methods / Array.prototype.fill",
|
||||
|
||||
"es6.array.iterator": {
|
||||
features: [
|
||||
"Array.prototype methods / Array.prototype.keys",
|
||||
// can use Symbol.iterator, not implemented in many environments
|
||||
// "Array.prototype methods / Array.prototype.values",
|
||||
"Array.prototype methods / Array.prototype.entries",
|
||||
]
|
||||
},
|
||||
|
||||
"es6.number.is-finite": "Number properties / Number.isFinite",
|
||||
"es6.number.is-integer": "Number properties / Number.isInteger",
|
||||
"es6.number.is-safe-integer": "Number properties / Number.isSafeInteger",
|
||||
"es6.number.is-nan": "Number properties / Number.isNaN",
|
||||
"es6.number.epsilon": "Number properties / Number.EPSILON",
|
||||
"es6.number.min-safe-integer": "Number properties / Number.MIN_SAFE_INTEGER",
|
||||
"es6.number.max-safe-integer": "Number properties / Number.MAX_SAFE_INTEGER",
|
||||
|
||||
"es6.math.acosh": "Math methods / Math.acosh",
|
||||
"es6.math.asinh": "Math methods / Math.asinh",
|
||||
"es6.math.atanh": "Math methods / Math.atanh",
|
||||
"es6.math.cbrt": "Math methods / Math.cbrt",
|
||||
"es6.math.clz32": "Math methods / Math.clz32",
|
||||
"es6.math.cosh": "Math methods / Math.cosh",
|
||||
"es6.math.expm1": "Math methods / Math.expm1",
|
||||
"es6.math.fround": "Math methods / Math.fround",
|
||||
"es6.math.hypot": "Math methods / Math.hypot",
|
||||
"es6.math.imul": "Math methods / Math.imul",
|
||||
"es6.math.log1p": "Math methods / Math.log1p",
|
||||
"es6.math.log10": "Math methods / Math.log10",
|
||||
"es6.math.log2": "Math methods / Math.log2",
|
||||
"es6.math.sign": "Math methods / Math.sign",
|
||||
"es6.math.sinh": "Math methods / Math.sinh",
|
||||
"es6.math.tanh": "Math methods / Math.tanh",
|
||||
"es6.math.trunc": "Math methods / Math.trunc",
|
||||
};
|
||||
|
||||
const es2016 = {
|
||||
"es7.array.includes": "Array.prototype.includes",
|
||||
};
|
||||
|
||||
const es2017 = {
|
||||
"es7.object.values": "Object static methods / Object.values",
|
||||
"es7.object.entries": "Object static methods / Object.entries",
|
||||
"es7.object.get-own-property-descriptors": "Object static methods / Object.getOwnPropertyDescriptors",
|
||||
"es7.string.pad-start": "String padding / String.prototype.padStart",
|
||||
"es7.string.pad-end": "String padding / String.prototype.padEnd",
|
||||
};
|
||||
|
||||
module.exports = Object.assign({}, es2015, es2016, es2017);
|
||||
828
static/js/ketcher2/node_modules/babel-preset-env/data/built-ins.json
generated
vendored
Normal file
828
static/js/ketcher2/node_modules/babel-preset-env/data/built-ins.json
generated
vendored
Normal file
@ -0,0 +1,828 @@
|
||||
{
|
||||
"es6.typed.array-buffer": {
|
||||
"chrome": "51",
|
||||
"edge": "13",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.typed.data-view": {
|
||||
"chrome": "5",
|
||||
"opera": "12",
|
||||
"edge": "12",
|
||||
"firefox": "15",
|
||||
"safari": "5.1",
|
||||
"node": "0.12",
|
||||
"ie": "10",
|
||||
"android": "4",
|
||||
"ios": "6",
|
||||
"electron": "1.1"
|
||||
},
|
||||
"es6.typed.int8-array": {
|
||||
"chrome": "51",
|
||||
"edge": "13",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.typed.uint8-array": {
|
||||
"chrome": "51",
|
||||
"edge": "13",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.typed.uint8-clamped-array": {
|
||||
"chrome": "51",
|
||||
"edge": "13",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.typed.int16-array": {
|
||||
"chrome": "51",
|
||||
"edge": "13",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.typed.uint16-array": {
|
||||
"chrome": "51",
|
||||
"edge": "13",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.typed.int32-array": {
|
||||
"chrome": "51",
|
||||
"edge": "13",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.typed.uint32-array": {
|
||||
"chrome": "51",
|
||||
"edge": "13",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.typed.float32-array": {
|
||||
"chrome": "51",
|
||||
"edge": "13",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.typed.float64-array": {
|
||||
"chrome": "51",
|
||||
"edge": "13",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.map": {
|
||||
"chrome": "51",
|
||||
"edge": "15",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.set": {
|
||||
"chrome": "51",
|
||||
"edge": "15",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.weak-map": {
|
||||
"chrome": "51",
|
||||
"edge": "15",
|
||||
"firefox": "53",
|
||||
"safari": "9",
|
||||
"node": "6.5",
|
||||
"ios": "9",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.weak-set": {
|
||||
"chrome": "51",
|
||||
"edge": "15",
|
||||
"firefox": "53",
|
||||
"safari": "9",
|
||||
"node": "6.5",
|
||||
"ios": "9",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.reflect.apply": {
|
||||
"chrome": "49",
|
||||
"edge": "12",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.construct": {
|
||||
"chrome": "49",
|
||||
"edge": "13",
|
||||
"firefox": "45",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.define-property": {
|
||||
"chrome": "49",
|
||||
"edge": "13",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.delete-property": {
|
||||
"chrome": "49",
|
||||
"edge": "12",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.get": {
|
||||
"chrome": "49",
|
||||
"edge": "12",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.get-own-property-descriptor": {
|
||||
"chrome": "49",
|
||||
"edge": "12",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.get-prototype-of": {
|
||||
"chrome": "49",
|
||||
"edge": "12",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.has": {
|
||||
"chrome": "49",
|
||||
"edge": "12",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.is-extensible": {
|
||||
"chrome": "49",
|
||||
"edge": "12",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.own-keys": {
|
||||
"chrome": "49",
|
||||
"edge": "12",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.prevent-extensions": {
|
||||
"chrome": "49",
|
||||
"edge": "12",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.set": {
|
||||
"chrome": "49",
|
||||
"edge": "12",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.reflect.set-prototype-of": {
|
||||
"chrome": "49",
|
||||
"edge": "12",
|
||||
"firefox": "42",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.promise": {
|
||||
"chrome": "51",
|
||||
"edge": "13",
|
||||
"firefox": "45",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.symbol": {
|
||||
"chrome": "51",
|
||||
"firefox": "51",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.object.assign": {
|
||||
"chrome": "45",
|
||||
"edge": "12",
|
||||
"firefox": "34",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "32",
|
||||
"electron": "0.35"
|
||||
},
|
||||
"es6.object.is": {
|
||||
"chrome": "19",
|
||||
"edge": "12",
|
||||
"firefox": "22",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"android": "4.1",
|
||||
"ios": "9",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.object.set-prototype-of": {
|
||||
"chrome": "34",
|
||||
"edge": "12",
|
||||
"firefox": "31",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"ie": "11",
|
||||
"ios": "9",
|
||||
"opera": "21",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.function.name": {
|
||||
"chrome": "51",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.string.raw": {
|
||||
"chrome": "41",
|
||||
"edge": "12",
|
||||
"firefox": "34",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "28",
|
||||
"electron": "0.24"
|
||||
},
|
||||
"es6.string.from-code-point": {
|
||||
"chrome": "41",
|
||||
"edge": "12",
|
||||
"firefox": "29",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "28",
|
||||
"electron": "0.24"
|
||||
},
|
||||
"es6.string.code-point-at": {
|
||||
"chrome": "41",
|
||||
"edge": "12",
|
||||
"firefox": "29",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "28",
|
||||
"electron": "0.24"
|
||||
},
|
||||
"es6.string.repeat": {
|
||||
"chrome": "41",
|
||||
"edge": "12",
|
||||
"firefox": "24",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "28",
|
||||
"electron": "0.24"
|
||||
},
|
||||
"es6.string.starts-with": {
|
||||
"chrome": "41",
|
||||
"edge": "12",
|
||||
"firefox": "29",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "28",
|
||||
"electron": "0.24"
|
||||
},
|
||||
"es6.string.ends-with": {
|
||||
"chrome": "41",
|
||||
"edge": "12",
|
||||
"firefox": "29",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "28",
|
||||
"electron": "0.24"
|
||||
},
|
||||
"es6.string.includes": {
|
||||
"chrome": "41",
|
||||
"edge": "12",
|
||||
"firefox": "40",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "28",
|
||||
"electron": "0.24"
|
||||
},
|
||||
"es6.regexp.flags": {
|
||||
"chrome": "49",
|
||||
"firefox": "37",
|
||||
"safari": "9",
|
||||
"node": "6",
|
||||
"ios": "9",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"es6.regexp.match": {
|
||||
"chrome": "50",
|
||||
"firefox": "49",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "37",
|
||||
"electron": "1.1"
|
||||
},
|
||||
"es6.regexp.replace": {
|
||||
"chrome": "50",
|
||||
"firefox": "49",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "37",
|
||||
"electron": "1.1"
|
||||
},
|
||||
"es6.regexp.split": {
|
||||
"chrome": "50",
|
||||
"firefox": "49",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "37",
|
||||
"electron": "1.1"
|
||||
},
|
||||
"es6.regexp.search": {
|
||||
"chrome": "50",
|
||||
"firefox": "49",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "37",
|
||||
"electron": "1.1"
|
||||
},
|
||||
"es6.array.from": {
|
||||
"chrome": "51",
|
||||
"edge": "15",
|
||||
"firefox": "36",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"es6.array.of": {
|
||||
"chrome": "45",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "32",
|
||||
"electron": "0.35"
|
||||
},
|
||||
"es6.array.copy-within": {
|
||||
"chrome": "45",
|
||||
"edge": "12",
|
||||
"firefox": "32",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "32",
|
||||
"electron": "0.35"
|
||||
},
|
||||
"es6.array.find": {
|
||||
"chrome": "45",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "4",
|
||||
"ios": "8",
|
||||
"opera": "32",
|
||||
"electron": "0.35"
|
||||
},
|
||||
"es6.array.find-index": {
|
||||
"chrome": "45",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "4",
|
||||
"ios": "8",
|
||||
"opera": "32",
|
||||
"electron": "0.35"
|
||||
},
|
||||
"es6.array.fill": {
|
||||
"chrome": "45",
|
||||
"edge": "12",
|
||||
"firefox": "31",
|
||||
"safari": "7.1",
|
||||
"node": "4",
|
||||
"ios": "8",
|
||||
"opera": "32",
|
||||
"electron": "0.35"
|
||||
},
|
||||
"es6.array.iterator": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "28",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.number.is-finite": {
|
||||
"chrome": "19",
|
||||
"edge": "12",
|
||||
"firefox": "16",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"android": "4.1",
|
||||
"ios": "9",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.number.is-integer": {
|
||||
"chrome": "34",
|
||||
"edge": "12",
|
||||
"firefox": "16",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"ios": "9",
|
||||
"opera": "21",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.number.is-safe-integer": {
|
||||
"chrome": "34",
|
||||
"edge": "12",
|
||||
"firefox": "32",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"ios": "9",
|
||||
"opera": "21",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.number.is-nan": {
|
||||
"chrome": "19",
|
||||
"edge": "12",
|
||||
"firefox": "15",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"android": "4.1",
|
||||
"ios": "9",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.number.epsilon": {
|
||||
"chrome": "34",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"ios": "9",
|
||||
"opera": "21",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.number.min-safe-integer": {
|
||||
"chrome": "34",
|
||||
"edge": "12",
|
||||
"firefox": "31",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"ios": "9",
|
||||
"opera": "21",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.number.max-safe-integer": {
|
||||
"chrome": "34",
|
||||
"edge": "12",
|
||||
"firefox": "31",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"ios": "9",
|
||||
"opera": "21",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.acosh": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.asinh": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.atanh": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.cbrt": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.clz32": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "31",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"ios": "9",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.cosh": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.expm1": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.fround": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "26",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.hypot": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "27",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.imul": {
|
||||
"chrome": "30",
|
||||
"edge": "12",
|
||||
"firefox": "23",
|
||||
"safari": "7",
|
||||
"node": "0.12",
|
||||
"ios": "7",
|
||||
"opera": "17",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.log1p": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.log10": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.log2": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.sign": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"ios": "9",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.sinh": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.tanh": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es6.math.trunc": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "25",
|
||||
"safari": "7.1",
|
||||
"node": "0.12",
|
||||
"ios": "8",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"es7.array.includes": {
|
||||
"chrome": "47",
|
||||
"edge": "14",
|
||||
"firefox": "43",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "34",
|
||||
"electron": "0.36"
|
||||
},
|
||||
"es7.object.values": {
|
||||
"chrome": "54",
|
||||
"edge": "14",
|
||||
"firefox": "47",
|
||||
"safari": "10.1",
|
||||
"node": "7",
|
||||
"ios": "10.3",
|
||||
"opera": "41",
|
||||
"electron": "1.5"
|
||||
},
|
||||
"es7.object.entries": {
|
||||
"chrome": "54",
|
||||
"edge": "14",
|
||||
"firefox": "47",
|
||||
"safari": "10.1",
|
||||
"node": "7",
|
||||
"ios": "10.3",
|
||||
"opera": "41",
|
||||
"electron": "1.5"
|
||||
},
|
||||
"es7.object.get-own-property-descriptors": {
|
||||
"chrome": "54",
|
||||
"edge": "15",
|
||||
"firefox": "50",
|
||||
"safari": "10.1",
|
||||
"node": "7",
|
||||
"ios": "10.3",
|
||||
"opera": "41",
|
||||
"electron": "1.5"
|
||||
},
|
||||
"es7.string.pad-start": {
|
||||
"chrome": "57",
|
||||
"edge": "15",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "8",
|
||||
"ios": "10",
|
||||
"opera": "44",
|
||||
"electron": "1.7"
|
||||
},
|
||||
"es7.string.pad-end": {
|
||||
"chrome": "57",
|
||||
"edge": "15",
|
||||
"firefox": "48",
|
||||
"safari": "10",
|
||||
"node": "8",
|
||||
"ios": "10",
|
||||
"opera": "44",
|
||||
"electron": "1.7"
|
||||
}
|
||||
}
|
||||
130
static/js/ketcher2/node_modules/babel-preset-env/data/plugin-features.js
generated
vendored
Normal file
130
static/js/ketcher2/node_modules/babel-preset-env/data/plugin-features.js
generated
vendored
Normal file
@ -0,0 +1,130 @@
|
||||
module.exports = {
|
||||
// es2015
|
||||
"check-es2015-constants": {
|
||||
features: [
|
||||
"const",
|
||||
],
|
||||
},
|
||||
"transform-es2015-arrow-functions": {
|
||||
features: [
|
||||
"arrow functions",
|
||||
],
|
||||
},
|
||||
"transform-es2015-block-scoped-functions": {
|
||||
features: [
|
||||
"block-level function declaration"
|
||||
],
|
||||
},
|
||||
"transform-es2015-block-scoping": {
|
||||
features: [
|
||||
"const",
|
||||
"let",
|
||||
],
|
||||
},
|
||||
"transform-es2015-classes": {
|
||||
features: [
|
||||
"class",
|
||||
"super",
|
||||
],
|
||||
},
|
||||
"transform-es2015-computed-properties": {
|
||||
features: [
|
||||
"object literal extensions / computed properties",
|
||||
],
|
||||
},
|
||||
"transform-es2015-destructuring": {
|
||||
features: [
|
||||
"destructuring, assignment",
|
||||
"destructuring, declarations",
|
||||
"destructuring, parameters",
|
||||
],
|
||||
},
|
||||
"transform-es2015-duplicate-keys": {
|
||||
features: [
|
||||
"miscellaneous / duplicate property names in strict mode",
|
||||
],
|
||||
},
|
||||
"transform-es2015-for-of": {
|
||||
features: [
|
||||
"for..of loops",
|
||||
],
|
||||
},
|
||||
"transform-es2015-function-name": {
|
||||
features: [
|
||||
"function \"name\" property",
|
||||
]
|
||||
},
|
||||
"transform-es2015-literals": {
|
||||
features: [
|
||||
"Unicode code point escapes",
|
||||
],
|
||||
},
|
||||
"transform-es2015-object-super": {
|
||||
features: [
|
||||
"super",
|
||||
],
|
||||
},
|
||||
"transform-es2015-parameters": {
|
||||
features: [
|
||||
"default function parameters",
|
||||
"rest parameters",
|
||||
],
|
||||
},
|
||||
"transform-es2015-shorthand-properties": {
|
||||
features: [
|
||||
"object literal extensions / shorthand properties",
|
||||
],
|
||||
},
|
||||
"transform-es2015-spread": {
|
||||
features: [
|
||||
"spread (...) operator",
|
||||
],
|
||||
},
|
||||
"transform-es2015-sticky-regex": {
|
||||
features: [
|
||||
"RegExp \"y\" and \"u\" flags / \"y\" flag, lastIndex",
|
||||
"RegExp \"y\" and \"u\" flags / \"y\" flag",
|
||||
],
|
||||
},
|
||||
"transform-es2015-template-literals": {
|
||||
features: [
|
||||
"template literals",
|
||||
],
|
||||
},
|
||||
"transform-es2015-typeof-symbol": {
|
||||
features: [
|
||||
"Symbol / typeof support"
|
||||
],
|
||||
},
|
||||
"transform-es2015-unicode-regex": {
|
||||
features: [
|
||||
"RegExp \"y\" and \"u\" flags / \"u\" flag, case folding",
|
||||
"RegExp \"y\" and \"u\" flags / \"u\" flag, Unicode code point escapes",
|
||||
"RegExp \"y\" and \"u\" flags / \"u\" flag",
|
||||
],
|
||||
},
|
||||
"transform-regenerator": {
|
||||
features: [
|
||||
"generators",
|
||||
],
|
||||
},
|
||||
|
||||
// es2016
|
||||
"transform-exponentiation-operator": {
|
||||
features: [
|
||||
"exponentiation (**) operator",
|
||||
],
|
||||
},
|
||||
|
||||
// es2017
|
||||
"transform-async-to-generator": {
|
||||
features: [
|
||||
"async functions",
|
||||
],
|
||||
},
|
||||
"syntax-trailing-function-commas": {
|
||||
features: [
|
||||
"trailing commas in function syntax",
|
||||
],
|
||||
}
|
||||
};
|
||||
232
static/js/ketcher2/node_modules/babel-preset-env/data/plugins.json
generated
vendored
Normal file
232
static/js/ketcher2/node_modules/babel-preset-env/data/plugins.json
generated
vendored
Normal file
@ -0,0 +1,232 @@
|
||||
{
|
||||
"check-es2015-constants": {
|
||||
"chrome": "49",
|
||||
"edge": "14",
|
||||
"firefox": "51",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"transform-es2015-arrow-functions": {
|
||||
"chrome": "47",
|
||||
"edge": "13",
|
||||
"firefox": "45",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "34",
|
||||
"electron": "0.36"
|
||||
},
|
||||
"transform-es2015-block-scoped-functions": {
|
||||
"chrome": "41",
|
||||
"edge": "12",
|
||||
"firefox": "46",
|
||||
"safari": "10",
|
||||
"node": "4",
|
||||
"ie": "11",
|
||||
"ios": "10",
|
||||
"opera": "28",
|
||||
"electron": "0.24"
|
||||
},
|
||||
"transform-es2015-block-scoping": {
|
||||
"chrome": "49",
|
||||
"edge": "14",
|
||||
"firefox": "51",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"transform-es2015-classes": {
|
||||
"chrome": "46",
|
||||
"edge": "13",
|
||||
"firefox": "45",
|
||||
"safari": "10",
|
||||
"node": "5",
|
||||
"ios": "10",
|
||||
"opera": "33",
|
||||
"electron": "0.36"
|
||||
},
|
||||
"transform-es2015-computed-properties": {
|
||||
"chrome": "44",
|
||||
"edge": "12",
|
||||
"firefox": "34",
|
||||
"safari": "7.1",
|
||||
"node": "4",
|
||||
"ios": "8",
|
||||
"opera": "31",
|
||||
"electron": "0.31"
|
||||
},
|
||||
"transform-es2015-destructuring": {
|
||||
"chrome": "51",
|
||||
"edge": "15",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"transform-es2015-duplicate-keys": {
|
||||
"chrome": "42",
|
||||
"edge": "12",
|
||||
"firefox": "34",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "29",
|
||||
"electron": "0.27"
|
||||
},
|
||||
"transform-es2015-for-of": {
|
||||
"chrome": "51",
|
||||
"edge": "15",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"transform-es2015-function-name": {
|
||||
"chrome": "51",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"ios": "10",
|
||||
"opera": "38",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"transform-es2015-literals": {
|
||||
"chrome": "44",
|
||||
"edge": "12",
|
||||
"firefox": "53",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "31",
|
||||
"electron": "0.31"
|
||||
},
|
||||
"transform-es2015-object-super": {
|
||||
"chrome": "46",
|
||||
"edge": "13",
|
||||
"firefox": "45",
|
||||
"safari": "10",
|
||||
"node": "5",
|
||||
"ios": "10",
|
||||
"opera": "33",
|
||||
"electron": "0.36"
|
||||
},
|
||||
"transform-es2015-parameters": {
|
||||
"chrome": "49",
|
||||
"edge": "14",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"transform-es2015-shorthand-properties": {
|
||||
"chrome": "43",
|
||||
"edge": "12",
|
||||
"firefox": "33",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "30",
|
||||
"electron": "0.29"
|
||||
},
|
||||
"transform-es2015-spread": {
|
||||
"chrome": "46",
|
||||
"edge": "13",
|
||||
"firefox": "36",
|
||||
"safari": "10",
|
||||
"node": "5",
|
||||
"ios": "10",
|
||||
"opera": "33",
|
||||
"electron": "0.36"
|
||||
},
|
||||
"transform-es2015-sticky-regex": {
|
||||
"chrome": "49",
|
||||
"edge": "13",
|
||||
"firefox": "3",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "36",
|
||||
"electron": "1"
|
||||
},
|
||||
"transform-es2015-template-literals": {
|
||||
"chrome": "41",
|
||||
"edge": "13",
|
||||
"firefox": "34",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"ios": "9",
|
||||
"opera": "28",
|
||||
"electron": "0.24"
|
||||
},
|
||||
"transform-es2015-typeof-symbol": {
|
||||
"chrome": "38",
|
||||
"edge": "12",
|
||||
"firefox": "36",
|
||||
"safari": "9",
|
||||
"node": "0.12",
|
||||
"ios": "9",
|
||||
"opera": "25",
|
||||
"electron": "0.2"
|
||||
},
|
||||
"transform-es2015-unicode-regex": {
|
||||
"chrome": "50",
|
||||
"edge": "13",
|
||||
"firefox": "46",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "37",
|
||||
"electron": "1.1"
|
||||
},
|
||||
"transform-regenerator": {
|
||||
"chrome": "50",
|
||||
"edge": "13",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"ios": "10",
|
||||
"opera": "37",
|
||||
"electron": "1.1"
|
||||
},
|
||||
"transform-exponentiation-operator": {
|
||||
"chrome": "52",
|
||||
"edge": "14",
|
||||
"firefox": "52",
|
||||
"safari": "10.1",
|
||||
"node": "7",
|
||||
"ios": "10.3",
|
||||
"opera": "39",
|
||||
"electron": "1.3"
|
||||
},
|
||||
"transform-async-to-generator": {
|
||||
"chrome": "55",
|
||||
"edge": "15",
|
||||
"firefox": "52",
|
||||
"safari": "10.1",
|
||||
"node": "7.6",
|
||||
"ios": "10.3",
|
||||
"opera": "42",
|
||||
"electron": "1.6"
|
||||
},
|
||||
"syntax-trailing-function-commas": {
|
||||
"chrome": "58",
|
||||
"edge": "14",
|
||||
"firefox": "52",
|
||||
"safari": "10",
|
||||
"node": "8",
|
||||
"ios": "10",
|
||||
"opera": "45",
|
||||
"electron": "1.7"
|
||||
}
|
||||
}
|
||||
4
static/js/ketcher2/node_modules/babel-preset-env/lib/default-includes.js
generated
vendored
Normal file
4
static/js/ketcher2/node_modules/babel-preset-env/lib/default-includes.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
var defaultWebIncludes = exports.defaultWebIncludes = ["web.timers", "web.immediate", "web.dom.iterable"];
|
||||
194
static/js/ketcher2/node_modules/babel-preset-env/lib/index.js
generated
vendored
Normal file
194
static/js/ketcher2/node_modules/babel-preset-env/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,194 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.transformIncludesAndExcludes = exports.isPluginRequired = undefined;
|
||||
exports.default = buildPreset;
|
||||
|
||||
var _semver = require("semver");
|
||||
|
||||
var _semver2 = _interopRequireDefault(_semver);
|
||||
|
||||
var _builtIns = require("../data/built-ins.json");
|
||||
|
||||
var _builtIns2 = _interopRequireDefault(_builtIns);
|
||||
|
||||
var _defaultIncludes = require("./default-includes");
|
||||
|
||||
var _moduleTransformations = require("./module-transformations");
|
||||
|
||||
var _moduleTransformations2 = _interopRequireDefault(_moduleTransformations);
|
||||
|
||||
var _normalizeOptions = require("./normalize-options.js");
|
||||
|
||||
var _normalizeOptions2 = _interopRequireDefault(_normalizeOptions);
|
||||
|
||||
var _plugins = require("../data/plugins.json");
|
||||
|
||||
var _plugins2 = _interopRequireDefault(_plugins);
|
||||
|
||||
var _transformPolyfillRequirePlugin = require("./transform-polyfill-require-plugin");
|
||||
|
||||
var _transformPolyfillRequirePlugin2 = _interopRequireDefault(_transformPolyfillRequirePlugin);
|
||||
|
||||
var _targetsParser = require("./targets-parser");
|
||||
|
||||
var _targetsParser2 = _interopRequireDefault(_targetsParser);
|
||||
|
||||
var _utils = require("./utils");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* Determine if a transformation is required
|
||||
*
|
||||
* NOTE: This assumes `supportedEnvironments` has already been parsed by `getTargets`
|
||||
*
|
||||
* @param {Object} supportedEnvironments An Object containing environment keys and the lowest
|
||||
* supported version as a value
|
||||
* @param {Object} plugin An Object containing environment keys and the lowest
|
||||
* version the feature was implemented in as a value
|
||||
* @return {Boolean} Whether or not the transformation is required
|
||||
*/
|
||||
var isPluginRequired = exports.isPluginRequired = function isPluginRequired(supportedEnvironments, plugin) {
|
||||
var targetEnvironments = Object.keys(supportedEnvironments);
|
||||
|
||||
if (targetEnvironments.length === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var isRequiredForEnvironments = targetEnvironments.filter(function (environment) {
|
||||
// Feature is not implemented in that environment
|
||||
if (!plugin[environment]) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var lowestImplementedVersion = plugin[environment];
|
||||
var lowestTargetedVersion = supportedEnvironments[environment];
|
||||
|
||||
if (!_semver2.default.valid(lowestTargetedVersion)) {
|
||||
throw new Error(
|
||||
// eslint-disable-next-line max-len
|
||||
"Invalid version passed for target \"" + environment + "\": \"" + lowestTargetedVersion + "\". Versions must be in semver format (major.minor.patch)");
|
||||
}
|
||||
|
||||
return _semver2.default.gt((0, _utils.semverify)(lowestImplementedVersion), lowestTargetedVersion);
|
||||
});
|
||||
|
||||
return isRequiredForEnvironments.length > 0;
|
||||
};
|
||||
|
||||
var hasBeenLogged = false;
|
||||
|
||||
var logPlugin = function logPlugin(plugin, targets, list) {
|
||||
var envList = list[plugin] || {};
|
||||
var filteredList = Object.keys(targets).reduce(function (a, b) {
|
||||
if (!envList[b] || _semver2.default.lt(targets[b], (0, _utils.semverify)(envList[b]))) {
|
||||
a[b] = (0, _utils.prettifyVersion)(targets[b]);
|
||||
}
|
||||
return a;
|
||||
}, {});
|
||||
var logStr = " " + plugin + " " + JSON.stringify(filteredList);
|
||||
console.log(logStr);
|
||||
};
|
||||
|
||||
var filterItem = function filterItem(targets, exclusions, list, item) {
|
||||
var isDefault = _defaultIncludes.defaultWebIncludes.indexOf(item) >= 0;
|
||||
var notExcluded = exclusions.indexOf(item) === -1;
|
||||
|
||||
if (isDefault) return notExcluded;
|
||||
var isRequired = isPluginRequired(targets, list[item]);
|
||||
return isRequired && notExcluded;
|
||||
};
|
||||
|
||||
var getBuiltInTargets = function getBuiltInTargets(targets) {
|
||||
var builtInTargets = (0, _utils._extends)({}, targets);
|
||||
if (builtInTargets.uglify != null) {
|
||||
delete builtInTargets.uglify;
|
||||
}
|
||||
return builtInTargets;
|
||||
};
|
||||
|
||||
var transformIncludesAndExcludes = exports.transformIncludesAndExcludes = function transformIncludesAndExcludes(opts) {
|
||||
return {
|
||||
all: opts,
|
||||
plugins: opts.filter(function (opt) {
|
||||
return !opt.match(/^(es\d+|web)\./);
|
||||
}),
|
||||
builtIns: opts.filter(function (opt) {
|
||||
return opt.match(/^(es\d+|web)\./);
|
||||
})
|
||||
};
|
||||
};
|
||||
|
||||
function getPlatformSpecificDefaultFor(targets) {
|
||||
var targetNames = Object.keys(targets);
|
||||
var isAnyTarget = !targetNames.length;
|
||||
var isWebTarget = targetNames.some(function (name) {
|
||||
return name !== "node";
|
||||
});
|
||||
|
||||
return isAnyTarget || isWebTarget ? _defaultIncludes.defaultWebIncludes : [];
|
||||
}
|
||||
|
||||
function buildPreset(context) {
|
||||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
var validatedOptions = (0, _normalizeOptions2.default)(opts);
|
||||
var debug = validatedOptions.debug,
|
||||
loose = validatedOptions.loose,
|
||||
moduleType = validatedOptions.moduleType,
|
||||
spec = validatedOptions.spec,
|
||||
useBuiltIns = validatedOptions.useBuiltIns;
|
||||
|
||||
|
||||
var targets = (0, _targetsParser2.default)(validatedOptions.targets);
|
||||
var include = transformIncludesAndExcludes(validatedOptions.include);
|
||||
var exclude = transformIncludesAndExcludes(validatedOptions.exclude);
|
||||
|
||||
var filterPlugins = filterItem.bind(null, targets, exclude.plugins, _plugins2.default);
|
||||
var transformations = Object.keys(_plugins2.default).filter(filterPlugins).concat(include.plugins);
|
||||
|
||||
var polyfills = void 0;
|
||||
var polyfillTargets = void 0;
|
||||
if (useBuiltIns) {
|
||||
polyfillTargets = getBuiltInTargets(targets);
|
||||
var filterBuiltIns = filterItem.bind(null, polyfillTargets, exclude.builtIns, _builtIns2.default);
|
||||
polyfills = Object.keys(_builtIns2.default).concat(getPlatformSpecificDefaultFor(polyfillTargets)).filter(filterBuiltIns).concat(include.builtIns);
|
||||
}
|
||||
|
||||
if (debug && !hasBeenLogged) {
|
||||
hasBeenLogged = true;
|
||||
console.log("babel-preset-env: `DEBUG` option");
|
||||
console.log("\nUsing targets:");
|
||||
console.log(JSON.stringify((0, _utils.prettifyTargets)(targets), null, 2));
|
||||
console.log("\nModules transform: " + moduleType);
|
||||
console.log("\nUsing plugins:");
|
||||
transformations.forEach(function (transform) {
|
||||
logPlugin(transform, targets, _plugins2.default);
|
||||
});
|
||||
if (useBuiltIns && polyfills.length) {
|
||||
console.log("\nUsing polyfills:");
|
||||
polyfills.forEach(function (polyfill) {
|
||||
logPlugin(polyfill, polyfillTargets, _builtIns2.default);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var regenerator = transformations.indexOf("transform-regenerator") >= 0;
|
||||
var modulePlugin = moduleType !== false && _moduleTransformations2.default[moduleType];
|
||||
var plugins = [];
|
||||
|
||||
// NOTE: not giving spec here yet to avoid compatibility issues when
|
||||
// babel-plugin-transform-es2015-modules-commonjs gets its spec mode
|
||||
modulePlugin && plugins.push([require("babel-plugin-" + modulePlugin), { loose: loose }]);
|
||||
|
||||
plugins.push.apply(plugins, transformations.map(function (pluginName) {
|
||||
return [require("babel-plugin-" + pluginName), { spec: spec, loose: loose }];
|
||||
}));
|
||||
|
||||
useBuiltIns && plugins.push([_transformPolyfillRequirePlugin2.default, { polyfills: polyfills, regenerator: regenerator }]);
|
||||
|
||||
return {
|
||||
plugins: plugins
|
||||
};
|
||||
}
|
||||
9
static/js/ketcher2/node_modules/babel-preset-env/lib/module-transformations.js
generated
vendored
Normal file
9
static/js/ketcher2/node_modules/babel-preset-env/lib/module-transformations.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = {
|
||||
"amd": "transform-es2015-modules-amd",
|
||||
"commonjs": "transform-es2015-modules-commonjs",
|
||||
"systemjs": "transform-es2015-modules-systemjs",
|
||||
"umd": "transform-es2015-modules-umd"
|
||||
};
|
||||
126
static/js/ketcher2/node_modules/babel-preset-env/lib/normalize-options.js
generated
vendored
Normal file
126
static/js/ketcher2/node_modules/babel-preset-env/lib/normalize-options.js
generated
vendored
Normal file
@ -0,0 +1,126 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.validateModulesOption = exports.validateSpecOption = exports.validateLooseOption = exports.validateBoolOption = exports.checkDuplicateIncludeExcludes = exports.normalizePluginNames = exports.normalizePluginName = exports.validateIncludesAndExcludes = undefined;
|
||||
exports.default = normalizeOptions;
|
||||
|
||||
var _invariant = require("invariant");
|
||||
|
||||
var _invariant2 = _interopRequireDefault(_invariant);
|
||||
|
||||
var _builtIns = require("../data/built-ins.json");
|
||||
|
||||
var _builtIns2 = _interopRequireDefault(_builtIns);
|
||||
|
||||
var _defaultIncludes = require("./default-includes");
|
||||
|
||||
var _moduleTransformations = require("./module-transformations");
|
||||
|
||||
var _moduleTransformations2 = _interopRequireDefault(_moduleTransformations);
|
||||
|
||||
var _pluginFeatures = require("../data/plugin-features");
|
||||
|
||||
var _pluginFeatures2 = _interopRequireDefault(_pluginFeatures);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var validIncludesAndExcludes = [].concat(Object.keys(_pluginFeatures2.default), Object.keys(_moduleTransformations2.default).map(function (m) {
|
||||
return _moduleTransformations2.default[m];
|
||||
}), Object.keys(_builtIns2.default), _defaultIncludes.defaultWebIncludes);
|
||||
|
||||
var hasBeenWarned = false;
|
||||
|
||||
var validateIncludesAndExcludes = exports.validateIncludesAndExcludes = function validateIncludesAndExcludes() {
|
||||
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
||||
var type = arguments[1];
|
||||
|
||||
(0, _invariant2.default)(Array.isArray(opts), "Invalid Option: The '" + type + "' option must be an Array<String> of plugins/built-ins");
|
||||
|
||||
var unknownOpts = [];
|
||||
opts.forEach(function (opt) {
|
||||
if (validIncludesAndExcludes.indexOf(opt) === -1) {
|
||||
unknownOpts.push(opt);
|
||||
}
|
||||
});
|
||||
|
||||
(0, _invariant2.default)(unknownOpts.length === 0, "Invalid Option: The plugins/built-ins '" + unknownOpts + "' passed to the '" + type + "' option are not\n valid. Please check data/[plugin-features|built-in-features].js in babel-preset-env");
|
||||
|
||||
return opts;
|
||||
};
|
||||
|
||||
var normalizePluginName = exports.normalizePluginName = function normalizePluginName(plugin) {
|
||||
return plugin.replace(/^babel-plugin-/, "");
|
||||
};
|
||||
|
||||
var normalizePluginNames = exports.normalizePluginNames = function normalizePluginNames(plugins) {
|
||||
return plugins.map(normalizePluginName);
|
||||
};
|
||||
|
||||
var checkDuplicateIncludeExcludes = exports.checkDuplicateIncludeExcludes = function checkDuplicateIncludeExcludes() {
|
||||
var include = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
||||
var exclude = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
||||
|
||||
var duplicates = include.filter(function (opt) {
|
||||
return exclude.indexOf(opt) >= 0;
|
||||
});
|
||||
|
||||
(0, _invariant2.default)(duplicates.length === 0, "Invalid Option: The plugins/built-ins '" + duplicates + "' were found in both the \"include\" and\n \"exclude\" options.");
|
||||
};
|
||||
|
||||
var validateBoolOption = exports.validateBoolOption = function validateBoolOption(name, value, defaultValue) {
|
||||
if (typeof value === "undefined") {
|
||||
value = defaultValue;
|
||||
}
|
||||
|
||||
if (typeof value !== "boolean") {
|
||||
throw new Error("Preset env: '" + name + "' option must be a boolean.");
|
||||
}
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
var validateLooseOption = exports.validateLooseOption = function validateLooseOption(looseOpt) {
|
||||
return validateBoolOption("loose", looseOpt, false);
|
||||
};
|
||||
var validateSpecOption = exports.validateSpecOption = function validateSpecOption(specOpt) {
|
||||
return validateBoolOption("spec", specOpt, false);
|
||||
};
|
||||
|
||||
var validateModulesOption = exports.validateModulesOption = function validateModulesOption() {
|
||||
var modulesOpt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "commonjs";
|
||||
|
||||
(0, _invariant2.default)(modulesOpt === false || Object.keys(_moduleTransformations2.default).indexOf(modulesOpt) > -1, "Invalid Option: The 'modules' option must be either 'false' to indicate no modules, or a\n module type which can be be one of: 'commonjs' (default), 'amd', 'umd', 'systemjs'.");
|
||||
|
||||
return modulesOpt;
|
||||
};
|
||||
|
||||
function normalizeOptions(opts) {
|
||||
// TODO: remove whitelist in favor of include in next major
|
||||
if (opts.whitelist && !hasBeenWarned) {
|
||||
console.warn("Deprecation Warning: The \"whitelist\" option has been deprecated in favor of \"include\" to\n match the newly added \"exclude\" option (instead of \"blacklist\").");
|
||||
hasBeenWarned = true;
|
||||
}
|
||||
|
||||
(0, _invariant2.default)(!(opts.whitelist && opts.include), "Invalid Option: The \"whitelist\" and the \"include\" option are the same and one can be used at\n a time");
|
||||
|
||||
if (opts.exclude) {
|
||||
opts.exclude = normalizePluginNames(opts.exclude);
|
||||
}
|
||||
|
||||
if (opts.whitelist || opts.include) {
|
||||
opts.include = normalizePluginNames(opts.whitelist || opts.include);
|
||||
}
|
||||
|
||||
checkDuplicateIncludeExcludes(opts.include, opts.exclude);
|
||||
|
||||
return {
|
||||
debug: opts.debug,
|
||||
exclude: validateIncludesAndExcludes(opts.exclude, "exclude"),
|
||||
include: validateIncludesAndExcludes(opts.include, "include"),
|
||||
loose: validateLooseOption(opts.loose),
|
||||
moduleType: validateModulesOption(opts.modules),
|
||||
spec: validateSpecOption(opts.spec),
|
||||
targets: opts.targets,
|
||||
useBuiltIns: opts.useBuiltIns
|
||||
};
|
||||
}
|
||||
139
static/js/ketcher2/node_modules/babel-preset-env/lib/targets-parser.js
generated
vendored
Normal file
139
static/js/ketcher2/node_modules/babel-preset-env/lib/targets-parser.js
generated
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _browserslist = require("browserslist");
|
||||
|
||||
var _browserslist2 = _interopRequireDefault(_browserslist);
|
||||
|
||||
var _semver = require("semver");
|
||||
|
||||
var _semver2 = _interopRequireDefault(_semver);
|
||||
|
||||
var _utils = require("./utils");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var browserNameMap = {
|
||||
android: "android",
|
||||
chrome: "chrome",
|
||||
and_chr: "chrome",
|
||||
edge: "edge",
|
||||
firefox: "firefox",
|
||||
ie: "ie",
|
||||
ios_saf: "ios",
|
||||
safari: "safari"
|
||||
};
|
||||
|
||||
var isBrowsersQueryValid = function isBrowsersQueryValid(browsers) {
|
||||
return typeof browsers === "string" || Array.isArray(browsers);
|
||||
};
|
||||
|
||||
var semverMin = function semverMin(first, second) {
|
||||
return first && _semver2.default.lt(first, second) ? first : second;
|
||||
};
|
||||
|
||||
var getLowestVersions = function getLowestVersions(browsers) {
|
||||
return browsers.reduce(function (all, browser) {
|
||||
var _browser$split = browser.split(" "),
|
||||
browserName = _browser$split[0],
|
||||
browserVersion = _browser$split[1];
|
||||
|
||||
var normalizedBrowserName = browserNameMap[browserName];
|
||||
|
||||
if (!normalizedBrowserName) {
|
||||
return all;
|
||||
}
|
||||
|
||||
try {
|
||||
// Browser version can return as "10.0-10.2"
|
||||
var splitVersion = browserVersion.split("-")[0];
|
||||
var parsedBrowserVersion = (0, _utils.semverify)(splitVersion);
|
||||
|
||||
all[normalizedBrowserName] = semverMin(all[normalizedBrowserName], parsedBrowserVersion);
|
||||
} catch (e) {}
|
||||
|
||||
return all;
|
||||
}, {});
|
||||
};
|
||||
|
||||
var outputDecimalWarning = function outputDecimalWarning(decimalTargets) {
|
||||
if (!decimalTargets || !decimalTargets.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("Warning, the following targets are using a decimal version:");
|
||||
console.log("");
|
||||
decimalTargets.forEach(function (_ref) {
|
||||
var target = _ref.target,
|
||||
value = _ref.value;
|
||||
return console.log(" " + target + ": " + value);
|
||||
});
|
||||
console.log("");
|
||||
console.log("We recommend using a string for minor/patch versions to avoid numbers like 6.10");
|
||||
console.log("getting parsed as 6.1, which can lead to unexpected behavior.");
|
||||
console.log("");
|
||||
};
|
||||
|
||||
var targetParserMap = {
|
||||
__default: function __default(target, value) {
|
||||
return [target, (0, _utils.semverify)(value)];
|
||||
},
|
||||
|
||||
// Parse `node: true` and `node: "current"` to version
|
||||
node: function node(target, value) {
|
||||
var parsed = value === true || value === "current" ? process.versions.node : (0, _utils.semverify)(value);
|
||||
|
||||
return [target, parsed];
|
||||
},
|
||||
|
||||
// Only valid value for Uglify is `true`
|
||||
uglify: function uglify(target, value) {
|
||||
return [target, value === true];
|
||||
}
|
||||
};
|
||||
|
||||
var getTargets = function getTargets() {
|
||||
var targets = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
|
||||
var targetOpts = {};
|
||||
|
||||
// Parse browsers target via browserslist
|
||||
if (isBrowsersQueryValid(targets.browsers)) {
|
||||
targetOpts = getLowestVersions((0, _browserslist2.default)(targets.browsers));
|
||||
}
|
||||
|
||||
// Parse remaining targets
|
||||
var parsed = Object.keys(targets).reduce(function (results, target) {
|
||||
if (target !== "browsers") {
|
||||
var value = targets[target];
|
||||
|
||||
// Warn when specifying minor/patch as a decimal
|
||||
if (typeof value === "number" && value % 1 !== 0) {
|
||||
results.decimalWarnings.push({ target: target, value: value });
|
||||
}
|
||||
|
||||
// Check if we have a target parser?
|
||||
var parser = targetParserMap[target] || targetParserMap.__default;
|
||||
|
||||
var _parser = parser(target, value),
|
||||
parsedTarget = _parser[0],
|
||||
parsedValue = _parser[1];
|
||||
|
||||
if (parsedValue) {
|
||||
results.targets[parsedTarget] = parsedValue;
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}, {
|
||||
targets: targetOpts,
|
||||
decimalWarnings: []
|
||||
});
|
||||
|
||||
outputDecimalWarning(parsed.decimalWarnings);
|
||||
|
||||
return parsed.targets;
|
||||
};
|
||||
|
||||
exports.default = getTargets;
|
||||
87
static/js/ketcher2/node_modules/babel-preset-env/lib/transform-polyfill-require-plugin.js
generated
vendored
Normal file
87
static/js/ketcher2/node_modules/babel-preset-env/lib/transform-polyfill-require-plugin.js
generated
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
exports.default = function (_ref) {
|
||||
var t = _ref.types;
|
||||
|
||||
function createImportDeclaration(polyfill) {
|
||||
var declar = t.importDeclaration([], t.stringLiteral(polyfill));
|
||||
declar._blockHoist = 3;
|
||||
return declar;
|
||||
}
|
||||
|
||||
function createRequireStatement(polyfill) {
|
||||
return t.expressionStatement(t.callExpression(t.identifier("require"), [t.stringLiteral(polyfill)]));
|
||||
}
|
||||
|
||||
function isRequire(path) {
|
||||
return t.isExpressionStatement(path.node) && t.isCallExpression(path.node.expression) && t.isIdentifier(path.node.expression.callee) && path.node.expression.callee.name === "require" && path.node.expression.arguments.length === 1 && t.isStringLiteral(path.node.expression.arguments[0]) && isPolyfillSource(path.node.expression.arguments[0].value);
|
||||
}
|
||||
|
||||
function createImport(polyfill, requireType, core) {
|
||||
if (core) {
|
||||
polyfill = "core-js/modules/" + polyfill;
|
||||
}
|
||||
|
||||
if (requireType === "import") {
|
||||
return createImportDeclaration(polyfill);
|
||||
} else {
|
||||
return createRequireStatement(polyfill);
|
||||
}
|
||||
}
|
||||
|
||||
function createImports(polyfills, requireType, regenerator) {
|
||||
var imports = polyfills.filter(function (el, i, arr) {
|
||||
return arr.indexOf(el) === i;
|
||||
}).map(function (polyfill) {
|
||||
return createImport(polyfill, requireType, true);
|
||||
});
|
||||
|
||||
return [].concat(imports, [regenerator && createImport("regenerator-runtime/runtime", requireType)]).filter(Boolean);
|
||||
}
|
||||
|
||||
var isPolyfillImport = {
|
||||
ImportDeclaration: function ImportDeclaration(path, state) {
|
||||
if (path.node.specifiers.length === 0 && isPolyfillSource(path.node.source.value)) {
|
||||
this.numPolyfillImports++;
|
||||
if (this.numPolyfillImports > 1) {
|
||||
path.remove();
|
||||
return;
|
||||
}
|
||||
|
||||
path.replaceWithMultiple(createImports(state.opts.polyfills, "import", state.opts.regenerator));
|
||||
}
|
||||
},
|
||||
Program: function Program(path, state) {
|
||||
var _this = this;
|
||||
|
||||
if (!state.opts.polyfills) {
|
||||
throw path.buildCodeFrameError("\nThere was an issue in \"babel-preset-env\" such that\nthe \"polyfills\" option was not correctly passed\nto the \"transform-polyfill-require\" plugin\n");
|
||||
}
|
||||
path.get("body").forEach(function (bodyPath) {
|
||||
if (isRequire(bodyPath)) {
|
||||
_this.numPolyfillImports++;
|
||||
if (_this.numPolyfillImports > 1) {
|
||||
path.remove();
|
||||
return;
|
||||
}
|
||||
|
||||
bodyPath.replaceWithMultiple(createImports(state.opts.polyfills, "require", state.opts.regenerator));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
name: "transform-polyfill-require",
|
||||
visitor: isPolyfillImport,
|
||||
pre: function pre() {
|
||||
this.numPolyfillImports = 0;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function isPolyfillSource(value) {
|
||||
return value === "babel-polyfill" || value === "core-js";
|
||||
}
|
||||
74
static/js/ketcher2/node_modules/babel-preset-env/lib/utils.js
generated
vendored
Normal file
74
static/js/ketcher2/node_modules/babel-preset-env/lib/utils.js
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.prettifyTargets = exports.prettifyVersion = exports.semverify = exports._extends = undefined;
|
||||
|
||||
var _semver = require("semver");
|
||||
|
||||
var _semver2 = _interopRequireDefault(_semver);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var _extends = exports._extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
|
||||
// Convert version to a semver value.
|
||||
// 2.5 -> 2.5.0; 1 -> 1.0.0;
|
||||
// @flow
|
||||
var semverify = exports.semverify = function semverify(version) {
|
||||
if (typeof version === "string" && _semver2.default.valid(version)) {
|
||||
return version;
|
||||
}
|
||||
|
||||
var split = version.toString().split(".");
|
||||
|
||||
while (split.length < 3) {
|
||||
split.push(0);
|
||||
}
|
||||
|
||||
return split.join(".");
|
||||
};
|
||||
|
||||
var prettifyVersion = exports.prettifyVersion = function prettifyVersion(version) {
|
||||
if (typeof version !== "string") {
|
||||
return version;
|
||||
}
|
||||
|
||||
var parts = [_semver2.default.major(version)];
|
||||
var minor = _semver2.default.minor(version);
|
||||
var patch = _semver2.default.patch(version);
|
||||
|
||||
if (minor || patch) {
|
||||
parts.push(minor);
|
||||
}
|
||||
|
||||
if (patch) {
|
||||
parts.push(patch);
|
||||
}
|
||||
|
||||
return parts.join(".");
|
||||
};
|
||||
|
||||
var prettifyTargets = exports.prettifyTargets = function prettifyTargets() {
|
||||
var targets = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
|
||||
return Object.keys(targets).reduce(function (results, target) {
|
||||
var value = targets[target];
|
||||
|
||||
if (typeof value === "string") {
|
||||
value = prettifyVersion(value);
|
||||
}
|
||||
|
||||
results[target] = value;
|
||||
return results;
|
||||
}, {});
|
||||
};
|
||||
136
static/js/ketcher2/node_modules/babel-preset-env/package.json
generated
vendored
Normal file
136
static/js/ketcher2/node_modules/babel-preset-env/package.json
generated
vendored
Normal file
@ -0,0 +1,136 @@
|
||||
{
|
||||
"_from": "babel-preset-env@1.6.0",
|
||||
"_id": "babel-preset-env@1.6.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-OVgtQRuOZKckrILgMA5rvctvFZPv72Gua9Rt006AiPoB0DJKGN07UmaQA+qRrYgK71MVct8fFhT0EyNWYorVew==",
|
||||
"_location": "/babel-preset-env",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "babel-preset-env@1.6.0",
|
||||
"name": "babel-preset-env",
|
||||
"escapedName": "babel-preset-env",
|
||||
"rawSpec": "1.6.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.6.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.0.tgz",
|
||||
"_shasum": "2de1c782a780a0a5d605d199c957596da43c44e4",
|
||||
"_spec": "babel-preset-env@1.6.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher",
|
||||
"author": {
|
||||
"name": "Henry Zhu",
|
||||
"email": "hi@henryzoo.com"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
[
|
||||
"env",
|
||||
{
|
||||
"loose": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"plugins": [
|
||||
"istanbul"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel-preset-env/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"babel-plugin-check-es2015-constants": "^6.22.0",
|
||||
"babel-plugin-syntax-trailing-function-commas": "^6.22.0",
|
||||
"babel-plugin-transform-async-to-generator": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-block-scoping": "^6.23.0",
|
||||
"babel-plugin-transform-es2015-classes": "^6.23.0",
|
||||
"babel-plugin-transform-es2015-computed-properties": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
|
||||
"babel-plugin-transform-es2015-duplicate-keys": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-for-of": "^6.23.0",
|
||||
"babel-plugin-transform-es2015-function-name": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-literals": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-modules-amd": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-modules-commonjs": "^6.23.0",
|
||||
"babel-plugin-transform-es2015-modules-systemjs": "^6.23.0",
|
||||
"babel-plugin-transform-es2015-modules-umd": "^6.23.0",
|
||||
"babel-plugin-transform-es2015-object-super": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-parameters": "^6.23.0",
|
||||
"babel-plugin-transform-es2015-shorthand-properties": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-spread": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-sticky-regex": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-template-literals": "^6.22.0",
|
||||
"babel-plugin-transform-es2015-typeof-symbol": "^6.23.0",
|
||||
"babel-plugin-transform-es2015-unicode-regex": "^6.22.0",
|
||||
"babel-plugin-transform-exponentiation-operator": "^6.22.0",
|
||||
"babel-plugin-transform-regenerator": "^6.22.0",
|
||||
"browserslist": "^2.1.2",
|
||||
"invariant": "^2.2.2",
|
||||
"semver": "^5.3.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "A Babel preset for each environment.",
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.23.0",
|
||||
"babel-eslint": "^7.1.1",
|
||||
"babel-helper-fixtures": "^6.22.0",
|
||||
"babel-helper-plugin-test-runner": "^6.22.0",
|
||||
"babel-plugin-istanbul": "^3.1.2",
|
||||
"babel-preset-env": "^1.4.0",
|
||||
"babel-register": "^6.23.0",
|
||||
"chai": "^3.5.0",
|
||||
"codecov": "^1.0.1",
|
||||
"compat-table": "github:kangax/compat-table#d88c80ea6dcbc7064112eb46bb020718107892f7",
|
||||
"electron-to-chromium": "^1.3.11",
|
||||
"eslint": "^3.17.1",
|
||||
"eslint-config-babel": "^6.0.0",
|
||||
"eslint-plugin-flowtype": "^2.29.1",
|
||||
"fs-extra": "~2.0.0",
|
||||
"lodash": "^4.17.4",
|
||||
"mocha": "^3.2.0",
|
||||
"nyc": "^10.1.2",
|
||||
"rimraf": "^2.6.1"
|
||||
},
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "babel-preset-env",
|
||||
"nyc": {
|
||||
"all": true,
|
||||
"include": [
|
||||
"src/*.js"
|
||||
],
|
||||
"instrument": false,
|
||||
"sourceMap": false
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/babel/babel-preset-env.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rimraf lib && babel src -d lib",
|
||||
"build-data": "node ./scripts/build-data.js",
|
||||
"changelog": "git log `git describe --tags --abbrev=0`..HEAD --pretty=format:' * %s (%an)' | grep -v 'Merge pull request'",
|
||||
"coverage": "BABEL_ENV=test nyc npm run test",
|
||||
"coverage-ci": "nyc report --reporter=json && codecov -f coverage/coverage-final.json",
|
||||
"dev": "babel -w src -d lib",
|
||||
"fix": "eslint . --fix",
|
||||
"lint": "eslint .",
|
||||
"prepublish": "npm run build",
|
||||
"test": "npm run build && npm run test-only",
|
||||
"test-ci": "nyc npm run test",
|
||||
"test-only": "mocha ./test --compilers js:babel-register -t 10000"
|
||||
},
|
||||
"version": "1.6.0"
|
||||
}
|
||||
Reference in New Issue
Block a user