* Make dir for babel --out-file
Currently there's unexpected regression after upgrade from babel 6.
On creating file with any depth like dist/index.js the error about
not existing directory is thrown.
In this diff I modified babel-cli to create deep directory for out-file
command.
I also replaced `mkdirp` with more supported `make-dir` package which
also have official promise support.
* Fix test
* fix: [#10561] _interopRequireWildcard should cache object only
* fix: narrow down cache restriction to object/function type
* test: add interop require null module case
* docs: add homepage link
Adds a homepage link to populate npmjs.com.
Update the repository property syntax.
* Update the repository link
Point to the root repo plus a reference to the subdirectory.
* style: drop HTML extension
* Exclude catch clause from let identifier error
* Disallow let binding based on parameter
* Add test
* Remove unused getter
* Update packages/babel-parser/src/parser/statement.js
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
* fix: disable caching when babel could not read/write cache
* emit warning when cache folder resides in readonly fs
* fix: always register save handler
* cache: maintain old behaviour
* test: add more test case
* fix: next tick tasks are FIFO
* test: disable test on Windows
* Inject corejs3 imports in Program:exit instead of post
This allows them to be requeued and transformed by other plugins.
* Also entry
* Rebase
* Update packages/babel-preset-env/src/polyfills/corejs3/entry-plugin.js [skip ci]
Co-Authored-By: Brian Ng <bng412@gmail.com>
For some reason, it looks like that the rimraf call didn't properly delete
the folder:
EEXIST: file already exists, mkdir 'C:\Users\travis\build\babel\babel\packages\babel-node\test\tmp'
150 | process.chdir(__dirname);
151 | if (fs.existsSync(tmpLoc)) rimraf.sync(tmpLoc);
> 152 | fs.mkdirSync(tmpLoc);
| ^
153 | process.chdir(tmpLoc);
154 | };
Lets try to reuse the existing folder rather than deleting and recreating it
* Allow duplicate __proto__ keys in patterns, simple case (#6705)
* Update test262 whitelist
* Rename checkDuplicatedProto's parameter and adjust type
* Store first __proto__ redefinition's position
* Don't use args rest/spread to hoist super method calls
* Hoist this in hoisted super method calls
* Make the code more readable
Review by edoardocavazza
* fix: should not remove let binding even it is wrapped in closure
Fixes#10339
* fix: remove bindings defined in blockScope when wrapped in closure
* Move test assertions to the top level to ensure that they run
This adds lots of missing declarations to the types of @babel/types,
including many utility functions useful to plugin authors.
With the typescript types, I tried to make them as useful as possible
for control flow analysis / inference, but Flow doesn't seem to
support overloads and I'm not as familiar with it anyway so it has
simpler types.
When users see errors like
```
Duplicate plugin/preset detected.
If you'd like to use two separate instances of a plugin,
they need separate names, e.g.
plugins: [
['some-plugin', {}],
['some-plugin', {}, 'some unique name'],
]
```
It can be difficult to determine the source of the conflict, especially
in a larger build system.
This commit outputs what is known about the plugins that actually
conflict, which can be helpful for users to determine the root cause of
the conflict.
Partially addresses #9778
* fix: typo
* declare name for flow interface
* add test case for export overload function, typescript
* test: add test
Fixes#10044
* test: update test
* test(flow): add multiple declarations regression test
* re-enable flow test case
# Conflicts:
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/def-site-variance/input.js
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-declare-statements/input.js
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-interfaces-module-and-script/input.js
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-iterator/input.js
* test: disable two flow dupl-decl test
* fix: do not declare name for declare function until we figure out a better way
* test: duplicate declare function and function would not throw
* Add windows to travis
* Update
* Do not use sh file on windows
* Fix whitespace
* Unify command
* ./ doesn't work on windows
* Remove all ./ usages
* Run windows test before others
* fix: normalize filename when generating sources
sources should be URL.
* fix: replace normalized path to cwd
* chore: add nodePlatform task options
* fix: normalize preset-env filename output
* chore: replace normalized path to CWD on win32 platform
* limit transform-react-source to run on linux and darwin
* test: escapeRegExp on testcases
* test: add test for babel --filename on windows
* test: double babel-node/cli test timeout
* chore: workaround windows build does not stop
* chore: remove redundant condition
* refactor: rename `nodePlatform` to `os`