Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Make library and react-components presets compile down to ES5 #948

Closed
wants to merge 33 commits into from

Conversation

acconrad
Copy link
Contributor

@acconrad acconrad commented Jun 9, 2018

This solves #781 by using babel-preset-env#forceAllTransforms to compile the library package down to ES5.

#722 is also solved via eb7a6c2

Copy link
Member

@edmorley edmorley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thank you for the PR.

On master we're using Babel 7, which has deprecated the uglify option, It's been replaced by forceAllTransforms: true:
https://new.babeljs.io/docs/en/babel-preset-env#targetsuglify
babel/babel-preset-env#264

Other thoughts:

@acconrad
Copy link
Contributor Author

acconrad commented Jun 9, 2018

Hi @edmorley ! The PR is fixed per your instructions. library and react-component both now feature forceAllTransforms: true to compile down to ES5. Should make it in time for v9 release :)

@eliperelman
Copy link
Member

I believe the way CRA solves this is to use ie9 as the browser to compile to. Any more thoughts here?

externals: opts.externals !== false && {},
style: { extract: { plugin: { filename: '[name].css' } } }
}, opts);

Object.assign(options, {
babel: compileLoader.merge({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The react-components preset inherits from the react preset, which already configures @babel/preset-env. As such I don't think we need to add this here, and instead could just override the targets passed to the react preset.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edmorley so the entire Object.assign portion can be safely ignored?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I believe so. I'd just set default values for options.targets and let those be passed down to the react (and thus web) presets.

Copy link
Contributor Author

@acconrad acconrad Jun 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is entirely true.

So I see that basically every package starts with an empty babel object and builds on it ->

https://github.com/mozilla-neutrino/neutrino-dev/blob/master/packages/react/index.js#L20

https://github.com/mozilla-neutrino/neutrino-dev/blob/master/packages/web/index.js#L85

Also it appears as if web (which is under react, which is under react-components) already builds out the default browser list:

https://github.com/mozilla-neutrino/neutrino-dev/blob/master/packages/web/index.js#L70

So I can see removing some of the params I've already provided, but I still think I need to use this Object.assign pattern to at least include the new ES5 component.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason the other presets start with an empty babel object, is that they need to customise the list of plugins used.

However for this PR, the only thing that needs changing, is the list of browser/node targets, which can be passed down via the standard options, and will cause the existing web preset functionality to use them:
https://github.com/mozilla-neutrino/neutrino-dev/blob/e597c615e2c76e9986b6262249e35001a00efc0f/packages/web/index.js#L94

@eliperelman
Copy link
Member

@acconrad could you rebase this please?

@acconrad
Copy link
Contributor Author

all set @eliperelman !

externals: opts.externals !== false && {},
style: { extract: { plugin: { filename: '[name].css' } } }
}, opts);

Object.assign(options, {
babel: compileLoader.merge({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason the other presets start with an empty babel object, is that they need to customise the list of plugins used.

However for this PR, the only thing that needs changing, is the list of browser/node targets, which can be passed down via the standard options, and will cause the existing web preset functionality to use them:
https://github.com/mozilla-neutrino/neutrino-dev/blob/e597c615e2c76e9986b6262249e35001a00efc0f/packages/web/index.js#L94

@@ -27,6 +27,7 @@ module.exports = (neutrino, opts = {}) => {
presets: [
[require.resolve('@babel/preset-env'), {
debug: neutrino.options.debug,
forceAllTransforms: true,
Copy link
Member

@edmorley edmorley Jul 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want forceAllTransforms for the same reasons as mentioned previously -- a specific browser/node target is probably best.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so what are those targets then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRA uses ie9 to compile for ES5.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do there need to be targets for other browsers? i thought you needed to specify them for each type

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the browser targets, Babel essentially reduces support down to the least common denominator. With ie9 being pretty low, it outputs code to the least common denominator of ES5.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All that to say, by specifying ie9, all the output code is ES5 which all of the other browsers will happily use.

@edmorley edmorley changed the title Library package compiles down to ES5 Make library and react-components presets compile down to ES5 Jul 1, 2018
@acconrad
Copy link
Contributor Author

acconrad commented Jul 10, 2018

@edmorley I think that takes care of adding in the browser support to ie 9, is there anything else that needs modification? I think I added in the options piece for react-components as well

@edmorley
Copy link
Member

Could you also update the README for the two packages?
https://github.com/mozilla-neutrino/neutrino-dev/blame/master/packages/react-components/README.md#L18
https://github.com/mozilla-neutrino/neutrino-dev/blame/master/packages/library/README.md#L11
https://github.com/mozilla-neutrino/neutrino-dev/blame/master/packages/library/README.md#L261

For the change to the react-components README, I think the browser versions reference needs to be moved out of the "Modern Babel compilation ..." line (since it's under the "partially extends" section), and to a new bullet specific to that package.

@acconrad
Copy link
Contributor Author

all set @edmorley - documentation updated

@@ -14,8 +14,9 @@ other Neutrino middleware, so you can build, test, and publish multiple React co
- Support for React Hot Loader
- Write JSX in .js or .jsx files
- Support for importing web workers with `.worker.*` file extensions
- Compiles down to ES5 for all major browsers with support up to IE 9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to say "Compiles to ES5 to support major browsers, publishing to npm, and library interoperability"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all set!

@edmorley
Copy link
Member

@acconrad, there are conflicts with master (I think due to the use of merge rather than rebase, otherwise GitHub would normally be able to handle them) - could you rebase?

acconrad and others added 21 commits July 13, 2018 11:15
* Reduce number of airbnb-base rules that are globally disabled

* Remove redundant lint `include` from .neutrinorc.js

Since `include` is only used by `eslint-loader`, and all linting
for this monorepo occurs via the ESLint CLI, bypassing it.

* Lint repo root .eslintrc.js too (and any other future dotfiles)

This also means the `.eslintignore` entry for `.neutrinorc.js` can
be removed, since ESLint doesn't ignore dotfiles specified via globs.

The `lint` script's glob has to be double quoted and escaped, to
ensure it works correctly on Windows.

* Lint tests too

* Lint the create-projects templates directory too

The `vue` dependency was added to fix:
`Unable to resolve path to module 'vue'  import/no-unresolved`

...but will also have the benefit of meaning we get a Renovate PR
when it's time to update the pinned version of Vue in create-project's
version matrix.

* Lint JSX too

Files with extension `.jsx` are now linted, which gives coverage of
the various JSX create-project template files.

(Doing the same for `.vue` turned out to be much more of a pain, since
it requires a different parser/plugin/rules than the ones used by
the AirBnb preset - so not bothering for now.)

* Use --report-unused-disable-directives
)

Since otherwise warnings are not even printed (such as those that are
emitted by `eslint-loader` when `failOnError` is `false`).
The `tests` directory was already added to the `lint` script command
by create-project, however it was not yet listed in the `include`
for `eslint-loader`.

The testing presets already update `envs` accordingly, to prevent
errors from mocha/jest/... globals.

The redundant `eslint.extensions` option has been removed, since that
was only used by the ESLint Node API, which we no longer use.

Fixes neutrinojs#331.
This significantly improves the performance when using ESLint via its
CLI (ie the `yarn lint` command configured by create-project), and
also via `eslint-loader` (when using `yarn start` or `yarn build`):
https://eslint.org/docs/user-guide/command-line-interface#caching
https://github.com/webpack-contrib/eslint-loader#cache-default-false

Fixes neutrinojs#954.
This Pull Request updates dependency [vue-loader](https://github.com/vuejs/vue-loader) from `^14.2.3` to `^15.0.0`



<details>
<summary>Release Notes</summary>

### [`v15.2.4`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1524httpsgithubcomvuejsvue-loadercomparev1522v1524-2018-06-01)
[Compare Source](vuejs/vue-loader@v15.2.3...v15.2.4)
##### Bug Fixes

* ensure plugin error is emitted only once ([0b006a3](vuejs/vue-loader@0b006a3))
* fix unexpected error when options of cache-loader contains ! ([#&#8203;1334](`https://github.com/vuejs/vue-loader/issues/1334`)) ([c4a2719](vuejs/vue-loader@c4a2719))
* use constant plugin NS ([0fb5172](vuejs/vue-loader@0fb5172)), closes [#&#8203;1331](`https://github.com/vuejs/vue-loader/issues/1331`)
##### Features

* inject issuerPath to resourceQuery for custom block src imports ([#&#8203;1313](`https://github.com/vuejs/vue-loader/issues/1313`)) ([a004e30](vuejs/vue-loader@a004e30))

---

### [`v15.2.3`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1523httpsgithubcomvuejsvue-loadercomparev1522v1523-2018-06-01)
[Compare Source](vuejs/vue-loader@91f420b...v15.2.3)
##### Bug Fixes

* ensure plugin error is emitted only once ([0b006a3](vuejs/vue-loader@0b006a3))
* use constant plugin NS ([0fb5172](vuejs/vue-loader@0fb5172)), closes [#&#8203;1331](`https://github.com/vuejs/vue-loader/issues/1331`)
##### Features

* inject issuerPath to resourceQuery for custom block src imports ([#&#8203;1313](`https://github.com/vuejs/vue-loader/issues/1313`)) ([a004e30](vuejs/vue-loader@a004e30))

---

### [`v15.2.2`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1524httpsgithubcomvuejsvue-loadercomparev1522v1524-2018-06-01)
[Compare Source](vuejs/vue-loader@v15.2.1...91f420b)
##### Bug Fixes

* ensure plugin error is emitted only once ([0b006a3](vuejs/vue-loader@0b006a3))
* fix unexpected error when options of cache-loader contains ! ([#&#8203;1334](`https://github.com/vuejs/vue-loader/issues/1334`)) ([c4a2719](vuejs/vue-loader@c4a2719))
* use constant plugin NS ([0fb5172](vuejs/vue-loader@0fb5172)), closes [#&#8203;1331](`https://github.com/vuejs/vue-loader/issues/1331`)
##### Features

* inject issuerPath to resourceQuery for custom block src imports ([#&#8203;1313](`https://github.com/vuejs/vue-loader/issues/1313`)) ([a004e30](vuejs/vue-loader@a004e30))

---

### [`v15.2.1`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1521httpsgithubcomvuejsvue-loadercomparev1520v1521-2018-05-25)
[Compare Source](vuejs/vue-loader@v15.2.0...v15.2.1)
##### Bug Fixes

* ensure template cache uses unique identifier ([bdb13be](vuejs/vue-loader@bdb13be))

---

### [`v15.2.0`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1520httpsgithubcomvuejsvue-loadercomparev1510v1520-2018-05-22)
[Compare Source](vuejs/vue-loader@v15.1.0...v15.2.0)
##### Features

* enable template compile caching ([28e0fd3](vuejs/vue-loader@28e0fd3))

---

### [`v15.1.0`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1520httpsgithubcomvuejsvue-loadercomparev1510v1520-2018-05-22)
[Compare Source](vuejs/vue-loader@b1ed161...v15.1.0)
##### Features

* enable template compile caching ([28e0fd3](vuejs/vue-loader@28e0fd3))

---

### [`v15.0.12`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1510httpsgithubcomvuejsvue-loadercomparev15012v1510-2018-05-19)
[Compare Source](vuejs/vue-loader@bde7db7...b1ed161)
##### Performance Improvements

* avoid duplicate linting when used with eslint-loader ([3d07f81](vuejs/vue-loader@3d07f81))
#### [15.0.12](vuejs/vue-loader@v15.0.11...v15.0.12) (2018-05-18)
##### Bug Fixes

* ignore attrs that might interfere with query generation ([3a37269](vuejs/vue-loader@3a37269)), closes [vuejs/vue-cli#&#8203;1324](`https://github.com/vuejs/vue-cli/issues/1324`)
#### [15.0.11](vuejs/vue-loader@v15.0.9...v15.0.11) (2018-05-15)
##### Bug Fixes

* improve HMR reliability ([4ccd96f](vuejs/vue-loader@4ccd96f))
#### [15.0.10](vuejs/vue-loader@v15.0.9...v15.0.10) (2018-05-11)
##### Bug Fixes

* improve HMR reliability ([52012cd](vuejs/vue-loader@52012cd))
#### [15.0.9](vuejs/vue-loader@v15.0.8...v15.0.9) (2018-05-04)
##### Bug Fixes

* shadowMode still has to be an option ([4529f83](vuejs/vue-loader@4529f83))
#### [15.0.8](vuejs/vue-loader@v15.0.7...v15.0.8) (2018-05-04)
##### Bug Fixes

* avoid mutating original rules array ([14bfc01](vuejs/vue-loader@14bfc01)), closes [#&#8203;1286](`https://github.com/vuejs/vue-loader/issues/1286`)
#### [15.0.7](vuejs/vue-loader@v15.0.6...v15.0.7) (2018-05-03)
##### Bug Fixes

* stylePostLoader injection for windows flat node_modules ([a9a4412](vuejs/vue-loader@a9a4412)), closes [#&#8203;1284](`https://github.com/vuejs/vue-loader/issues/1284`)
#### [15.0.6](vuejs/vue-loader@v15.0.5...v15.0.6) (2018-05-02)
##### Bug Fixes

* duplicate loaders when using src import with loader options ([37329e1](vuejs/vue-loader@37329e1)), closes [#&#8203;1278](`https://github.com/vuejs/vue-loader/issues/1278`)
#### [15.0.5](vuejs/vue-loader@v15.0.4...v15.0.5) (2018-04-30)
##### Bug Fixes

* ignore VueLoaderPlugin check when using thread-loader ([#&#8203;1268](`https://github.com/vuejs/vue-loader/issues/1268`)) ([476f466](vuejs/vue-loader@476f466)), closes [#&#8203;1267](`https://github.com/vuejs/vue-loader/issues/1267`)
#### [15.0.4](vuejs/vue-loader@v15.0.3...v15.0.4) (2018-04-27)
##### Bug Fixes

* enable whitelist in exclude function ([5b0e392](vuejs/vue-loader@5b0e392))
#### [15.0.3](vuejs/vue-loader@v15.0.2...v15.0.3) (2018-04-26)
##### Bug Fixes

* handle rule.use being a string (ref: [#&#8203;1256](`https://github.com/vuejs/vue-loader/issues/1256`)) ([fc2ba27](vuejs/vue-loader@fc2ba27))
#### [15.0.2](vuejs/vue-loader@v15.0.1...v15.0.2) (2018-04-26)
##### Bug Fixes

* remove resource field in cloned rules (fix [#&#8203;1254](`https://github.com/vuejs/vue-loader/issues/1254`)) ([35ca03f](vuejs/vue-loader@35ca03f))
#### [15.0.1](vuejs/vue-loader@v15.0.0...v15.0.1) (2018-04-25)
##### Bug Fixes

* prioritize .vue rules in plugin (fix [#&#8203;1246](`https://github.com/vuejs/vue-loader/issues/1246`)) ([bffacd5](vuejs/vue-loader@bffacd5))
* warn missing plugin ([068bb81](vuejs/vue-loader@068bb81))

---

### [`v15.0.11`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;15012httpsgithubcomvuejsvue-loadercomparev15011v15012-2018-05-18)
[Compare Source](vuejs/vue-loader@1c54780...bde7db7)
##### Bug Fixes

* ignore attrs that might interfere with query generation ([3a37269](vuejs/vue-loader@3a37269)), closes [vuejs/vue-cli#&#8203;1324](`https://github.com/vuejs/vue-cli/issues/1324`)

---

### [`v15.0.10`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;15010httpsgithubcomvuejsvue-loadercomparev1509v15010-2018-05-11)
[Compare Source](vuejs/vue-loader@af7d5c2...1c54780)
##### Bug Fixes

* improve HMR reliability ([52012cd](vuejs/vue-loader@52012cd))

---

### [`v15.0.9`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;15011httpsgithubcomvuejsvue-loadercomparev1509v15011-2018-05-15)
[Compare Source](vuejs/vue-loader@98a1f19...af7d5c2)
##### Bug Fixes

* improve HMR reliability ([4ccd96f](vuejs/vue-loader@4ccd96f))

---

### [`v15.0.8`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1509httpsgithubcomvuejsvue-loadercomparev1508v1509-2018-05-04)
[Compare Source](vuejs/vue-loader@1d610e6...98a1f19)
##### Bug Fixes

* shadowMode still has to be an option ([4529f83](vuejs/vue-loader@4529f83))

---

### [`v15.0.7`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1508httpsgithubcomvuejsvue-loadercomparev1507v1508-2018-05-04)
[Compare Source](vuejs/vue-loader@653d8f8...1d610e6)
##### Bug Fixes

* avoid mutating original rules array ([14bfc01](vuejs/vue-loader@14bfc01)), closes [#&#8203;1286](`https://github.com/vuejs/vue-loader/issues/1286`)

---

### [`v15.0.6`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1507httpsgithubcomvuejsvue-loadercomparev1506v1507-2018-05-03)
[Compare Source](vuejs/vue-loader@3c02f26...653d8f8)
##### Bug Fixes

* stylePostLoader injection for windows flat node_modules ([a9a4412](vuejs/vue-loader@a9a4412)), closes [#&#8203;1284](`https://github.com/vuejs/vue-loader/issues/1284`)

---

### [`v15.0.5`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1506httpsgithubcomvuejsvue-loadercomparev1505v1506-2018-05-02)
[Compare Source](vuejs/vue-loader@998a573...3c02f26)
##### Bug Fixes

* duplicate loaders when using src import with loader options ([37329e1](vuejs/vue-loader@37329e1)), closes [#&#8203;1278](`https://github.com/vuejs/vue-loader/issues/1278`)

---

### [`v15.0.4`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1505httpsgithubcomvuejsvue-loadercomparev1504v1505-2018-04-30)
[Compare Source](vuejs/vue-loader@36d18e4...998a573)
##### Bug Fixes

* ignore VueLoaderPlugin check when using thread-loader ([#&#8203;1268](`https://github.com/vuejs/vue-loader/issues/1268`)) ([476f466](vuejs/vue-loader@476f466)), closes [#&#8203;1267](`https://github.com/vuejs/vue-loader/issues/1267`)

---

### [`v15.0.3`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1504httpsgithubcomvuejsvue-loadercomparev1503v1504-2018-04-27)
[Compare Source](vuejs/vue-loader@d192945...36d18e4)
##### Bug Fixes

* enable whitelist in exclude function ([5b0e392](vuejs/vue-loader@5b0e392))

---

### [`v15.0.2`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1503httpsgithubcomvuejsvue-loadercomparev1502v1503-2018-04-26)
[Compare Source](vuejs/vue-loader@ee4d8ab...d192945)
##### Bug Fixes

* handle rule.use being a string (ref: [#&#8203;1256](`https://github.com/vuejs/vue-loader/issues/1256`)) ([fc2ba27](vuejs/vue-loader@fc2ba27))

---

### [`v15.0.1`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1510httpsgithubcomvuejsvue-loadercomparev15012v1510-2018-05-19)
[Compare Source](vuejs/vue-loader@v15.0.0...ee4d8ab)
##### Performance Improvements

* avoid duplicate linting when used with eslint-loader ([3d07f81](vuejs/vue-loader@3d07f81))
#### [15.0.12](vuejs/vue-loader@v15.0.11...v15.0.12) (2018-05-18)
##### Bug Fixes

* ignore attrs that might interfere with query generation ([3a37269](vuejs/vue-loader@3a37269)), closes [vuejs/vue-cli#&#8203;1324](`https://github.com/vuejs/vue-cli/issues/1324`)
#### [15.0.11](vuejs/vue-loader@v15.0.9...v15.0.11) (2018-05-15)
##### Bug Fixes

* improve HMR reliability ([4ccd96f](vuejs/vue-loader@4ccd96f))
#### [15.0.10](vuejs/vue-loader@v15.0.9...v15.0.10) (2018-05-11)
##### Bug Fixes

* improve HMR reliability ([52012cd](vuejs/vue-loader@52012cd))
#### [15.0.9](vuejs/vue-loader@v15.0.8...v15.0.9) (2018-05-04)
##### Bug Fixes

* shadowMode still has to be an option ([4529f83](vuejs/vue-loader@4529f83))
#### [15.0.8](vuejs/vue-loader@v15.0.7...v15.0.8) (2018-05-04)
##### Bug Fixes

* avoid mutating original rules array ([14bfc01](vuejs/vue-loader@14bfc01)), closes [#&#8203;1286](`https://github.com/vuejs/vue-loader/issues/1286`)
#### [15.0.7](vuejs/vue-loader@v15.0.6...v15.0.7) (2018-05-03)
##### Bug Fixes

* stylePostLoader injection for windows flat node_modules ([a9a4412](vuejs/vue-loader@a9a4412)), closes [#&#8203;1284](`https://github.com/vuejs/vue-loader/issues/1284`)
#### [15.0.6](vuejs/vue-loader@v15.0.5...v15.0.6) (2018-05-02)
##### Bug Fixes

* duplicate loaders when using src import with loader options ([37329e1](vuejs/vue-loader@37329e1)), closes [#&#8203;1278](`https://github.com/vuejs/vue-loader/issues/1278`)
#### [15.0.5](vuejs/vue-loader@v15.0.4...v15.0.5) (2018-04-30)
##### Bug Fixes

* ignore VueLoaderPlugin check when using thread-loader ([#&#8203;1268](`https://github.com/vuejs/vue-loader/issues/1268`)) ([476f466](vuejs/vue-loader@476f466)), closes [#&#8203;1267](`https://github.com/vuejs/vue-loader/issues/1267`)
#### [15.0.4](vuejs/vue-loader@v15.0.3...v15.0.4) (2018-04-27)
##### Bug Fixes

* enable whitelist in exclude function ([5b0e392](vuejs/vue-loader@5b0e392))
#### [15.0.3](vuejs/vue-loader@v15.0.2...v15.0.3) (2018-04-26)
##### Bug Fixes

* handle rule.use being a string (ref: [#&#8203;1256](`https://github.com/vuejs/vue-loader/issues/1256`)) ([fc2ba27](vuejs/vue-loader@fc2ba27))
#### [15.0.2](vuejs/vue-loader@v15.0.1...v15.0.2) (2018-04-26)
##### Bug Fixes

* remove resource field in cloned rules (fix [#&#8203;1254](`https://github.com/vuejs/vue-loader/issues/1254`)) ([35ca03f](vuejs/vue-loader@35ca03f))
#### [15.0.1](vuejs/vue-loader@v15.0.0...v15.0.1) (2018-04-25)
##### Bug Fixes

* prioritize .vue rules in plugin (fix [#&#8203;1246](`https://github.com/vuejs/vue-loader/issues/1246`)) ([bffacd5](vuejs/vue-loader@bffacd5))
* warn missing plugin ([068bb81](vuejs/vue-loader@068bb81))

---

### [`v15.0.0`](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md#&#8203;1500httpsgithubcomvuejsvue-loadercomparev1500-rc2v1500-2018-04-24)
[Compare Source](vuejs/vue-loader@6430bc0...v15.0.0)
##### Bug Fixes

* compat with null-loader (close [#&#8203;1239](`https://github.com/vuejs/vue-loader/issues/1239`)) ([5cd5f6f](vuejs/vue-loader@5cd5f6f))
##### Features

* support declaring rules using .vue.html (ref [#&#8203;1238](`https://github.com/vuejs/vue-loader/issues/1238`)) ([a3af6b3](vuejs/vue-loader@a3af6b3))

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).
…rinojs#957)

* Clean up imports of package matrix

Imports directly from `matrix.js` instead of via `utils.js`, and
renames `projects` to `presets` to be more accurate, and avoid the
conflation with `this.data.project`.

* Install a matching version of Neutrino packages

Now create-project always installs the same major version of Neutrino
monorepo packages as found in create-project's `package.json`. This
avoids problems where the preset's templates, script entries or
other dependencies have changed in a non-backwards-compatible way
between Neutrino major versions.

* Stop using lerna canary mode for publishing

Since we need the `package.json` version bumps to be left in the
working directory (which doesn't happen with canary mode), so that
`create-project` can read the correct version when determining the
matching monorepo package versions.

This also works around the bug where Verdaccio rejects alphanumeric
prerelease identifiers that start with a number (ie a proportion of
SHAs).

The `--npm-tag latest` is no longer required, since non-canary mode
defaults to `latest`.
…#958)

* Clean up lerna configuration

- Moves `--force-publish` to the config file.
- Removes redundant `packages` option (since `useWorkspaces` set).
- Moves `gitRemote` under the publish command options, since it's
  not used by any other commands.

* Use lerna exact mode when publishing

This makes lerna use exact versions rather than caret ranges when
updating the inter-monorepo package dependency versions, which makes
it possible to install historic versions of monorepo packages without
them using a mixture of old and new minor/patch versions.

See:
https://github.com/lerna/lerna#--exact-1

* Bump version to 9.0.0-0 prerelease

To make it clearer that `master` is for the upcoming Neutrino 9, and
also start using exact versions. The peer dependencies had to be
updated manually, and have to use a pre-release identifier to prevent
yarn warnings spam when using presets with pre-release `neutrino`.
And adjust `HelloWorld` method ordering to fix a new `react/sort-comp`
failure from a `eslint-plugin-react` breaking change in a minor version:

```
packages\create-project\commands\init\templates\react-components\src\components\HelloWorld\index.jsx
  11:3  error  defaultProps should be placed after propTypes  react/sort-comp
```
* Update dependency eslint-config-airbnb to v17

* Bump minimum eslint-plugin-{import,react}

To match airbnb-config's peer dependency, and since it actually
needs features only available on the newer versions.

Fixes:

```
node_modules/eslint-config-airbnb/rules/react.js:
 Configuration for rule "react/jsx-no-target-blank" is invalid:
 Value [{"enforceDynamicLinks":"always"}] should NOT have more than 0 items.
```

* Fix new eslint errors

```
packages/create-project/commands/init/index.js
  40:12  error  Unnecessary 'else' after 'return'  no-else-return

packages/create-project/commands/init/templates/preact/src/App.jsx
  12:13  error  `Welcome to ` must be placed on a new line        react/jsx-one-expression-per-line
  12:24  error  `{this.state.name}` must be placed on a new line  react/jsx-one-expression-per-line
  12:25  error  Must use destructuring state assignment           react/destructuring-assignment

packages/create-project/commands/init/templates/react-components/src/components/HelloWorld/index.jsx
  20:12  error  Must use destructuring props assignment        react/destructuring-assignment
  24:26  error  Must use destructuring props assignment        react/destructuring-assignment
  38:29  error  Must use destructuring state assignment        react/destructuring-assignment
  38:66  error  `Hello World!` must be placed on a new line    react/jsx-one-expression-per-line
  39:9   error  Missing an explicit type attribute for button  react/button-has-type
  39:44  error  `Change color` must be placed on a new line    react/jsx-one-expression-per-line

packages/create-project/commands/init/templates/react/src/App.jsx
  13:13  error  `Welcome to ` must be placed on a new line        react/jsx-one-expression-per-line
  13:24  error  `{this.state.name}` must be placed on a new line  react/jsx-one-expression-per-line
  13:25  error  Must use destructuring state assignment           react/destructuring-assignment
```

The `componentWillReceiveProps` usage was removed since its use is
now discouraged, and the behaviour of not letting new props override
current state seems fine. See:
https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops
…ojs#966)

Follow-up to neutrinojs#957 that fixes the "is a monorepo package" check to
also include the main `neutrino` package, and not just the monorepo
presets themselves.

Before:
`Installing devDependencies: @neutrinojs/react@^9.0.0-0, neutrino, ...`

After:
`Installing devDependencies: @neutrinojs/react@^9.0.0-0, neutrino@^9.0.0-0, ...`
@acconrad
Copy link
Contributor Author

Ugh this rebase got all screwed up, I'm closing this repo and re-opening off of master to make this all cleaner

@acconrad acconrad closed this Jul 13, 2018
@acconrad acconrad deleted the library-to-es5 branch July 13, 2018 15:35
edmorley pushed a commit that referenced this pull request Jul 13, 2018
…994)

To ensure that their output is fully ES5 compatible.

Fixes #722.
Fixes #781.
Supersedes #948.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

4 participants