Skip to content

Commit

Permalink
Merge branch 'canary' into experimental-node-streams-support
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan-Arrowood committed Apr 24, 2024
2 parents ab7a8aa + e078fd1 commit 1d78635
Show file tree
Hide file tree
Showing 43 changed files with 445 additions and 146 deletions.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ packages/next-env/**/*.d.ts
test/**/out/**
test/development/basic/hmr/components/parse-error.js

# TODO: upgrade prettier to 3.1.1 to support import attributes
test/integration/import-attributes/**/*

bench/nested-deps/pages/**/*
bench/nested-deps/components/**/*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Next.js includes a [short list of popular packages](https://github.com/vercel/ne
- `eslint`
- `express`
- `firebase-admin`
- `isolated-vm`
- `jest`
- `jsdom`
- `libsql`
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "14.3.0-canary.19"
"version": "14.3.0-canary.21"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"keywords": [
"react",
"next",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"description": "ESLint configuration used by Next.js.",
"main": "index.js",
"license": "MIT",
Expand All @@ -10,7 +10,7 @@
},
"homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config",
"dependencies": {
"@next/eslint-plugin-next": "14.3.0-canary.19",
"@next/eslint-plugin-next": "14.3.0-canary.21",
"@rushstack/eslint-patch": "^1.3.3",
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0",
"eslint-import-resolver-node": "^0.3.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"description": "ESLint plugin for Next.js.",
"main": "dist/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/font",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/swc",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"private": true,
"scripts": {
"clean": "node ../../scripts/rm.mjs native",
Expand Down
14 changes: 7 additions & 7 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "14.3.0-canary.19",
"version": "14.3.0-canary.21",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -93,7 +93,7 @@
]
},
"dependencies": {
"@next/env": "14.3.0-canary.19",
"@next/env": "14.3.0-canary.21",
"@swc/helpers": "0.5.10",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001579",
Expand Down Expand Up @@ -131,7 +131,7 @@
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
"@babel/plugin-syntax-bigint": "7.8.3",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-syntax-import-assertions": "7.22.5",
"@babel/plugin-syntax-import-attributes": "7.22.5",
"@babel/plugin-syntax-jsx": "7.22.5",
"@babel/plugin-transform-modules-commonjs": "7.22.5",
"@babel/plugin-transform-runtime": "7.22.5",
Expand All @@ -150,10 +150,10 @@
"@jest/types": "29.5.0",
"@mswjs/interceptors": "0.23.0",
"@napi-rs/triples": "1.2.0",
"@next/polyfill-module": "14.3.0-canary.19",
"@next/polyfill-nomodule": "14.3.0-canary.19",
"@next/react-refresh-utils": "14.3.0-canary.19",
"@next/swc": "14.3.0-canary.19",
"@next/polyfill-module": "14.3.0-canary.21",
"@next/polyfill-nomodule": "14.3.0-canary.21",
"@next/react-refresh-utils": "14.3.0-canary.21",
"@next/swc": "14.3.0-canary.21",
"@opentelemetry/api": "1.6.0",
"@playwright/test": "1.41.2",
"@taskr/clear": "1.1.0",
Expand Down
7 changes: 6 additions & 1 deletion packages/next/src/build/babel/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@ export default (
},
],
require('next/dist/compiled/babel/plugin-syntax-dynamic-import'),
require('next/dist/compiled/babel/plugin-syntax-import-assertions'),
[
require('next/dist/compiled/babel/plugin-syntax-import-attributes'),
{
deprecatedAssertSyntax: true,
},
],
require('./plugins/react-loadable-plugin'),
[
require('next/dist/compiled/babel/plugin-proposal-class-properties'),
Expand Down
6 changes: 3 additions & 3 deletions packages/next/src/bundles/babel/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ function pluginSyntaxDynamicImport() {
return require('next/dist/compiled/babel-packages').pluginSyntaxDynamicImport()
}

function pluginSyntaxImportAssertions() {
return require('next/dist/compiled/babel-packages').pluginSyntaxImportAssertions()
function pluginSyntaxImportAttributes() {
return require('next/dist/compiled/babel-packages').pluginSyntaxImportAttributes()
}

function pluginSyntaxJsx() {
Expand Down Expand Up @@ -127,7 +127,7 @@ module.exports = {
pluginProposalObjectRestSpread,
pluginSyntaxBigint,
pluginSyntaxDynamicImport,
pluginSyntaxImportAssertions,
pluginSyntaxImportAttributes,
pluginSyntaxJsx,
pluginTransformDefine,
pluginTransformModulesCommonjs,
Expand Down
6 changes: 3 additions & 3 deletions packages/next/src/bundles/babel/packages-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ function pluginSyntaxDynamicImport() {
return require('@babel/plugin-syntax-dynamic-import')
}

function pluginSyntaxImportAssertions() {
return require('@babel/plugin-syntax-import-assertions')
function pluginSyntaxImportAttributes() {
return require('@babel/plugin-syntax-import-attributes')
}

function pluginSyntaxJsx() {
Expand Down Expand Up @@ -72,7 +72,7 @@ module.exports = {
pluginProposalObjectRestSpread,
pluginSyntaxBigint,
pluginSyntaxDynamicImport,
pluginSyntaxImportAssertions,
pluginSyntaxImportAttributes,
pluginSyntaxJsx,
pluginTransformDefine,
pluginTransformModulesCommonjs,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./bundle').pluginSyntaxImportAttributes()
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,7 @@ export function getOrCreatePrefetchCacheEntry({
buildId,
nextUrl,
prefetchCache,
kind:
kind ||
// in dev, there's never gonna be a prefetch entry so we want to prefetch here
(process.env.NODE_ENV === 'development'
? PrefetchKind.AUTO
: PrefetchKind.TEMPORARY),
kind: kind || PrefetchKind.TEMPORARY,
})
}

Expand Down

0 comments on commit 1d78635

Please sign in to comment.