Skip to content

Commit

Permalink
Merge branch 'canary' into rename-vercel-analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswdmr committed Apr 24, 2023
2 parents 86a8ced + e720a1e commit 2f22c64
Show file tree
Hide file tree
Showing 21 changed files with 66 additions and 45 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Expand Up @@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "13.3.2-canary.0"
"version": "13.3.2-canary.1"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "13.3.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"@next/eslint-plugin-next": "13.3.2-canary.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.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"version": "13.3.2-canary.1",
"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
@@ -1,6 +1,6 @@
{
"name": "@next/swc",
"version": "13.3.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"version": "13.3.2-canary.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.2-canary.0",
"@next/env": "13.3.2-canary.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.2-canary.0",
"@next/polyfill-nomodule": "13.3.2-canary.0",
"@next/react-dev-overlay": "13.3.2-canary.0",
"@next/react-refresh-utils": "13.3.2-canary.0",
"@next/swc": "13.3.2-canary.0",
"@next/polyfill-module": "13.3.2-canary.1",
"@next/polyfill-nomodule": "13.3.2-canary.1",
"@next/react-dev-overlay": "13.3.2-canary.1",
"@next/react-refresh-utils": "13.3.2-canary.1",
"@next/swc": "13.3.2-canary.1",
"@opentelemetry/api": "1.4.1",
"@segment/ajv-human-errors": "2.1.2",
"@taskr/clear": "1.1.0",
Expand Down
17 changes: 4 additions & 13 deletions packages/next/src/shared/lib/constants.ts
@@ -1,3 +1,7 @@
import MODERN_BROWSERSLIST_TARGET from './modern-browserslist-target'

export { MODERN_BROWSERSLIST_TARGET }

export type ValueOf<T> = Required<T>[keyof T]

export const COMPILER_NAMES = {
Expand Down Expand Up @@ -47,19 +51,6 @@ export const CLIENT_PUBLIC_FILES_PATH = 'public'
export const CLIENT_STATIC_FILES_PATH = 'static'
export const CLIENT_STATIC_FILES_RUNTIME = 'runtime'
export const STRING_LITERAL_DROP_BUNDLE = '__NEXT_DROP_CLIENT_FILE__'
/**
* These are the browser versions that support all of the following:
* static import: https://caniuse.com/es6-module
* dynamic import: https://caniuse.com/es6-module-dynamic-import
* import.meta: https://caniuse.com/mdn-javascript_operators_import_meta
*/
export const MODERN_BROWSERSLIST_TARGET = [
'chrome 64',
'edge 79',
'firefox 67',
'opera 51',
'safari 12',
]
export const NEXT_BUILTIN_DOCUMENT = '__NEXT_BUILTIN_DOCUMENT__'
export const NEXT_CLIENT_SSR_ENTRY_SUFFIX = '.__sc_client__'

Expand Down
10 changes: 10 additions & 0 deletions packages/next/src/shared/lib/modern-browserslist-target.d.ts
@@ -0,0 +1,10 @@
// Keep in sync with the `.js` file.
declare const MODERN_BROWSERSLIST_TARGET: [
'chrome 64',
'edge 79',
'firefox 67',
'opera 51',
'safari 12'
]

export default MODERN_BROWSERSLIST_TARGET
17 changes: 17 additions & 0 deletions packages/next/src/shared/lib/modern-browserslist-target.js
@@ -0,0 +1,17 @@
// Note: This file is JS because it's used by the taskfile-swc.js file, which is JS.
// Keep file changes in sync with the corresponding `.d.ts` files.
/**
* These are the browser versions that support all of the following:
* static import: https://caniuse.com/es6-module
* dynamic import: https://caniuse.com/es6-module-dynamic-import
* import.meta: https://caniuse.com/mdn-javascript_operators_import_meta
*/
const MODERN_BROWSERSLIST_TARGET = [
'chrome 64',
'edge 79',
'firefox 67',
'opera 51',
'safari 12',
]

module.exports = MODERN_BROWSERSLIST_TARGET
7 changes: 5 additions & 2 deletions packages/next/taskfile-swc.js
@@ -1,6 +1,8 @@
// taskr babel plugin with Babel 7 support
// https://github.com/lukeed/taskr/pull/305

const MODERN_BROWSERSLIST_TARGET = require('./src/shared/lib/modern-browserslist-target')

const path = require('path')

// eslint-disable-next-line import/no-extraneous-dependencies
Expand All @@ -25,17 +27,18 @@ module.exports = function (task) {
if (file.base.endsWith('.d.ts') || file.base.endsWith('.json')) return

const isClient = serverOrClient === 'client'

/** @type {import('@swc/core').Options} */
const swcClientOptions = {
module: {
type: esm ? 'es6' : 'commonjs',
ignoreDynamic: true,
},
env: {
targets: MODERN_BROWSERSLIST_TARGET,
},
jsc: {
loose: true,
externalHelpers: true,
target: 'es2016',
parser: {
syntax: 'typescript',
dynamicImport: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dev-overlay/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/react-dev-overlay",
"version": "13.3.2-canary.0",
"version": "13.3.2-canary.1",
"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
@@ -1,6 +1,6 @@
{
"name": "@next/react-refresh-utils",
"version": "13.3.2-canary.0",
"version": "13.3.2-canary.1",
"description": "An experimental package providing utilities for React Refresh.",
"repository": {
"url": "vercel/next.js",
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

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

0 comments on commit 2f22c64

Please sign in to comment.