Skip to content

Commit

Permalink
Merge branch 'canary' into styfle/next-992-without-previewdata
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Apr 23, 2023
2 parents a6f2e49 + 2e99645 commit 678f8e4
Show file tree
Hide file tree
Showing 78 changed files with 594 additions and 414 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_test_deploy.yml
Expand Up @@ -997,6 +997,7 @@ jobs:
name: wasm-binaries
path: packages/next-swc/crates/wasm

- run: npm i -g npm@9 # need latest version for provenance
- run: npm i -g pnpm@${PNPM_VERSION}
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: ./scripts/publish-native.js
Expand Down
1 change: 1 addition & 0 deletions .npmrc
@@ -1,3 +1,4 @@
provenance=true
save-exact = true
tag-version-prefix=""
strict-peer-dependencies = false
Expand Down
40 changes: 24 additions & 16 deletions .prettierignore
@@ -1,31 +1,39 @@
node_modules
**/.next/**
**/_next/**
**/dist/**
# Build artifacts
.next/
.turbo/
_next/
__tmp__/
dist/
node_modules/
target/
compiled/

lerna.json
test-timings.json
pnpm-lock.yaml

packages/next/src/bundles/webpack/packages/*.runtime.js
packages/next/src/bundles/webpack/packages/lazy-compilation-*.js
packages/next/src/compiled/**
packages/react-refresh-utils/**/*.js
packages/react-refresh-utils/**/*.d.ts
packages/react-dev-overlay/lib/**
**/__tmp__/**
lerna.json

.github/actions/next-stats-action/.work
.github/actions/issue-validator/index.mjs
.github/actions/issue-labeler/lib/index.js
packages/next-swc/crates/next-core/js/src/compiled/**/*

packages/next-swc/crates/**/tests/**/output*
packages/next-swc/target/**/*
packages/next-swc/crates/core/tests/loader/issue-32553/input.js
packages/next-swc/native/**/*
packages/next-codemod/transforms/__testfixtures__/**/*
packages/next-codemod/transforms/__tests__/**/*

packages/next-codemod/transforms/__testfixtures__/**
packages/next-codemod/transforms/__tests__/**
packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts

packages/next-env/**/*.d.ts
test-timings.json

test/**/out/**
test/development/basic/hmr/components/parse-error.js

bench/nested-deps/pages/**/*
bench/nested-deps/components/**/*
pnpm-lock.yaml

**/convex/_generated/**
2 changes: 1 addition & 1 deletion docs/advanced-features/using-mdx.md
Expand Up @@ -191,7 +191,7 @@ import Image from 'next/image'
import { Heading, InlineCode, Pre, Table, Text } from 'my-components'

const ResponsiveImage = (props) => (
<Image alt={props.alt} layout="responsive" {...props} />
<Image alt={props.alt} sizes="100vw" style={ width: '100%', height: 'auto' } {...props} />
)

const components = {
Expand Down
2 changes: 1 addition & 1 deletion errors/non-standard-node-env.md
Expand Up @@ -13,7 +13,7 @@ This may be by accident, so if you're unaware where the value is coming from, ch
The greater React ecosystem treats `NODE_ENV` as a convention, only permitting three (3) values:

- `production`: When your application is built with `next build`
- `development`: When your application is ran with `next dev`
- `development`: When your application is run with `next dev`
- `test`: When your application is being tested (e.g. `jest`)

Setting a non-standard `NODE_ENV` value may cause dependencies to behave unexpectedly, or worse, **break dead code elimination**.
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Expand Up @@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "13.3.1-canary.17"
"version": "13.3.1"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"keywords": [
"react",
"next",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"description": "ESLint configuration used by NextJS.",
"main": "index.js",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
"directory": "packages/eslint-config-next"
},
"dependencies": {
"@next/eslint-plugin-next": "13.3.1-canary.17",
"@next/eslint-plugin-next": "13.3.1",
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.42.0",
"eslint-import-resolver-node": "^0.3.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"description": "ESLint plugin for NextJS.",
"main": "dist/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/font",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
@@ -1,5 +1,7 @@
import 'react'
;('use client')

// prettier-ignore
'use client'

export default function () {
return null
Expand Down
@@ -1,5 +1,4 @@
import 'react';
'use client';
export default function() {
return null;
}
@@ -1,7 +1,7 @@

x NEXT_RSC_ERR_CLIENT_DIRECTIVE_PAREN
,-[input.js:1:1]
1 | import 'react'
2 | ;('use client')
: ^^^^^^^^^^^^^^
x NEXT_RSC_ERR_CLIENT_DIRECTIVE
,-[input.js:3:1]
3 | // prettier-ignore
4 | 'use client'
: ^^^^^^^^^^^^
`----
Expand Up @@ -5,5 +5,7 @@ const foo = async () => {

const bar = async () => {
const x = 1
;('use server')

// prettier-ignore
'use server'
}
Expand Up @@ -5,5 +5,6 @@ export const $$ACTION_1 = async (closure)=>{
var $$ACTION_0;
const bar = async ()=>{
const x = 1;
// prettier-ignore
'use server';
};
@@ -0,0 +1,8 @@

x The "use server" directive must be at the top of the function body.
,-[input.js:9:1]
9 | // prettier-ignore
10 | 'use server'
: ^^^^^^^^^^^^
11 | }
`----
@@ -1,2 +1,4 @@
import 'my-module'
;('use server')

// prettier-ignore
'use server'
@@ -1,2 +1,3 @@
import 'my-module';
// prettier-ignore
'use server';
@@ -1,7 +1,7 @@

x The "use server" directive must be at the top of the file, and cannot be wrapped in parentheses.
,-[input.js:1:1]
1 | import 'my-module'
2 | ;('use server')
: ^^^^^^^^^^^^^^
x The "use server" directive must be at the top of the file.
,-[input.js:3:1]
3 | // prettier-ignore
4 | 'use server'
: ^^^^^^^^^^^^
`----
Expand Up @@ -15,12 +15,16 @@
'use client'

import 'fs'
;('bar')

// prettier-ignore
'bar'

// This is a comment.

1 + 1
;('baz')

// prettier-ignore
'baz'

export default function () {
return null
Expand Down
Expand Up @@ -3,10 +3,12 @@
// This is a comment.
'foo';
import 'fs';
// prettier-ignore
'bar';
// This is a comment.
1 + 1;
// prettier-ignore
'baz';
export default function() {
return null;
return null;
}
Expand Up @@ -13,12 +13,16 @@
'random-directive'

import 'fs'
;('qwerty')

// prettier-ignore
'qwerty'

// This is a comment.

1 + 1
;('sasaya')

// prettier-ignore
'sasaya'

export default function () {
return null
Expand Down
@@ -1,2 +1 @@
;<div>children</div>
;('<>hello</>')
<div>children</div>; '<>hello</>'
4 changes: 1 addition & 3 deletions packages/next-swc/crates/next-build/build.rs
@@ -1,11 +1,9 @@
use turbo_binding::turbo::tasks_build::{generate_register, rerun_if_glob};
use turbo_binding::turbo::tasks_build::generate_register;
use vergen::{vergen, Config};

fn main() {
generate_register();

rerun_if_glob("tests/integration/*/*", "tests/integration");

// Attempt to collect some build time env values but will skip if there are any
// errors.
let _ = vergen(Config::default());
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/swc",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"private": true,
"scripts": {
"clean": "rm -rf ./native/*",
Expand Down
14 changes: 7 additions & 7 deletions packages/next/package.json
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "13.3.1-canary.17",
"version": "13.3.1",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -81,7 +81,7 @@
]
},
"dependencies": {
"@next/env": "13.3.1-canary.17",
"@next/env": "13.3.1",
"@swc/helpers": "0.5.0",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
Expand Down Expand Up @@ -140,11 +140,11 @@
"@jest/types": "29.5.0",
"@napi-rs/cli": "2.14.7",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "13.3.1-canary.17",
"@next/polyfill-nomodule": "13.3.1-canary.17",
"@next/react-dev-overlay": "13.3.1-canary.17",
"@next/react-refresh-utils": "13.3.1-canary.17",
"@next/swc": "13.3.1-canary.17",
"@next/polyfill-module": "13.3.1",
"@next/polyfill-nomodule": "13.3.1",
"@next/react-dev-overlay": "13.3.1",
"@next/react-refresh-utils": "13.3.1",
"@next/swc": "13.3.1",
"@opentelemetry/api": "1.4.1",
"@segment/ajv-human-errors": "2.1.2",
"@taskr/clear": "1.1.0",
Expand Down

0 comments on commit 678f8e4

Please sign in to comment.