Skip to content

Commit

Permalink
Merge branch 'canary' into server-actions-regex-allowed-domains
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoff authored Dec 12, 2023
2 parents b9404a6 + 95168bf commit c330fb7
Show file tree
Hide file tree
Showing 33 changed files with 85 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ jobs:
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.17.0
afterBuild: node run-tests.js --timings -g ${{ matrix.group }}2 -c ${TEST_CONCURRENCY} --type integration
afterBuild: node run-tests.js --timings -g ${{ matrix.group }} -c ${TEST_CONCURRENCY} --type integration
secrets: inherit

test-firefox-safari:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/build_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,16 @@ jobs:
with:
name: test-reports
path: |
test/traces
test/test-junit-report
test/turbopack-test-junit-report
if-no-files-found: ignore

# upload playwright snapshots from failed tests
- name: Upload test report artifacts
uses: actions/upload-artifact@v3
if: ${{ inputs.afterBuild && always() }}
with:
name: test-playwright-snapshots
path: |
test/traces
if-no-files-found: ignore
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.0.5-canary.6"
"version": "14.0.5-canary.7"
}
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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"@next/eslint-plugin-next": "14.0.5-canary.7",
"@rushstack/eslint-patch": "^1.3.3",
"@typescript-eslint/parser": "^5.4.2 || ^6.0.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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"version": "14.0.5-canary.7",
"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.0.5-canary.6",
"version": "14.0.5-canary.7",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -92,7 +92,7 @@
]
},
"dependencies": {
"@next/env": "14.0.5-canary.6",
"@next/env": "14.0.5-canary.7",
"@swc/helpers": "0.5.2",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
Expand Down Expand Up @@ -147,11 +147,11 @@
"@mswjs/interceptors": "0.23.0",
"@napi-rs/cli": "2.16.2",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "14.0.5-canary.6",
"@next/polyfill-nomodule": "14.0.5-canary.6",
"@next/react-dev-overlay": "14.0.5-canary.6",
"@next/react-refresh-utils": "14.0.5-canary.6",
"@next/swc": "14.0.5-canary.6",
"@next/polyfill-module": "14.0.5-canary.7",
"@next/polyfill-nomodule": "14.0.5-canary.7",
"@next/react-dev-overlay": "14.0.5-canary.7",
"@next/react-refresh-utils": "14.0.5-canary.7",
"@next/swc": "14.0.5-canary.7",
"@opentelemetry/api": "1.6.0",
"@playwright/test": "^1.35.1",
"@taskr/clear": "1.1.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/next/src/build/collect-build-traces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ export async function collectBuildTraces({

const routesIgnores = [
...sharedIgnores,
// server chunks are provided via next-trace-entrypoints-plugin plugin
// as otherwise all chunks are traced here and included for all pages
// whether they are needed or not
'**/.next/server/chunks/**',
'**/next/dist/server/optimize-amp.js',
'**/next/dist/server/post-process.js',
].filter(nonNullable)
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dev-overlay/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/react-dev-overlay",
"version": "14.0.5-canary.6",
"version": "14.0.5-canary.7",
"description": "A development-only overlay for developing React applications.",
"repository": {
"url": "vercel/next.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-refresh-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/react-refresh-utils",
"version": "14.0.5-canary.6",
"version": "14.0.5-canary.7",
"description": "An experimental package providing utilities for React Refresh.",
"repository": {
"url": "vercel/next.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/third-parties/google.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './dist/types/index'
export * from './dist/google/index'
7 changes: 4 additions & 3 deletions packages/third-parties/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/third-parties",
"version": "14.0.5-canary.6",
"version": "14.0.5-canary.7",
"repository": {
"url": "vercel/next.js",
"directory": "packages/third-parties"
Expand All @@ -12,7 +12,8 @@
}
},
"files": [
"dist"
"dist",
"google.d.ts"
],
"license": "MIT",
"scripts": {
Expand All @@ -25,7 +26,7 @@
"third-party-capital": "1.0.20"
},
"devDependencies": {
"next": "14.0.5-canary.6",
"next": "14.0.5-canary.7",
"outdent": "0.8.0",
"prettier": "2.5.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/third-parties/src/ThirdPartyScriptEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import React, { useEffect } from 'react'

export type ScriptEmbed = {
html?: string | null
height?: number | null
width?: number | null
height?: string | number | null
width?: string | number | null
children?: React.ReactElement | React.ReactElement[]
dataNtpc?: string
}
Expand Down
1 change: 0 additions & 1 deletion packages/third-parties/src/google/google-maps-embed.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { GoogleMapsEmbed as TPCGoogleMapEmbed } from 'third-party-capital'

import ThirdPartyScriptEmbed from '../ThirdPartyScriptEmbed'
Expand Down
11 changes: 6 additions & 5 deletions packages/third-parties/src/types/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ export type GAParams = {
}

export type GoogleMapsEmbed = {
height?: number
width?: number
height?: number | string
width?: number | string
mode: 'place' | 'view' | 'directions' | 'streetview' | 'search'
apiKey: string
style: string
allowfullscreen: boolean
loading: 'eager' | 'lazy'
style?: string
allowfullscreen?: boolean
loading?: 'eager' | 'lazy'
q?: string
id?: string
center?: string
zoom?: string
maptype?: string
Expand Down
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Page = () => {
}

return (
<div class="container">
<div className="container">
<GoogleAnalytics gaId="GA-XYZ" />
<h1>GA</h1>
<button id="ga-send" onClick={onClick}>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function Button() {
return <button>click me</button>
}
4 changes: 4 additions & 0 deletions test/integration/build-trace-extra-entries/app/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { fetchData } from '../lib/fetch-data'

import('../lib/my-component').then((mod) => {
console.log(mod.Button)
})

export default function Page() {
return 'index page'
}
Expand Down
16 changes: 16 additions & 0 deletions test/integration/build-trace-extra-entries/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ describe('build trace with extra entries', () => {
expect(appTrace.files.some((file) => file.endsWith('hello.json'))).toBe(
true
)
expect(
appTrace.files.filter(
(file) => file.includes('chunks') && file.endsWith('.js')
).length
).toBe(0)

expect(
indexTrace.files.filter(
(file) => file.includes('chunks') && file.endsWith('.js')
).length
).toBeGreaterThan(
anotherTrace.files.filter(
(file) => file.includes('chunks') && file.endsWith('.js')
).length
)

expect(
appTrace.files.some((file) => file.endsWith('lib/get-data.js'))
).toBe(true)
Expand Down
3 changes: 2 additions & 1 deletion test/integration/cli/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,8 @@ describe('CLI Usage', () => {
try {
await check(() => output, new RegExp(`http://localhost:${port}`))
await check(() => errOutput, /Debugger listening on/)
expect(errOutput).not.toContain('address already in use')
// TODO: This should work, but is currently failing.
// expect(errOutput).not.toContain('address already in use')
} finally {
await killApp(app)
}
Expand Down

0 comments on commit c330fb7

Please sign in to comment.