Skip to content

[pull] canary from vercel:canary #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "15.4.0-canary.28"
"version": "15.4.0-canary.29"
}
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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"description": "ESLint configuration used by Next.js.",
"main": "index.js",
"license": "MIT",
Expand All @@ -10,7 +10,7 @@
},
"homepage": "https://nextjs.org/docs/app/api-reference/config/eslint",
"dependencies": {
"@next/eslint-plugin-next": "15.4.0-canary.28",
"@next/eslint-plugin-next": "15.4.0-canary.29",
"@rushstack/eslint-patch": "^1.10.3",
"@typescript-eslint/eslint-plugin": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0",
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0",
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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"description": "ESLint plugin for Next.js.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@next/font",
"private": true,
"version": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"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-rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-rspack",
"version": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-rspack"
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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"private": true,
"files": [
"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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -100,7 +100,7 @@
]
},
"dependencies": {
"@next/env": "15.4.0-canary.28",
"@next/env": "15.4.0-canary.29",
"@swc/helpers": "0.5.15",
"caniuse-lite": "^1.0.30001579",
"postcss": "8.4.31",
Expand Down Expand Up @@ -162,11 +162,11 @@
"@jest/types": "29.5.0",
"@mswjs/interceptors": "0.23.0",
"@napi-rs/triples": "1.2.0",
"@next/font": "15.4.0-canary.28",
"@next/polyfill-module": "15.4.0-canary.28",
"@next/polyfill-nomodule": "15.4.0-canary.28",
"@next/react-refresh-utils": "15.4.0-canary.28",
"@next/swc": "15.4.0-canary.28",
"@next/font": "15.4.0-canary.29",
"@next/polyfill-module": "15.4.0-canary.29",
"@next/polyfill-nomodule": "15.4.0-canary.29",
"@next/react-refresh-utils": "15.4.0-canary.29",
"@next/swc": "15.4.0-canary.29",
"@opentelemetry/api": "1.6.0",
"@playwright/test": "1.41.2",
"@storybook/addon-a11y": "8.6.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ export class MinifyPlugin {
global_defs: {
'process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE': false,
},
keep_classnames: this.options.noMangling,
keep_fnames: this.options.noMangling,
},
mangle,
module: 'unknown',
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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"description": "An experimental package providing utilities for React Refresh.",
"repository": {
"url": "vercel/next.js",
Expand Down
4 changes: 2 additions & 2 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": "15.4.0-canary.28",
"version": "15.4.0-canary.29",
"repository": {
"url": "vercel/next.js",
"directory": "packages/third-parties"
Expand All @@ -26,7 +26,7 @@
"third-party-capital": "1.0.20"
},
"devDependencies": {
"next": "15.4.0-canary.28",
"next": "15.4.0-canary.29",
"outdent": "0.8.0",
"prettier": "2.5.1",
"typescript": "5.8.2"
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.

6 changes: 6 additions & 0 deletions test/production/app-dir/no-mangling/app/use-cache/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'use cache'

export default async function CachedPage() {
throw new Error('Kaputt!')
return <p>hello world</p>
}
7 changes: 6 additions & 1 deletion test/production/app-dir/no-mangling/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {}
const nextConfig = {
experimental: {
useCache: true,
prerenderEarlyExit: false,
},
}

module.exports = nextConfig
16 changes: 16 additions & 0 deletions test/production/app-dir/no-mangling/no-mangling.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,21 @@ Error: Kaputt!
Error: Kaputt!
at Page`)
})

describe('with "use cache" functions', () => {
it('should show original function names in stack traces', async () => {
try {
await next.build()
} catch {
// we expect the build to fail
}

// `CachedPage` is the original function name that would be mangled if
// `next build` was called without `--no-mangling`.
expect(next.cliOutput).toInclude(`
Error: Kaputt!
at CachedPage`)
})
})
})
})
Loading
Loading