Logan Smyth
c6d2f45cab
Resolve babel.config.js 'babelrcRoots' values relative to the config file. ( #8910 )
2018-11-05 08:51:27 -08:00
everdimension
e85faec47d
Fix message when plugin of a wrong type is passed ( #8950 )
2018-10-31 14:34:26 -05:00
Logan Smyth
bd0c62dc0c
Allow users to choose how the configuration root is selected. ( #8660 )
2018-09-15 13:03:46 -07:00
Logan Smyth
dd985c3be3
Verify 'sourceMap' with hasOwnProperty since it can be falsy.
2018-09-03 12:22:22 -07:00
Logan Smyth
2921f6cdb1
Pass missing caller metadata for .babelrc files. ( #8601 )
2018-09-01 15:46:38 -07:00
tsangint
e875fc7bc1
Update url in buildUnknownError tips ( #8544 )
2018-08-26 15:00:32 +02:00
Logan Smyth
8d6ed7e0aa
Expose an api.caller(...) handler for presets to access caller metadata.
2018-08-20 10:27:54 -07:00
Logan Smyth
8f4bae8ea4
Expose optional caller metadata to Babel ignore/only/test/include/exclude functions.
2018-08-20 10:27:54 -07:00
Logan Smyth
2c3c12fdf7
Enforce a limited set of cache key values for plugins/presets for future caching.
2018-08-20 10:12:19 -07:00
Logan Smyth
25d2f59018
Ensure that presets properly flatten their options.
2018-08-20 10:12:19 -07:00
Logan Smyth
3a399d1eb9
Cache individual programmatic descriptors along with the overall list. ( #8494 )
2018-08-20 10:08:21 -07:00
Logan Smyth
c2a2e24965
Take top-level config source into consideration when processing nested env/overrides. ( #8493 )
2018-08-19 21:46:09 -07:00
Logan Smyth
ca639b4262
Preserve 'false'-options for disabled plugins/presets so that callers can use that to toggle behavior. ( #8474 )
2018-08-19 16:22:27 -07:00
Logan Smyth
ffa8e6cbae
Allow babel-plugin/preset to be in package names outside the prefix, when used in a scope. ( #8473 )
2018-08-16 15:13:52 -07:00
wtgtybhertgeghgtwtg
4346a95b88
Perform check on each member of babelrcroots.
2018-07-24 16:57:24 -07:00
Logan Smyth
6d177ba4c5
Remove micromatch and use a simple pattern matching utility.
2018-07-16 09:57:14 -07:00
Logan Smyth
fd9ebf9e1d
Remove option-filtering options from the final options results. ( #8315 )
...
| Q | A <!--(Can use an emoji 👍 ) -->
| ------------------------ | ---
| Fixed Issues? | Fixes https://github.com/babel/babel-loader/issues/642
| Patch: Bug Fix? | Y
| Major: Breaking Change? | N
| Minor: New Feature? |
| Tests Added + Pass? | Yes
| Documentation PR Link | <!-- If only readme change, add `[skip ci]` to your commits -->
| Any Dependency Changes? |
| License | MIT
Since these were getting left in, things that loaded the config, and then passed in back to Babel would get `test` and such _twice_, which could lead to either bad configuration merging, or no configuration at all if the patterns were relative to different directories, as was the case in https://github.com/babel/babel-loader/issues/642 .
2018-07-13 07:01:11 -07:00
dnalborczyk
db1385fb82
upgrades eslint v5 (major), babel-eslint, eslint-plugin-flowtype, eslint-plugin-prettier ( #8259 )
...
* upgrade eslint v5 (major), babel-eslint (minor), eslint-plugin-flowtype (minor), eslint-plugin-prettier (patch)
* fix makefile: remove (default) .js file extension, remove non-existing glob pattern
* fix linting errors
* add '*.js' glob back to include babel.config.js for linting
2018-07-05 09:17:01 -05:00
Logan Smyth
add5f8d0fe
Allow @foo/babel-plugin as an unexpanded plugin name, and @foo as a shorthand for it.
2018-06-18 21:36:02 -07:00
Brian Ng
5895277b32
Bump prettier to v1.13.2
2018-06-03 07:54:39 -05:00
Brian Ng
f699f1bbbf
flow@0.73.0 ( #8032 )
2018-05-25 16:53:23 -05:00
Logan Smyth
53e4d74ebe
Treat all filenames as absolute paths. ( #8044 )
2018-05-24 20:56:19 -07:00
Logan Smyth
6f3093b557
Track the sync and async implementations in the same files.
2018-05-23 21:18:15 -07:00
Logan Smyth
ca1c98b255
Allow .overrides and .env inside presets.
2018-05-21 18:23:07 -07:00
Logan Smyth
69cca412eb
Make the filename option, as exposed to the plugins, consistently relative to the working directory ( #7956 )
...
| Q | A <!--(Can use an emoji 👍 ) -->
| ------------------------ | ---
| Fixed Issues? |
| Patch: Bug Fix? | Y
| Major: Breaking Change? | N
| Minor: New Feature? |
| Tests Added + Pass? | Yes
| Documentation PR | <!-- If so, add `[skip ci]` to your commit message to skip CI -->
| Any Dependency Changes? |
| License | MIT
Currently the `opts.filename` value exposed to plugins is just whatever the user passed. While it _could_ be relative to the working directory, if Babel was passed an absolute URL, it'll be absolute.
This PR explicitly ensures the filename is a relative path based on the working directory. This also exposes an officially endorsed API for reading the working directory path.
2018-05-21 17:10:57 -07:00
Mike Nason
3bee37b14d
fix typo in error message ( #7995 )
2018-05-21 12:18:09 -07:00
Logan Smyth
98f0808a22
Ensure the the config file isn't re-processed when users load a partial config and then pass it back to Babel.
2018-05-11 17:49:12 -07:00
Logan Smyth
bdcfb697a6
Use 'babelrc' and 'babelrcRoots' from config file, if not specified.
2018-05-11 17:49:11 -07:00
Logan Smyth
0341d299c8
Validate different file types with different rules.
2018-05-11 16:51:43 -07:00
Logan Smyth
1a7765712e
Validate the file before loading chain.
2018-05-11 15:29:28 -07:00
Justin Ridgewell
2afe9404fe
Use Object Spread Syntax ( #7777 )
...
* Use Object Spread Syntax
* Nits
2018-04-23 21:44:27 -04:00
Logan Smyth
8606b76438
Split babelrc option into babelrcRoots.
2018-04-22 13:00:28 -07:00
Logan Smyth
a67eb25547
Only search for .babelrc files in the 'root' package by default.
2018-04-20 17:00:53 -07:00
Logan Smyth
485e37fcb0
Support a babel.config.fs file in a 'root' directory.
2018-04-20 17:00:53 -07:00
Logan Smyth
f013dab5fb
Restrict .babelrc resolution to within a given package.
2018-04-20 17:00:53 -07:00
Daniel Tschinder
f0d681a238
Remove obsolete max-len eslint rule and reformat some stuff to fit ( #7602 )
2018-03-20 08:51:47 -05:00
Logan Smyth
017d0e7078
Ensure that the backward-compat logic for plugin-utils copies over the version API properly. ( #7580 )
2018-03-15 11:45:53 -07:00
Daniel Tschinder
1d69cd41ca
Fix import of type ConfigItem ( #7561 )
...
It is also exported as type
2018-03-13 13:31:32 -05:00
Logan Smyth
b5e6536f26
Remove the sourceMapTarget option from core and implement it in babel-cli. ( #7500 )
2018-03-09 14:14:25 -08:00
Logan Smyth
74ab2798e2
Tweaks around PR comments.
2018-03-07 18:02:38 -08:00
Logan Smyth
fef5c7e523
Expose the partial Babel config for people to load and mutate.
2018-03-07 16:33:25 -08:00
Logan Smyth
a4795408b4
Allow plugins to assert that a specific babel version has loaded the plugin. ( #7450 )
2018-03-04 14:36:54 -08:00
Logan Smyth
2c3eb3096f
Expand the '.env()' API call with more flexibility.
2018-02-27 18:48:24 -08:00
Logan Smyth
148e6dfc26
Centralize the plugin/configuration API object.
2018-02-27 18:48:24 -08:00
Logan Smyth
b19b7fd2cf
Fix PR comments.
2018-02-27 17:46:17 -08:00
Logan Smyth
d4a8c7672c
Avoid using lodash during config loading, for require() performance.
2018-02-26 18:44:58 -08:00
Mike S
84de90e572
Better error message for invalid plugin/preset ( #7238 )
...
- Error for invalid plugin/preset now includes file path
2018-02-22 18:30:01 -08:00
Logan Smyth
213805f21e
Avoid duplicating types in index-browser.
2018-02-08 09:19:16 -08:00
Logan Smyth
9a8ba76e1f
Merge .babelrc and .babelignore searching into a single pass.
2018-02-08 00:22:49 -08:00
Logan Smyth
85174b6ce1
Remove unneeded param from buildRootConfig.
2018-02-07 23:23:19 -08:00