Commit graph

1268 commits

Author SHA1 Message Date
Tim Neutkens
42c4743fbd
Remove experimental babel flag (#24776) 2021-05-07 19:17:45 +02:00
JJ Kasper
9c47ca2cfd
v10.2.1-canary.2 2021-04-30 13:27:54 -05:00
Houssein Djirdeh
e783b0a2e8
Adds ESLint with default rule-set (#23702)
This PR re-includes ESLint with some notable changes, namely a guided setup similar to how TypeScript is instantiated in a Next.js application.

To add ESLint to a project, developers will have to create an `.eslintrc` file in the root of their project or add an empty `eslintConfig` object to their `package.json` file.

```js
touch .eslintrc
```

Then running `next build` will show instructions to install the required packages needed:

<img width="862" alt="Screen Shot 2021-04-19 at 7 38 27 PM" src="https://user-images.githubusercontent.com/12476932/115316182-dfd51b00-a146-11eb-830c-90bad20ed151.png">

Once installed and `next build` is run again, `.eslintrc` will be automatically configured to include the default config:

```json
{
  "extends": "next"
}
```

In addition to this change:

- The feature is now under the experimental flag and requires opt-in. After testing and feedback, it will be switched to the top-level namespace and turned on by default.
- A new ESLint shareable configuration package is included that can be extended in any application with `{ extends: 'next' }`
  - This default config extends recommended rule sets from [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react), [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks), and [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next)
- All rules in [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next) have been modified to include actionable links that show more information to help resolve each issue
2021-04-30 11:09:07 +00:00
JJ Kasper
49cd08da17
v10.2.1-canary.1 2021-04-29 19:52:43 -05:00
JJ Kasper
f9faf3f96a
v10.2.1-canary.0 2021-04-29 12:55:54 -05:00
JJ Kasper
1e441fe440
Replace regex lexer with minimal regex for named groups (#24604) 2021-04-29 12:50:06 -05:00
JJ Kasper
6b97bcea5b
v10.2.0 2021-04-28 09:32:18 -05:00
JJ Kasper
0abbb75b29
v10.1.4-canary.18 2021-04-28 08:58:39 -05:00
Tim Neutkens
b26077bd25
Upgrade postcss (#24546)
Fixes #24421



## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added

Can't add an integration test currently, we'll add Node 16 tests later.

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-04-28 13:16:41 +00:00
JJ Kasper
0f2bd4f252
v10.1.4-canary.17 2021-04-27 12:02:08 -05:00
Joe Haddad
2743a74b62
v10.1.4-canary.16 2021-04-23 15:23:56 -04:00
JJ Kasper
1e9f45931c
v10.1.4-canary.15 2021-04-22 09:51:04 -05:00
Janicklas Ralph
9edb1ef16d
Adding script loader files to package.json (#24326)
Adding script loader files to package.json
2021-04-22 03:35:38 +00:00
Tim Neutkens
03cc0f89ed v10.1.4-canary.14 2021-04-21 13:59:43 +02:00
Tim Neutkens
755fc6f0da v10.1.4-canary.13 2021-04-21 13:59:04 +02:00
JJ Kasper
bfac04dcbc
v10.1.4-canary.12 2021-04-20 16:06:53 -05:00
JJ Kasper
bfde2833c0
v10.1.4-canary.11 2021-04-19 21:41:09 -05:00
JJ Kasper
0bcc6943ae
v10.1.4-canary.10 2021-04-18 08:59:27 -05:00
JJ Kasper
fe0583edea
v10.1.4-canary.9 2021-04-16 10:09:07 -05:00
JJ Kasper
3fb4e091bc
v10.1.4-canary.8 2021-04-15 09:50:36 -05:00
Joe Haddad
880935842f
fix: upgrade cssnano/postcss version (#24034)
This PR upgrades CSSNano and PostCSS to v8, fixing various longstanding PostCSS bugs in PostCSS@7. This should yield an overall install size win.
2021-04-14 08:44:07 +00:00
JJ Kasper
c3390b8cca
v10.1.4-canary.7 2021-04-13 11:35:21 -05:00
JJ Kasper
4d291bd810
Use regex lexer for gathering named groups from has (#23626)
This is a follow-up to https://github.com/vercel/next.js/pull/23588 to update to use a regex lexer to gather the named regex groups instead of attempting to gather them through executing the regex since it can fail to gather the regex groups when they are using specific matching. This also ensures we don't pass the value as a segment when value is defined and it doesn't use a capture group. Additional tests are added to cover these cases and documentation updated to reflect this. 

Closes: https://github.com/vercel/next.js/issues/23415

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

## Documentation / Examples

- [x] Make sure the linting passes
2021-04-13 12:34:51 +00:00
Tim Neutkens
25ca1b5bab v10.1.4-canary.6 2021-04-12 19:58:36 +02:00
JJ Kasper
1be97547d9
v10.1.4-canary.5 2021-04-12 11:33:08 -05:00
Tim Neutkens
c5c16494e3 v10.1.4-canary.4 2021-04-12 10:34:17 +02:00
Tim Neutkens
911bdacf89 v10.1.4-canary.3 2021-04-08 14:48:18 +02:00
Dale Bustad
c2dfe40296
Babel fast mode (#23760)
@timneutkens it'd be great to get your input.

These changes introduce a new Babel loader that eliminates much of the existing overhead, resulting in better HMR speeds. 
 Multithreading is still in flight, and may be omitted if speed improvements end up being negligible.  For now, the new loader is hidden behind an `experimental` flag.

Items to be completed before this PR is ready to merge:

- [x] reconfigure `ncc` to precompile the parts of `@babel/core` and `@babel/traverse` that we're accessing directly
- [x] change `@babel/core/...` imports to `ncc`ed version
- [x] ~~measure multithreading (not currently pushed) functionality, and include the functionality depending on the results~~ I'll open a separate PR for this
- [x] ensure TypeScript is happy with all imports as final step (`--no-verify` was used to bypass)

There will be two follow-up PRs:
- loader support for projects with custom `.babelrc`
- multithreaded loader (should the change we warranted after measurement)
2021-04-08 12:03:02 +00:00
JJ Kasper
23ad3a7189
v10.1.4-canary.2 2021-04-06 12:26:23 -05:00
JJ Kasper
9986d7c92e
v10.1.4-canary.1 2021-04-05 14:10:54 -05:00
JJ Kasper
bf629f9427
v10.1.4-canary.0 2021-04-05 11:17:37 -05:00
Tim Neutkens
29aa48dfc4 v10.1.3 2021-04-02 12:24:12 +02:00
Tim Neutkens
6e51f2a816 v10.1.3-canary.2 2021-04-02 12:22:15 +02:00
JJ Kasper
95b9839622
v10.1.3-canary.1 2021-04-01 15:15:29 -05:00
Tim Neutkens
ce7f2b8329 v10.1.3-canary.0 2021-03-31 10:27:33 +02:00
Tim Neutkens
1ff6057b3a v10.1.2 2021-03-30 10:32:36 +02:00
Tim Neutkens
1344e2dee2 v10.1.2-canary.0 2021-03-30 10:31:45 +02:00
Joe Haddad
eecc3342cb
Temporarily remove experimental ESLint integration (#23521)
This pull request **temporarily** removes ESLint, as it was not landed in accordance with our standard experimental policies. We are fully committed to landing this change again.

This is being reverted because:

- Next.js has very strict goals for its install size. This feature resulted in adding over 17MB, or a 43.6% increase.
- The feature was not first landed under the `experimental` key in `next.config.js`, rather, it was added under the stable namespace (top-level)
- Using the feature doesn't do a "guided setup" like TypeScript, it should ask you to "bring your own" dependencies for ESLint
- It uses a undesirable ESLint plugin name: `plugin:@next/next/recommended`. This should read out as strictly `next`, or as short as we can get it.
- Does not provide actionable warnings (missing link to resolve issue)
- Does not follow appropriate console output styling. We need to revisit how these are presented.

To re-land this, we need to ensure the following minimums are met:
- Very minor change in install size
- Fully experimental (i.e. flagged) with warnings
- Finalized package name and configuration shape, preferably so we can do ` { extends: 'next' } `.
2021-03-30 08:26:35 +00:00
Tim Neutkens
cd46241349 v10.1.1 2021-03-29 18:02:58 +02:00
Tim Neutkens
b73816b2b4 v10.1.1-canary.0 2021-03-29 18:00:50 +02:00
Tim Neutkens
fc286d6e19 v10.1.0 2021-03-29 16:56:57 +02:00
Tim Neutkens
378ba1d2eb v10.0.10-canary.14 2021-03-29 16:54:12 +02:00
Tim Neutkens
d40a804dd3 v10.0.10-canary.13 2021-03-29 14:01:21 +02:00
Tim Neutkens
cd9bb986eb
Add os-browserify dep (#23354)
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-29 10:25:27 +02:00
JJ Kasper
f28ea89aa7
v10.0.10-canary.12 2021-03-26 11:02:54 -05:00
JJ Kasper
9f5b61d091
v10.0.10-canary.11 2021-03-24 15:51:14 -05:00
JJ Kasper
1dae228877
v10.0.10-canary.10 2021-03-24 12:05:28 -05:00
Tim Neutkens
34f98451bd v10.0.10-canary.9 2021-03-24 14:12:21 +01:00
Joe Haddad
437c35f121
feat: automatically enable webpack 5 (#22323)
Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-03-24 14:10:10 +01:00
JJ Kasper
a16f7a3829
v10.0.10-canary.8 2021-03-23 16:35:15 -05:00