Skip to content

Commit

Permalink
Merge branch 'canary' into update-teamname
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Oct 30, 2023
2 parents 774bfe8 + 5eb6607 commit fa760a9
Show file tree
Hide file tree
Showing 22 changed files with 56 additions and 49 deletions.
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.1-canary.5"
"version": "14.0.2-canary.0"
}
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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"@next/eslint-plugin-next": "14.0.2-canary.0",
"@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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"version": "14.0.2-canary.0",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ fn djb2_hash(str: &str) -> u32 {
})
}

// this is here to mirror next.js behaviour.
// this is here to mirror next.js behaviour (`toString(36).slice(0, 6)`)
fn format_radix(mut x: u32, radix: u32) -> String {
let mut result = vec![];

Expand All @@ -273,7 +273,8 @@ fn format_radix(mut x: u32, radix: u32) -> String {
}
}

result.into_iter().rev().collect()
result.reverse();
result[..6].iter().collect()
}

/// If there's special convention like (...) or @ in the page path,
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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"version": "14.0.2-canary.0",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -92,7 +92,7 @@
]
},
"dependencies": {
"@next/env": "14.0.1-canary.5",
"@next/env": "14.0.2-canary.0",
"@swc/helpers": "0.5.2",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
Expand Down Expand Up @@ -146,11 +146,11 @@
"@mswjs/interceptors": "0.23.0",
"@napi-rs/cli": "2.16.2",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "14.0.1-canary.5",
"@next/polyfill-nomodule": "14.0.1-canary.5",
"@next/react-dev-overlay": "14.0.1-canary.5",
"@next/react-refresh-utils": "14.0.1-canary.5",
"@next/swc": "14.0.1-canary.5",
"@next/polyfill-module": "14.0.2-canary.0",
"@next/polyfill-nomodule": "14.0.2-canary.0",
"@next/react-dev-overlay": "14.0.2-canary.0",
"@next/react-refresh-utils": "14.0.2-canary.0",
"@next/swc": "14.0.2-canary.0",
"@opentelemetry/api": "1.4.1",
"@playwright/test": "^1.35.1",
"@taskr/clear": "1.1.0",
Expand Down
10 changes: 8 additions & 2 deletions packages/next/src/shared/lib/hash.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
// http://www.cse.yorku.ca/~oz/hash.html
// More specifically, 32-bit hash via djbxor
// (ref: https://gist.github.com/eplawless/52813b1d8ad9af510d85?permalink_comment_id=3367765#gistcomment-3367765)
// This is due to number type differences between rust for turbopack to js number types,
// where rust does not have easy way to repreesnt js's 53-bit float number type for the matching
// overflow behavior. This is more `correct` in terms of having canonical hash across different runtime / implementation
// as can gaurantee determinstic output from 32bit hash.
export function djb2Hash(str: string) {
let hash = 5381
for (let i = 0; i < str.length; i++) {
const char = str.charCodeAt(i)
hash = (hash << 5) + hash + char
hash = ((hash << 5) + hash + char) & 0xffffffff
}
return Math.abs(hash)
return hash >>> 0
}

export function hexHash(str: string) {
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.1-canary.5",
"version": "14.0.2-canary.0",
"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.1-canary.5",
"version": "14.0.2-canary.0",
"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": "14.0.1-canary.5",
"version": "14.0.2-canary.0",
"repository": {
"url": "vercel/next.js",
"directory": "packages/third-parties"
Expand All @@ -22,7 +22,7 @@
"third-party-capital": "1.0.20"
},
"devDependencies": {
"next": "14.0.1-canary.5",
"next": "14.0.2-canary.0",
"outdent": "0.8.0",
"prettier": "2.5.1"
},
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.

14 changes: 7 additions & 7 deletions test/e2e/app-dir/metadata-dynamic-routes/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const CACHE_HEADERS = {
REVALIDATE: 'public, max-age=0, must-revalidate',
}

const hashRegex = /\?\w+$/
const hashRegex = /\?\w+/

createNextDescribe(
'app dir - metadata dynamic routes',
Expand Down Expand Up @@ -160,12 +160,12 @@ createNextDescribe(
// slug is id param from generateImageMetadata
expect(iconUrls).toMatchObject([
{
href: '/dynamic/big/icon-48jo90/small',
href: '/dynamic/big/icon-ahg52g/small',
sizes: '48x48',
type: 'image/png',
},
{
href: '/dynamic/big/icon-48jo90/medium',
href: '/dynamic/big/icon-ahg52g/medium',
sizes: '72x72',
type: 'image/png',
},
Expand All @@ -183,12 +183,12 @@ createNextDescribe(
// slug is index by default
expect(appleTouchIconUrls).toEqual([
{
href: '/dynamic/big/apple-icon-48jo90/0',
href: '/dynamic/big/apple-icon-ahg52g/0',
sizes: '48x48',
type: 'image/png',
},
{
href: '/dynamic/big/apple-icon-48jo90/1',
href: '/dynamic/big/apple-icon-ahg52g/1',
sizes: '64x64',
type: 'image/png',
},
Expand Down Expand Up @@ -551,8 +551,8 @@ createNextDescribe(
// dynamic
'/gsp/sitemap/[__metadata_id__]/route':
'app/gsp/sitemap/[__metadata_id__]/route.js',
'/(group)/dynamic/[size]/apple-icon-48jo90/[[...__metadata_id__]]/route':
'app/(group)/dynamic/[size]/apple-icon-48jo90/[[...__metadata_id__]]/route.js',
'/(group)/dynamic/[size]/apple-icon-ahg52g/[[...__metadata_id__]]/route':
'app/(group)/dynamic/[size]/apple-icon-ahg52g/[[...__metadata_id__]]/route.js',
})
})

Expand Down
10 changes: 5 additions & 5 deletions test/turbopack-tests-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3314,13 +3314,13 @@
"app dir - metadata dynamic routes social image routes should support generate multi sitemaps with generateSitemaps",
"app dir - metadata dynamic routes text routes should handle robots.[ext] dynamic routes",
"app dir - metadata dynamic routes text routes should handle sitemap.[ext] dynamic routes",
"app dir - metadata dynamic routes text routes should not throw if client components are imported but not used"
"app dir - metadata dynamic routes text routes should not throw if client components are imported but not used",
"app dir - metadata dynamic routes social image routes should fill params into routes groups url of static images",
"app dir - metadata dynamic routes social image routes should support params as argument in dynamic routes",
"app dir - metadata dynamic routes should generate unique path for image routes under group routes"
],
"failed": [
"app dir - metadata dynamic routes should generate unique path for image routes under group routes",
"app dir - metadata dynamic routes social image routes should fill params into routes groups url of static images",
"app dir - metadata dynamic routes social image routes should handle custom fonts in both edge and nodejs runtime",
"app dir - metadata dynamic routes social image routes should support params as argument in dynamic routes"
"app dir - metadata dynamic routes social image routes should handle custom fonts in both edge and nodejs runtime"
],
"pending": [],
"flakey": [],
Expand Down

0 comments on commit fa760a9

Please sign in to comment.