Skip to content

Commit

Permalink
Merge branch 'canary' into streaming-path-rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Feb 18, 2022
2 parents eacbc76 + 97b964a commit 462d867
Show file tree
Hide file tree
Showing 93 changed files with 1,006 additions and 1,062 deletions.
616 changes: 151 additions & 465 deletions .github/workflows/build_test_deploy.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/workflows/lock.yml
Expand Up @@ -20,8 +20,8 @@ jobs:
steps:
- uses: dessant/lock-threads@v3
with:
github-token: ${{ secrets.LOCK_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-inactive-days: 30
issue-comment: 'This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.'
issue-comment: 'This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.'
pr-inactive-days: 30
log-output: true
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
repo-token: ${{ secrets.STALE_TOKEN }}
only-labels: 'please add a complete reproduction'
close-issue-message: 'This issue has been automatically closed after 30 days of inactivity with no reproduction. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.'
close-issue-message: 'This issue has been automatically closed because it received no activity for a month and had no reproduction to investigate. If you think this was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.'
days-before-issue-close: 1
days-before-issue-stale: 30
days-before-pr-close: -1
Expand Down
5 changes: 5 additions & 0 deletions examples/custom-server-hapi/next-env.d.ts
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
26 changes: 0 additions & 26 deletions examples/custom-server-hapi/next-wrapper.js

This file was deleted.

5 changes: 5 additions & 0 deletions examples/custom-server-hapi/nodemon.json
@@ -0,0 +1,5 @@
{
"watch": ["server"],
"exec": "ts-node --project tsconfig.server.json server/server.ts",
"ext": "js ts"
}
19 changes: 14 additions & 5 deletions examples/custom-server-hapi/package.json
@@ -1,15 +1,24 @@
{
"private": true,
"scripts": {
"dev": "node server.js",
"build": "next build",
"start": "cross-env NODE_ENV=production node server.js"
"dev": "nodemon",
"build": "next build && tsc --project tsconfig.server.json",
"start": "cross-env NODE_ENV=production node dist/server.js"
},
"dependencies": {
"@hapi/hapi": "^18.3.1",
"cross-env": "^5.2.0",
"@hapi/hapi": "^20.2.1",
"cross-env": "^7.0.3",
"next": "latest",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@types/hapi__hapi": "^20.0.10",
"@types/node": "^16.11.25",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"nodemon": "^2.0.15",
"ts-node": "^10.5.0",
"typescript": "^4.5.5"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions examples/custom-server-hapi/server/next-wrapper.ts
@@ -0,0 +1,16 @@
import type { NextServer } from 'next/dist/server/next'
import type { Lifecycle } from '@hapi/hapi'
import type { NextUrlWithParsedQuery } from 'next/dist/server/request-meta'

const nextHandlerWrapper = (app: NextServer): Lifecycle.Method => {
const handler = app.getRequestHandler()

return async ({ raw, url, query }, h) => {
const nextUrl = url as unknown as NextUrlWithParsedQuery
nextUrl.query = query
await handler(raw.req, raw.res, nextUrl)
return h.close
}
}

export { nextHandlerWrapper }
@@ -1,6 +1,6 @@
const next = require('next')
const Hapi = require('@hapi/hapi')
const { /* pathWrapper, */ nextHandlerWrapper } = require('./next-wrapper')
import next from 'next'
import Hapi from '@hapi/hapi'
import { nextHandlerWrapper } from './next-wrapper'

const port = parseInt(process.env.PORT, 10) || 3000
const dev = process.env.NODE_ENV !== 'production'
Expand Down
21 changes: 21 additions & 0 deletions examples/custom-server-hapi/tsconfig.json
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"baseUrl": ".",
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
12 changes: 12 additions & 0 deletions examples/custom-server-hapi/tsconfig.server.json
@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "dist",
"lib": ["es2019"],
"target": "es2019",
"isolatedModules": false,
"noEmit": false
},
"include": ["server/**/*.ts"]
}
2 changes: 1 addition & 1 deletion lerna.json
Expand Up @@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "12.1.0"
"version": "12.1.1-canary.0"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "12.1.0",
"version": "12.1.1-canary.0",
"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": "12.1.0",
"version": "12.1.1-canary.0",
"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": "12.1.0",
"@next/eslint-plugin-next": "12.1.1-canary.0",
"@rushstack/eslint-patch": "^1.0.8",
"@typescript-eslint/parser": "^5.0.0",
"eslint-import-resolver-node": "^0.3.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "12.1.0",
"version": "12.1.1-canary.0",
"description": "ESLint plugin for NextJS.",
"main": "lib/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "12.1.0",
"version": "12.1.1-canary.0",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "12.1.0",
"version": "12.1.1-canary.0",
"license": "MIT",
"dependencies": {
"chalk": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "12.1.0",
"version": "12.1.1-canary.0",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "12.1.0",
"version": "12.1.1-canary.0",
"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": "12.1.0",
"version": "12.1.1-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
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "12.1.0",
"version": "12.1.1-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
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "12.1.0",
"version": "12.1.1-canary.0",
"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/.cargo/config.toml
Expand Up @@ -21,7 +21,7 @@ rustflags = [
]

[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-gnu-gcc"
linker = "aarch64-linux-musl-gcc"
rustflags = [
"-C",
"target-feature=-crt-static",
Expand Down

0 comments on commit 462d867

Please sign in to comment.