language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | vercel | next.js | 409d37615ba1941b2d6e7ab429fde6ef5529d549.json | Enable css import in rsc server side (#38418)
* Enable css in server components
* inject server css into flight
* refactor and fix test
* fix lint
* resolve css from module deps
* fix dev & prod inconsistentce, collect client css
* simplify
* dedupe duplicated css chunks
* remove ssr link inje... | packages/next/server/app-render.tsx | @@ -16,6 +16,7 @@ import {
renderToInitialStream,
createBufferedTransformStream,
continueFromInitialStream,
+ createSuffixStream,
} from './node-web-streams-helper'
import { isDynamicRoute } from '../shared/lib/router/utils'
import { tryGetPreviewData } from './api-utils/node'
@@ -124,7 +125,6 @@ function ... | true |
Other | vercel | next.js | 409d37615ba1941b2d6e7ab429fde6ef5529d549.json | Enable css import in rsc server side (#38418)
* Enable css in server components
* inject server css into flight
* refactor and fix test
* fix lint
* resolve css from module deps
* fix dev & prod inconsistentce, collect client css
* simplify
* dedupe duplicated css chunks
* remove ssr link inje... | packages/next/server/load-components.ts | @@ -125,12 +125,13 @@ export async function loadComponents(
if (hasServerComponents) {
try {
// Make sure to also load the client entry in cache.
- await requirePage(
+ const __client__ = await requirePage(
normalizePagePath(pathname) + NEXT_CLIENT_SSR_ENTRY_SUFFIX,
distDir,
... | true |
Other | vercel | next.js | 409d37615ba1941b2d6e7ab429fde6ef5529d549.json | Enable css import in rsc server side (#38418)
* Enable css in server components
* inject server css into flight
* refactor and fix test
* fix lint
* resolve css from module deps
* fix dev & prod inconsistentce, collect client css
* simplify
* dedupe duplicated css chunks
* remove ssr link inje... | test/e2e/app-dir/app/app/dashboard/global.css | @@ -0,0 +1,3 @@
+.dangerous-text {
+ color: red;
+} | true |
Other | vercel | next.js | 409d37615ba1941b2d6e7ab429fde6ef5529d549.json | Enable css import in rsc server side (#38418)
* Enable css in server components
* inject server css into flight
* refactor and fix test
* fix lint
* resolve css from module deps
* fix dev & prod inconsistentce, collect client css
* simplify
* dedupe duplicated css chunks
* remove ssr link inje... | test/e2e/app-dir/app/app/dashboard/layout.server.js | @@ -1,8 +1,11 @@
+import './style.css'
+import './global.css'
+
export default function DashboardLayout(props) {
return (
- <>
- <h1>Dashboard</h1>
+ <div className="dangerous-text">
+ <h1 className="green">Dashboard</h1>
{props.children}
- </>
+ </div>
)
} | true |
Other | vercel | next.js | 409d37615ba1941b2d6e7ab429fde6ef5529d549.json | Enable css import in rsc server side (#38418)
* Enable css in server components
* inject server css into flight
* refactor and fix test
* fix lint
* resolve css from module deps
* fix dev & prod inconsistentce, collect client css
* simplify
* dedupe duplicated css chunks
* remove ssr link inje... | test/e2e/app-dir/app/app/dashboard/page.server.js | @@ -1,7 +1,8 @@
export default function DashboardPage(props) {
return (
<>
- <p>hello from app/dashboard</p>
+ <p className="p">hello from app/dashboard</p>
+ <p className="green">this is green</p>
</>
)
} | true |
Other | vercel | next.js | 409d37615ba1941b2d6e7ab429fde6ef5529d549.json | Enable css import in rsc server side (#38418)
* Enable css in server components
* inject server css into flight
* refactor and fix test
* fix lint
* resolve css from module deps
* fix dev & prod inconsistentce, collect client css
* simplify
* dedupe duplicated css chunks
* remove ssr link inje... | test/e2e/app-dir/app/app/dashboard/style.css | @@ -0,0 +1,3 @@
+.green {
+ color: green;
+} | true |
Other | vercel | next.js | 409d37615ba1941b2d6e7ab429fde6ef5529d549.json | Enable css import in rsc server side (#38418)
* Enable css in server components
* inject server css into flight
* refactor and fix test
* fix lint
* resolve css from module deps
* fix dev & prod inconsistentce, collect client css
* simplify
* dedupe duplicated css chunks
* remove ssr link inje... | test/e2e/app-dir/index.test.ts | @@ -393,6 +393,24 @@ describe('app dir', () => {
})
describe('css support', () => {
+ it('should support global css inside server component layouts', async () => {
+ const browser = await webdriver(next.url, '/dashboard')
+
+ // Should body text in red
+ expect(
+ await browser.eval(
+ ... | true |
Other | vercel | next.js | 9036924c71245dc2906340b6de1a9f489392e434.json | Fix rsc test during deploy testing (#38517) | test/e2e/app-dir/rsc-basic.test.ts | @@ -51,6 +51,7 @@ describe('app dir - react server components', () => {
const { isNextDeploy, isNextDev } = global as any
if (isNextDeploy) {
+ it('should skip tests for next-deploy', () => {})
return
}
| false |
Other | vercel | next.js | d2eb7861c3f61d45d9555132deed355deb9caf41.json | Fix url of tRPC's `next-minimal-starter` (#38452)
Fix url of tRPC's `next-minimal-starter`
## Documentation / Examples
- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-... | examples/with-trpc/README.md | @@ -10,4 +10,4 @@
## Next.js + tRPC minimal implementation
-- https://github.com/trpc/examples-next-minimal-starter
+- https://github.com/trpc/trpc/tree/main/examples/next-minimal-starter | false |
Other | vercel | next.js | 419765affea2b15eab2c666903fde93068fcf016.json | Add refreshing of Server Components (#38508)
* Add todo
* Reload page when server component changes
* Implement router.reload() that refreshes full tree | packages/next/client/components/app-router.client.tsx | @@ -37,14 +37,8 @@ export function fetchServerResponse(
}
// TODO: move this back into AppRouter
-let initialCache: CacheNode =
- typeof window === 'undefined'
- ? null!
- : {
- data: null,
- subTreeData: null,
- parallelRoutes: new Map(),
- }
+let initialParallelRoutes: CacheNode['... | true |
Other | vercel | next.js | 419765affea2b15eab2c666903fde93068fcf016.json | Add refreshing of Server Components (#38508)
* Add todo
* Reload page when server component changes
* Implement router.reload() that refreshes full tree | packages/next/client/components/hot-reloader.client.tsx | @@ -8,6 +8,7 @@ import {
} from 'next/dist/compiled/@next/react-dev-overlay/dist/client'
import stripAnsi from 'next/dist/compiled/strip-ansi'
import formatWebpackMessages from '../dev/error-overlay/format-webpack-messages'
+import { useRouter } from './hooks-client'
function getSocketProtocol(assetPrefix: string... | true |
Other | vercel | next.js | 419765affea2b15eab2c666903fde93068fcf016.json | Add refreshing of Server Components (#38508)
* Add todo
* Reload page when server component changes
* Implement router.reload() that refreshes full tree | packages/next/client/components/reducer.ts | @@ -209,6 +209,18 @@ const walkTreeWithFlightDataPath = (
treePatch: FlightRouterState
): FlightRouterState => {
const [segment, parallelRoutes, url] = flightRouterState
+
+ // Root refresh
+ if (flightSegmentPath.length === 1) {
+ const tree: FlightRouterState = [...treePatch]
+
+ if (url) {
+ tree... | true |
Other | vercel | next.js | 419765affea2b15eab2c666903fde93068fcf016.json | Add refreshing of Server Components (#38508)
* Add todo
* Reload page when server component changes
* Implement router.reload() that refreshes full tree | packages/next/server/dev/hot-reloader.ts | @@ -19,7 +19,10 @@ import * as Log from '../../build/output/log'
import getBaseWebpackConfig from '../../build/webpack-config'
import { API_ROUTE, APP_DIR_ALIAS } from '../../lib/constants'
import { recursiveDelete } from '../../lib/recursive-delete'
-import { BLOCKED_PAGES } from '../../shared/lib/constants'
+impor... | true |
Other | vercel | next.js | 419765affea2b15eab2c666903fde93068fcf016.json | Add refreshing of Server Components (#38508)
* Add todo
* Reload page when server component changes
* Implement router.reload() that refreshes full tree | packages/next/server/dev/on-demand-entry-handler.ts | @@ -23,6 +23,7 @@ function treePathToEntrypoint(
): string {
const [parallelRouteKey, segment] = segmentPath
+ // TODO: modify this path to cover parallelRouteKey convention
const path =
(parentPath ? parentPath + '/' : '') +
(parallelRouteKey !== 'children' ? parallelRouteKey + '/' : '') + | true |
Other | vercel | next.js | 419765affea2b15eab2c666903fde93068fcf016.json | Add refreshing of Server Components (#38508)
* Add todo
* Reload page when server component changes
* Implement router.reload() that refreshes full tree | packages/next/shared/lib/app-router-context.ts | @@ -13,6 +13,7 @@ export type CacheNode = {
}
export type AppRouterInstance = {
+ reload(): void
push(href: string): void
softPush(href: string): void
replace(href: string): void | true |
Other | vercel | next.js | d920a171627310d75788e3c22740761ebc0ee02c.json | build(ci): enable rustls as default (#38471)
* build(ci): enable rustls as default
* test build | .github/workflows/build_test_deploy.yml | @@ -1261,7 +1261,7 @@ jobs:
rustup default "${RUST_TOOLCHAIN}" &&
rustup target add x86_64-unknown-linux-musl &&
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn... | true |
Other | vercel | next.js | d920a171627310d75788e3c22740761ebc0ee02c.json | build(ci): enable rustls as default (#38471)
* build(ci): enable rustls as default
* test build | packages/next-swc/crates/napi/Cargo.toml | @@ -8,7 +8,7 @@ publish = false
crate-type = ["cdylib", "rlib"]
[features]
-default = ["sentry_native_tls"]
+default = ["sentry_rustls"]
# Instead of enabling all the plugin-related features by default, make it explicitly specified
# when build (i.e napi --build --features plugin), same for the wasm as well.
# t... | true |
Other | vercel | next.js | 06d2380937ad7597a8d7cce2f57d444f733ae79c.json | Update flakey unoptimized image test (#38478) | test/integration/image-component/unoptimized/test/index.test.js | @@ -45,40 +45,42 @@ function runTests() {
await browser.elementById('eager-image').getAttribute('srcset')
).toBeNull()
- await browser.eval(
- `document.getElementById("internal-image").scrollIntoView({behavior: "smooth"})`
- )
- await browser.eval(
- `document.getElementById("static-im... | false |
Other | vercel | next.js | 8282c819fdee821d7efcd5d6b6f643e13aa7f79c.json | Remove dynamic params from `query` in new router (#38466)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | packages/next/server/app-render.tsx | @@ -421,8 +421,9 @@ export async function renderToHTML(
}
const key = segmentParam.param
+ const value = pathParams[key]
- if (!pathParams[key] && !query[key]) {
+ if (!value) {
if (segmentParam.type === 'optional-catchall') {
return {
param: key,
@@ -433,9 +434,6 @@ ex... | true |
Other | vercel | next.js | 8282c819fdee821d7efcd5d6b6f643e13aa7f79c.json | Remove dynamic params from `query` in new router (#38466)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | packages/next/server/base-server.ts | @@ -221,7 +221,8 @@ export default abstract class Server<ServerOptions extends Options = Options> {
protected abstract findPageComponents(
pathname: string,
query?: NextParsedUrlQuery,
- params?: Params
+ params?: Params,
+ isAppDir?: boolean
): Promise<FindComponentsResult | null>
protected... | true |
Other | vercel | next.js | 8282c819fdee821d7efcd5d6b6f643e13aa7f79c.json | Remove dynamic params from `query` in new router (#38466)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | packages/next/server/dev/next-dev-server.ts | @@ -1105,7 +1105,8 @@ export default class DevServer extends Server {
protected async findPageComponents(
pathname: string,
query: ParsedUrlQuery = {},
- params: Params | null = null
+ params: Params | null = null,
+ isAppDir: boolean = false
): Promise<FindComponentsResult | null> {
await... | true |
Other | vercel | next.js | 8282c819fdee821d7efcd5d6b6f643e13aa7f79c.json | Remove dynamic params from `query` in new router (#38466)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | packages/next/server/next-server.ts | @@ -683,7 +683,8 @@ export default class NextNodeServer extends BaseServer {
protected async findPageComponents(
pathname: string,
query: NextParsedUrlQuery = {},
- params: Params | null = null
+ params: Params | null = null,
+ isAppDir: boolean = false
): Promise<FindComponentsResult | null> {... | true |
Other | vercel | next.js | b6a2051d49fc0b3148a26d7d4d5a80385a81bba4.json | Solve last mini-css-plugin webpack 5 warning (#16447)
Adds missing context parameter | packages/next/build/webpack/plugins/mini-css-extract-plugin/src/CssModule.js | @@ -53,8 +53,8 @@ class CssModule extends webpack.Module {
callback()
}
- updateHash(hash) {
- super.updateHash(hash)
+ updateHash(hash, context) {
+ super.updateHash(hash, context)
hash.update(this.content)
hash.update(this.media || '')
hash.update(this.sourceMap ? JSON.stringify(this.... | false |
Other | vercel | next.js | ec7009620abe5429b199cf1b39700e38497917b7.json | Ensure unknown static paths 404 for data request (#16401)
We were accidentally allowing data requests to be rendered unconditionally. Instead, we should also check them against the staticPaths result and 404 when appropriate.
---
Fixes #15383 | packages/next/next-server/server/next-server.ts | @@ -1156,7 +1156,6 @@ export default class Server {
fallbackMode !== 'blocking' &&
ssgCacheKey &&
!didRespond &&
- !isDataReq &&
!isPreviewMode &&
isDynamicPathname &&
// Development should trigger fallback when the path is not in
@@ -1173,27 +1172,29 @@ export default cla... | true |
Other | vercel | next.js | ec7009620abe5429b199cf1b39700e38497917b7.json | Ensure unknown static paths 404 for data request (#16401)
We were accidentally allowing data requests to be rendered unconditionally. Instead, we should also check them against the staticPaths result and 404 when appropriate.
---
Fixes #15383 | test/integration/prerender/test/index.test.js | @@ -576,6 +576,32 @@ const runTests = (dev = false, isEmulatedServerless = false) => {
expect(value).toMatch(/Hi \[second\]!/)
})
+ if (!isEmulatedServerless) {
+ it('should not return data for fallback: false and missing dynamic page', async () => {
+ const res1 = await fetchViaHTTP(
+ appPor... | true |
Other | vercel | next.js | 3dec50001e34894379e0b14ef9bad9379c44d7b7.json | Add debug flag for extra build output (#16399)
This adds a `-d` or `--debug` flag which enables outputting additional build output information like the rewrites, redirects, and headers
Fixes #15281 | packages/next/build/index.ts | @@ -102,7 +102,8 @@ export type PrerenderManifest = {
export default async function build(
dir: string,
conf = null,
- reactProductionProfiling = false
+ reactProductionProfiling = false,
+ debugOutput = false
): Promise<void> {
if (!(await isWriteable(dir))) {
throw new Error(
@@ -1024,7 +1025,10 @@... | true |
Other | vercel | next.js | 3dec50001e34894379e0b14ef9bad9379c44d7b7.json | Add debug flag for extra build output (#16399)
This adds a `-d` or `--debug` flag which enables outputting additional build output information like the rewrites, redirects, and headers
Fixes #15281 | packages/next/cli/next-build.ts | @@ -12,8 +12,10 @@ const nextBuild: cliCommand = (argv) => {
// Types
'--help': Boolean,
'--profile': Boolean,
+ '--debug': Boolean,
// Aliases
'-h': '--help',
+ '-d': '--debug',
}
let args: arg.Result<arg.Spec>
@@ -53,7 +55,7 @@ const nextBuild: cliCommand = (argv) => {
prin... | true |
Other | vercel | next.js | 3dec50001e34894379e0b14ef9bad9379c44d7b7.json | Add debug flag for extra build output (#16399)
This adds a `-d` or `--debug` flag which enables outputting additional build output information like the rewrites, redirects, and headers
Fixes #15281 | test/integration/custom-routes/test/index.test.js | @@ -988,7 +988,7 @@ const runTests = (isDev = false) => {
})
})
- it('should have redirects/rewrites in build output', async () => {
+ it('should have redirects/rewrites in build output with debug flag', async () => {
const manifest = await fs.readJSON(
join(appDir, '.next/routes-man... | true |
Other | vercel | next.js | 08ab3ac6c14db1d4c7dfd204e96e4f9cf7e83128.json | Fix mini-css-plugin webpack 5 deprecation warnings (#16390)
Solves the warnings coming from mini-css-plugin in webpack 5.
Fixes #15947 | packages/next/build/webpack/plugins/mini-css-extract-plugin/src/index.js | @@ -12,6 +12,7 @@ const {
util: { createHash },
} = webpack
+const isWebpack5 = parseInt(webpack.version) === 5
const MODULE_TYPE = 'css/mini-extract'
const pluginName = 'mini-css-extract-plugin'
@@ -22,6 +23,14 @@ const REGEXP_NAME = /\[name\]/i
const REGEXP_PLACEHOLDERS = /\[(name|id|chunkhash)\]/g
const ... | true |
Other | vercel | next.js | 08ab3ac6c14db1d4c7dfd204e96e4f9cf7e83128.json | Fix mini-css-plugin webpack 5 deprecation warnings (#16390)
Solves the warnings coming from mini-css-plugin in webpack 5.
Fixes #15947 | packages/next/build/webpack/plugins/mini-css-extract-plugin/src/loader.js | @@ -6,6 +6,7 @@ import NodeTargetPlugin from 'webpack/lib/node/NodeTargetPlugin'
import CssDependency from './CssDependency'
+const isWebpack5 = parseInt(webpack.version) === 5
const pluginName = 'mini-css-extract-plugin'
function evalModuleCode(loaderContext, code, filename) {
@@ -18,9 +19,17 @@ function eval... | true |
Other | vercel | next.js | 08ab3ac6c14db1d4c7dfd204e96e4f9cf7e83128.json | Fix mini-css-plugin webpack 5 deprecation warnings (#16390)
Solves the warnings coming from mini-css-plugin in webpack 5.
Fixes #15947 | packages/react-dev-overlay/src/middleware.ts | @@ -30,6 +30,14 @@ type Source = { map: () => RawSourceMap } | null
const isWebpack5 = parseInt(webpack.version!) === 5
+function getModuleId(compilation: any, module: any) {
+ if (isWebpack5) {
+ return compilation.chunkGraph.getModuleId(module)
+ }
+
+ return module.id
+}
+
function getModuleSource(compil... | true |
Other | vercel | next.js | 1ad9cd90e5a39d1379ea98188d5e8763f4d94cb0.json | Reduce filesystem lookups during bootup (#16354)
This PR reduces the total number of filesystem accesses we perform on CLI boot-up to make it happen faster. | packages/next/lib/get-package-version.ts | @@ -1,28 +1,47 @@
-// issuer.endsWith(path.posix.sep) || issuer.endsWith(path.win32.sep)
-import findUp from 'next/dist/compiled/find-up'
-import * as path from 'path'
import { promises as fs } from 'fs'
+import findUp from 'next/dist/compiled/find-up'
import JSON5 from 'next/dist/compiled/json5'
+import * as path f... | false |
Other | vercel | next.js | 0a72d14deb2249d6f03e6d2eb370ff8394db4189.json | Make `loadPage` track success of script loading (#16334)
Prior to this PR, `loadPage` would call `loadScript` which would then report if the script failed to load.
This was problematic because `loadScript` notified a failure to load via `pageRegisterEvents`, which would not set the `pageCache` value for future reques... | packages/next/client/page-loader.ts | @@ -80,6 +80,20 @@ function appendLink(href: string, rel: string, as?: string): Promise<any> {
return res
}
+function loadScript(url: string): Promise<any> {
+ return new Promise((res, rej) => {
+ const script = document.createElement('script')
+ if (process.env.__NEXT_MODERN_BUILD && hasNoModule) {
+ ... | true |
Other | vercel | next.js | 0a72d14deb2249d6f03e6d2eb370ff8394db4189.json | Make `loadPage` track success of script loading (#16334)
Prior to this PR, `loadPage` would call `loadScript` which would then report if the script failed to load.
This was problematic because `loadScript` notified a failure to load via `pageRegisterEvents`, which would not set the `pageCache` value for future reques... | test/integration/client-404/pages/missing.js | @@ -0,0 +1,3 @@
+export default function Missing() {
+ return <p id="missing">poof</p>
+} | true |
Other | vercel | next.js | 0a72d14deb2249d6f03e6d2eb370ff8394db4189.json | Make `loadPage` track success of script loading (#16334)
Prior to this PR, `loadPage` would call `loadScript` which would then report if the script failed to load.
This was problematic because `loadScript` notified a failure to load via `pageRegisterEvents`, which would not set the `pageCache` value for future reques... | test/integration/client-404/pages/to-missing-link.js | @@ -0,0 +1,7 @@
+import Link from 'next/link'
+
+export default () => (
+ <Link href="/missing">
+ <a id="to-missing">to 404</a>
+ </Link>
+) | true |
Other | vercel | next.js | 0a72d14deb2249d6f03e6d2eb370ff8394db4189.json | Make `loadPage` track success of script loading (#16334)
Prior to this PR, `loadPage` would call `loadScript` which would then report if the script failed to load.
This was problematic because `loadScript` notified a failure to load via `pageRegisterEvents`, which would not set the `pageCache` value for future reques... | test/integration/client-404/test/client-navigation.js | @@ -1,8 +1,8 @@
/* eslint-env jest */
import webdriver from 'next-webdriver'
-import { check } from 'next-test-utils'
+import { check, waitFor } from 'next-test-utils'
-export default (context) => {
+export default (context, isProd = false) => {
describe('Client Navigation 404', () => {
describe('should sho... | true |
Other | vercel | next.js | 0a72d14deb2249d6f03e6d2eb370ff8394db4189.json | Make `loadPage` track success of script loading (#16334)
Prior to this PR, `loadPage` would call `loadScript` which would then report if the script failed to load.
This was problematic because `loadScript` notified a failure to load via `pageRegisterEvents`, which would not set the `pageCache` value for future reques... | test/integration/client-404/test/index.test.js | @@ -8,7 +8,9 @@ import {
killApp,
nextBuild,
nextStart,
+ getBuildManifest,
} from 'next-test-utils'
+import fs from 'fs-extra'
// test suite
import clientNavigation from './client-navigation'
@@ -17,8 +19,8 @@ const context = {}
const appDir = join(__dirname, '../')
jest.setTimeout(1000 * 60 * 5)
-c... | true |
Other | vercel | next.js | 9746043354c57f4d40ab0b8b58282268a3bf9caf.json | Fix IE11 CSS Compatibility (#16336) | packages/next/client/index.tsx | @@ -648,7 +648,7 @@ async function doRender({
;([].slice.call(
document.querySelectorAll('link[data-n-staging]')
) as HTMLLinkElement[]).forEach((el) => {
- el.remove()
+ el.parentNode!.removeChild(el)
})
}
renderPromise.catch((abortError) => {
@@ -668,7 +668,7 @@ async function do... | true |
Other | vercel | next.js | 9746043354c57f4d40ab0b8b58282268a3bf9caf.json | Fix IE11 CSS Compatibility (#16336) | test/integration/production/pages/css-and-back.js | @@ -0,0 +1,16 @@
+import Link from 'next/link'
+
+const Page = ({ from }) => (
+ <div>
+ <p>{from}</p>
+ <Link href="/css-modules">
+ <a>Page with CSS</a>
+ </Link>
+ </div>
+)
+
+Page.getInitialProps = () => {
+ return { from: typeof window === 'undefined' ? 'server' : 'client' }
+}
+
+export default ... | true |
Other | vercel | next.js | 9746043354c57f4d40ab0b8b58282268a3bf9caf.json | Fix IE11 CSS Compatibility (#16336) | test/integration/production/pages/css-modules.js | @@ -3,5 +3,6 @@ import Logo from '../components/logo'
export default () => (
<div>
<Logo />
+ <input />
</div>
) | true |
Other | vercel | next.js | 9746043354c57f4d40ab0b8b58282268a3bf9caf.json | Fix IE11 CSS Compatibility (#16336) | test/integration/production/test/index.test.js | @@ -417,6 +417,23 @@ describe('Production Usage', () => {
expect(newText).toBe('server')
})
+ it('should navigate to page with CSS and back', async () => {
+ const browser = await webdriver(appPort, '/css-and-back')
+ const initialText = await browser.elementByCss('p').text()
+ expect(initialText).t... | true |
Other | vercel | next.js | 5f9755002d40082c64586c53b805b96f3a8755ed.json | Force browser to recompute layout on page nav (#16318)
This fixes an edge case where every dozen or so transitions you'll see a flash depending on what's happening on the main thread at the time.
I'm not sure it's possible to test for this case, so we'll just have to do more field testing with this. | packages/next/client/index.tsx | @@ -608,7 +608,11 @@ async function doRender({
const required: Promise<void>[] = styleSheets.map((href) => {
const [link, promise] = createLink(href, 'stylesheet')
link.setAttribute('data-n-staging', '')
- link.setAttribute('media', 'none')
+ // Media `none` does not work in Firefox, so `pr... | true |
Other | vercel | next.js | 5f9755002d40082c64586c53b805b96f3a8755ed.json | Force browser to recompute layout on page nav (#16318)
This fixes an edge case where every dozen or so transitions you'll see a flash depending on what's happening on the main thread at the time.
I'm not sure it's possible to test for this case, so we'll just have to do more field testing with this. | test/integration/build-output/test/index.test.js | @@ -118,7 +118,7 @@ describe('Build Output', () => {
expect(parseFloat(webpackSize) - 752).toBeLessThanOrEqual(0)
expect(webpackSize.endsWith(' B')).toBe(true)
- expect(parseFloat(mainSize) - 6.9).toBeLessThanOrEqual(0)
+ expect(parseFloat(mainSize) - 7).toBeLessThanOrEqual(0)
expect(ma... | true |
Other | vercel | next.js | 24f056c9b3e18ccfca26272234fa231a8411f77a.json | Fix typo in fast-refresh.md (#16292)
Just correcting a simple typo `fash` to `fast` | docs/basic-features/fast-refresh.md | @@ -107,6 +107,6 @@ Sometimes, this can lead to unexpected results. For example, even a `useEffect`
with an empty array of dependencies would still re-run once during Fast Refresh.
However, writing code resilient to occasional re-running of `useEffect` is a good practice even
-without Fash Refresh. It will make it ... | false |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | packages/next/cli/next-dev.ts | @@ -66,7 +66,11 @@ const nextDev: cliCommand = (argv) => {
cwd: dir,
name: 'react',
})
- if (reactVersion && semver.lt(reactVersion, '16.10.0')) {
+ if (
+ reactVersion &&
+ semver.lt(reactVersion, '16.10.0') &&
+ semver.coerce(reactVersion)?.version !== '0.0.0'
+ ) {
L... | true |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | test/integration/cli/experimental-react-dom/.gitignore | @@ -0,0 +1 @@
+!node_modules | true |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | test/integration/cli/experimental-react-dom/node_modules/react-dom/index.js | @@ -0,0 +1 @@
+module.exports = { Suspense: true } | true |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | test/integration/cli/experimental-react-dom/node_modules/react-dom/package.json | @@ -0,0 +1,4 @@
+{
+ "name": "react-dom",
+ "version": "0.0.0-experimental-94c0244ba"
+} | true |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | test/integration/cli/experimental-react-dom/package.json | @@ -0,0 +1,6 @@
+{
+ "dependencies": {
+ "react": "*",
+ "react-dom": "*"
+ }
+} | true |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | test/integration/cli/experimental-react-dom/pages/index.js | @@ -0,0 +1,3 @@
+export default function Home() {
+ return <p>Hello</p>
+} | true |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | test/integration/cli/experimental-react/.gitignore | @@ -0,0 +1 @@
+!node_modules | true |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | test/integration/cli/experimental-react/node_modules/react/index.js | @@ -0,0 +1 @@
+module.exports = { Suspense: true } | true |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | test/integration/cli/experimental-react/node_modules/react/package.json | @@ -0,0 +1,4 @@
+{
+ "name": "react",
+ "version": "0.0.0-experimental-94c0244ba"
+} | true |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | test/integration/cli/experimental-react/package.json | @@ -0,0 +1,6 @@
+{
+ "dependencies": {
+ "react": "*",
+ "react-dom": "*"
+ }
+} | true |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | test/integration/cli/experimental-react/pages/index.js | @@ -0,0 +1,3 @@
+export default function Home() {
+ return <p>Hello</p>
+} | true |
Other | vercel | next.js | 29ae3727385d3c8011034063c397785693e12d69.json | Allow React experimental version without warning (#16140)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co> | test/integration/cli/test/index.test.js | @@ -16,6 +16,8 @@ jest.setTimeout(1000 * 60 * 5)
const dir = join(__dirname, '..')
const dirOldReact = join(__dirname, '../old-react')
const dirOldReactDom = join(__dirname, '../old-react-dom')
+const dirExperimentalReact = join(__dirname, '../experimental-react')
+const dirExperimentalReactDom = join(__dirname, '..... | true |
Other | vercel | next.js | 9aadd1aa36eef8d09232eda3e8b4da5625a265b0.json | Fix forEach error in CSS commit in ie11 (#16282)
This fixes an error that was occurring in ie11 due to `forEach` being called on `querySelectorAll` before it was massaged to an array.
x-ref: https://github.com/vercel/next.js/pull/16126
Fixes #16283 | packages/next/client/index.tsx | @@ -641,7 +641,9 @@ async function doRender({
}
function onAbort() {
- document.querySelectorAll('link[data-n-staging]').forEach((el) => {
+ ;([].slice.call(
+ document.querySelectorAll('link[data-n-staging]')
+ ) as HTMLLinkElement[]).forEach((el) => {
el.remove()
})
}
@@ -660,7 +6... | false |
Other | vercel | next.js | 2e6bc8eba4aa6ff8e1668068dda217477efaaf82.json | ci: add pnp test (#16255) | .github/workflows/build_test_deploy.yml | @@ -70,10 +70,29 @@ jobs:
- run: node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3
+ testYarnPnP:
+ runs-on: ubuntu-latest
+ env:
+ NODE_OPTIONS: '--unhandled-rejections=strict'
+ steps:
+ - uses: actions/checkout@v2
+
+ - run: yarn install --frozen-lockfile --check-files
+
+... | true |
Other | vercel | next.js | 2e6bc8eba4aa6ff8e1668068dda217477efaaf82.json | ci: add pnp test (#16255) | .gitignore | @@ -21,6 +21,7 @@ coverage
test/**/out*
test/**/next-env.d.ts
.DS_Store
+/e2e-tests
# Editors
**/.idea | true |
Other | vercel | next.js | 2e6bc8eba4aa6ff8e1668068dda217477efaaf82.json | ci: add pnp test (#16255) | examples/with-typescript/package.json | @@ -16,7 +16,7 @@
"@types/node": "^12.12.21",
"@types/react": "^16.9.16",
"@types/react-dom": "^16.9.4",
- "typescript": "3.7.3"
+ "typescript": "3.9.7"
},
"license": "ISC"
} | true |
Other | vercel | next.js | f8534a6e62a494663a91ca83893855827df649be.json | Fix data URL with root-catchall and basePath (#16263)
This fixes the incorrect `/_next/data` URL being generated on client transition due to the `as` value passed to `getRouteInfo` having the `basePath` which is used while interpolating the values for dynamic routes, specifically root catch-all routes. A regression te... | packages/next/next-server/lib/router/router.ts | @@ -726,7 +726,7 @@ export default class Router implements BaseRouter {
if (__N_SSG || __N_SSP) {
dataHref = this.pageLoader.getDataHref(
formatWithValidation({ pathname, query }),
- as,
+ delBasePath(as),
__N_SSG
)
} | true |
Other | vercel | next.js | f8534a6e62a494663a91ca83893855827df649be.json | Fix data URL with root-catchall and basePath (#16263)
This fixes the incorrect `/_next/data` URL being generated on client transition due to the `as` value passed to `getRouteInfo` having the `basePath` which is used while interpolating the values for dynamic routes, specifically root catch-all routes. A regression te... | test/integration/basepath-root-catch-all/next.config.js | @@ -0,0 +1,4 @@
+module.exports = {
+ // target: 'experimental-serverless-trace',
+ basePath: '/docs',
+} | true |
Other | vercel | next.js | f8534a6e62a494663a91ca83893855827df649be.json | Fix data URL with root-catchall and basePath (#16263)
This fixes the incorrect `/_next/data` URL being generated on client transition due to the `as` value passed to `getRouteInfo` having the `basePath` which is used while interpolating the values for dynamic routes, specifically root catch-all routes. A regression te... | test/integration/basepath-root-catch-all/pages/[...parts].js | @@ -0,0 +1,14 @@
+export default ({ url }) => (
+ <>
+ <h1>root catch-all</h1>
+ <p id="url">{url}</p>
+ </>
+)
+
+export const getServerSideProps = ({ req, res }) => {
+ return {
+ props: {
+ url: req.url,
+ },
+ }
+} | true |
Other | vercel | next.js | f8534a6e62a494663a91ca83893855827df649be.json | Fix data URL with root-catchall and basePath (#16263)
This fixes the incorrect `/_next/data` URL being generated on client transition due to the `as` value passed to `getRouteInfo` having the `basePath` which is used while interpolating the values for dynamic routes, specifically root catch-all routes. A regression te... | test/integration/basepath-root-catch-all/pages/hello.js | @@ -0,0 +1,7 @@
+import Link from 'next/link'
+
+export default () => (
+ <Link href="/[...parts]" as="/root/catch-all">
+ <a id="root-catchall-link">root catch-all</a>
+ </Link>
+) | true |
Other | vercel | next.js | f8534a6e62a494663a91ca83893855827df649be.json | Fix data URL with root-catchall and basePath (#16263)
This fixes the incorrect `/_next/data` URL being generated on client transition due to the `as` value passed to `getRouteInfo` having the `basePath` which is used while interpolating the values for dynamic routes, specifically root catch-all routes. A regression te... | test/integration/basepath-root-catch-all/test/index.test.js | @@ -0,0 +1,69 @@
+import {
+ nextBuild,
+ findPort,
+ killApp,
+ nextStart,
+ File,
+ launchApp,
+} from 'next-test-utils'
+import webdriver from 'next-webdriver'
+import { join } from 'path'
+import fs from 'fs-extra'
+import url from 'url'
+
+let app
+let appPort
+let buildId
+const appDir = join(__dirname, '..... | true |
Other | vercel | next.js | 2cb05b539eae985454501888d81d049caa348ecd.json | Correct a couple of small grammar errors. (#16221)
Just noticed a couple of tiny grammar errors. | docs/advanced-features/preview-mode.md | @@ -28,7 +28,7 @@ In the [Pages documentation](/docs/basic-features/pages.md) and the [Data Fetchi
Static Generation is useful when your pages fetch data from a headless CMS. However, it’s not ideal when you’re writing a draft on your headless CMS and want to **preview** the draft immediately on your page. You’d wan... | false |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/.gitignore | @@ -1,34 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-*.pem
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-... | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/.storybook/addons.js | @@ -1,2 +0,0 @@
-import '@storybook/addon-actions/register'
-import '@storybook/addon-links/register' | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/.storybook/config.js | @@ -1,25 +0,0 @@
-import { configure, addParameters } from '@storybook/react'
-
-addParameters({
- options: {
- storySort: (a, b) => {
- // We want the Welcome story at the top
- if (a[1].kind === 'Welcome') {
- return -1
- }
-
- // Sort the other stories by ID
- // https://github.co... | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/.storybook/main.js | @@ -1,3 +0,0 @@
-module.exports = {
- addons: ['@storybook/preset-typescript'],
-} | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/README.md | @@ -1,52 +0,0 @@
-# Example app with Storybook and TypeScript.
-
-This example shows a default set up of Storybook plus TypeScript, using [@storybook/preset-typescript](https://github.com/storybookjs/presets/tree/master/packages/preset-typescript). Also included in the example is a custom component included in both Sto... | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/components/index.tsx | @@ -1,4 +0,0 @@
-import React from 'react'
-export default function Home() {
- return <div>Hello World</div>
-} | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/next-env.d.ts | @@ -1,2 +0,0 @@
-/// <reference types="next" />
-/// <reference types="next/types/global" /> | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/package.json | @@ -1,31 +0,0 @@
-{
- "name": "with-storybook",
- "version": "1.0.0",
- "main": "index.js",
- "scripts": {
- "dev": "next",
- "build": "next build",
- "start": "next start",
- "storybook": "start-storybook -p 6006",
- "build-storybook": "build-storybook"
- },
- "dependencies": {
- "next": "lates... | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/pages/index.tsx | @@ -1,10 +0,0 @@
-import HelloWorld from '../components'
-
-export default function Home() {
- return (
- <div>
- <h1>Simple Storybook Example</h1>
- <HelloWorld />
- </div>
- )
-} | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/stories/button.stories.tsx | @@ -1,17 +0,0 @@
-import React from 'react'
-import { action } from '@storybook/addon-actions'
-import { Button } from '@storybook/react/demo'
-
-export default { title: 'Button' }
-
-export const withText = () => (
- <Button onClick={action('clicked')}>Hello Button</Button>
-)
-
-export const withSomeEmoji = () => (
... | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/stories/helloWorld.stories.tsx | @@ -1,6 +0,0 @@
-import React from 'react'
-import HelloWorld from '../components'
-
-export default { title: 'Hello World' }
-
-export const simpleComponent = () => <HelloWorld /> | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/stories/welcome.stories.tsx | @@ -1,7 +0,0 @@
-import React from 'react'
-import { linkTo } from '@storybook/addon-links'
-import { Welcome } from '@storybook/react/demo'
-
-export default { title: 'Welcome' }
-
-export const toStorybook = () => <Welcome showApp={linkTo('Button')} /> | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook-typescript/tsconfig.json | @@ -1,19 +0,0 @@
-{
- "compilerOptions": {
- "target": "es5",
- "lib": ["dom", "dom.iterable", "esnext"],
- "allowJs": true,
- "skipLibCheck": true,
- "strict": false,
- "forceConsistentCasingInFileNames": true,
- "noEmit": true,
- "esModuleInterop": true,
- "module": "esnext",
- "moduleR... | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook/.storybook/addons.js | @@ -1,2 +0,0 @@
-import '@storybook/addon-actions/register'
-import '@storybook/addon-links/register' | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook/.storybook/config.js | @@ -1,25 +0,0 @@
-import { configure, addParameters } from '@storybook/react'
-
-addParameters({
- options: {
- storySort: (a, b) => {
- // We want the Welcome story at the top
- if (a[1].kind === 'Welcome') {
- return -1
- }
-
- // Sort the other stories by ID
- // https://github.co... | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook/.storybook/main.js | @@ -0,0 +1,4 @@
+module.exports = {
+ stories: ['../stories/*.stories.@(ts|tsx|js|jsx|mdx)'],
+ addons: ['@storybook/addon-actions', '@storybook/addon-links'],
+} | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook/.storybook/preview.js | @@ -0,0 +1,16 @@
+export const parameters = {
+ options: {
+ storySort: (a, b) => {
+ // We want the Welcome story at the top
+ if (b[1].kind === 'Welcome') {
+ return 1
+ }
+
+ // Sort the other stories by ID
+ // https://github.com/storybookjs/storybook/issues/548#issuecomment-5303... | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook/README.md | @@ -2,6 +2,10 @@
This example shows a default set up of Storybook. Also included in the example is a custom component included in both Storybook and the Next.js application.
+### TypeScript
+
+As of v6.0, Storybook has built-in TypeScript support, so no configuration is needed. If you want to customize the default... | true |
Other | vercel | next.js | 521cc621d80542071df6c7ee299cb6ec88e5a4db.json | Update Storybook examples to v6.0 (#16139)
* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | examples/with-storybook/package.json | @@ -16,10 +16,10 @@
},
"license": "ISC",
"devDependencies": {
- "@storybook/addon-actions": "5.2.3",
- "@storybook/addon-links": "5.2.3",
- "@storybook/addons": "5.2.3",
- "@storybook/react": "5.2.3",
+ "@storybook/addon-actions": "6.0.5",
+ "@storybook/addon-links": "6.0.5",
+ "@storybook... | true |
Other | vercel | next.js | 3597978d7f121f11df99cd7cd757e1eb9868fff7.json | Modify low priority files in manifest (#16181)
This pull request edits the `BuildManifest` that is sent to `/_document` instead of modifying a single input array to decouple its implementation details.
Optimally, we'd eliminate the `files` key all together.
---
Related to #16182 | packages/next/build/webpack/plugins/build-manifest-plugin.ts | @@ -17,6 +17,8 @@ import { getSortedRoutes } from '../../../next-server/lib/router/utils'
const isWebpack5 = parseInt(webpack.version!) === 5
+type DeepMutable<T> = { -readonly [P in keyof T]: DeepMutable<T[P]> }
+
export type ClientBuildManifest = Record<string, string[]>
// This function takes the asset map ... | true |
Other | vercel | next.js | 3597978d7f121f11df99cd7cd757e1eb9868fff7.json | Modify low priority files in manifest (#16181)
This pull request edits the `BuildManifest` that is sent to `/_document` instead of modifying a single input array to decouple its implementation details.
Optimally, we'd eliminate the `files` key all together.
---
Related to #16182 | packages/next/next-server/server/get-page-files.ts | @@ -1,21 +1,21 @@
import { normalizePagePath, denormalizePagePath } from './normalize-page-path'
export type BuildManifest = {
- devFiles: string[]
- ampDevFiles: string[]
- polyfillFiles: string[]
- lowPriorityFiles: string[]
+ devFiles: readonly string[]
+ ampDevFiles: readonly string[]
+ polyfillFiles: re... | true |
Other | vercel | next.js | 3597978d7f121f11df99cd7cd757e1eb9868fff7.json | Modify low priority files in manifest (#16181)
This pull request edits the `BuildManifest` that is sent to `/_document` instead of modifying a single input array to decouple its implementation details.
Optimally, we'd eliminate the `files` key all together.
---
Related to #16182 | packages/next/next-server/server/render.tsx | @@ -27,6 +27,7 @@ import { HeadManagerContext } from '../lib/head-manager-context'
import Loadable from '../lib/loadable'
import { LoadableContext } from '../lib/loadable-context'
import mitt, { MittEmitter } from '../lib/mitt'
+import postProcess from '../lib/post-process'
import { RouterContext } from '../lib/rou... | true |
Other | vercel | next.js | 39e00a3f2f87fa2c1ee6d858dc49120842fb9a5b.json | Add test case for preloading buildManifest (#16183) | test/integration/dynamic-routing/test/index.test.js | @@ -561,6 +561,40 @@ function runTests(dev) {
expect(res.status).toBe(400)
})
+ it('should preload buildManifest for auto-export dynamic pages', async () => {
+ const html = await renderViaHTTP(appPort, '/on-mount/hello')
+ const $ = cheerio.load(html)
+ let found = 0
+
+ for (const el of Array.f... | false |
Other | vercel | next.js | 33176806f39e5d9f67c4aab43292aa9d7331422e.json | Remove unused dependency (#16168) | packages/next/compiled/launch-editor/index.js | @@ -1 +0,0 @@
-module.exports=function(e,n){"use strict";var t={};function __webpack_require__(n){if(t[n]){return t[n].exports}var r=t[n]={i:n,l:false,exports:{}};e[n].call(r.exports,r,r.exports,__webpack_require__);r.l=true;return r.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_requi... | true |
Other | vercel | next.js | 33176806f39e5d9f67c4aab43292aa9d7331422e.json | Remove unused dependency (#16168) | packages/next/compiled/launch-editor/package.json | @@ -1 +0,0 @@
-{"name":"launch-editor","main":"index.js","author":"Evan You","license":"MIT"} | true |
Other | vercel | next.js | 33176806f39e5d9f67c4aab43292aa9d7331422e.json | Remove unused dependency (#16168) | packages/next/package.json | @@ -192,7 +192,6 @@
"is-wsl": "2.2.0",
"json5": "2.1.3",
"jsonwebtoken": "8.5.1",
- "launch-editor": "2.2.1",
"lodash.curry": "4.1.1",
"lru-cache": "5.1.1",
"nanoid": "2.0.3", | true |
Other | vercel | next.js | 33176806f39e5d9f67c4aab43292aa9d7331422e.json | Remove unused dependency (#16168) | packages/next/server/hot-reloader.ts | @@ -17,7 +17,6 @@ import {
} from '../next-server/lib/constants'
import { __ApiPreviewProps } from '../next-server/server/api-utils'
import { route } from '../next-server/server/router'
-import errorOverlayMiddleware from './lib/error-overlay-middleware'
import { findPageFile } from './lib/find-page-file'
import o... | true |
Other | vercel | next.js | 33176806f39e5d9f67c4aab43292aa9d7331422e.json | Remove unused dependency (#16168) | packages/next/server/lib/error-overlay-middleware.ts | @@ -1,26 +0,0 @@
-import url from 'url'
-import launchEditor from 'next/dist/compiled/launch-editor'
-import fs from 'fs'
-import path from 'path'
-import { IncomingMessage, ServerResponse } from 'http'
-
-export default function errorOverlayMiddleware(options: { dir: string }) {
- return (req: IncomingMessage, res: S... | true |
Other | vercel | next.js | 33176806f39e5d9f67c4aab43292aa9d7331422e.json | Remove unused dependency (#16168) | packages/next/taskfile.js | @@ -302,14 +302,6 @@ export async function ncc_jsonwebtoken(task, opts) {
.target('compiled/jsonwebtoken')
}
// eslint-disable-next-line camelcase
-externals['launch-editor'] = 'next/dist/compiled/launch-editor'
-export async function ncc_launch_editor(task, opts) {
- await task
- .source(opts.src || relativ... | true |
Other | vercel | next.js | 33176806f39e5d9f67c4aab43292aa9d7331422e.json | Remove unused dependency (#16168) | packages/next/types/misc.d.ts | @@ -6,7 +6,6 @@ declare module 'cssnano-simple' {
const cssnanoSimple: Plugin<{}>
export = cssnanoSimple
}
-declare module 'launch-editor'
declare module 'styled-jsx/server'
declare module 'unfetch'
declare module 'webpack/lib/GraphHelpers'
@@ -130,10 +129,6 @@ declare module 'next/dist/compiled/jsonwebtoken'... | true |
Other | vercel | next.js | 33176806f39e5d9f67c4aab43292aa9d7331422e.json | Remove unused dependency (#16168) | yarn.lock | @@ -5352,7 +5352,7 @@ chalk@2.4.0:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
-chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.0, chalk@^2.4.1, chalk@^2.4.2:
+chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.0, chalk@^2.... | true |
Other | vercel | next.js | 76fddcd7efd930ca1fcef9573c83719f47233d3e.json | Use chunkhash instead of buildId for pages (#13937)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | packages/next/build/entries.ts | @@ -100,7 +100,7 @@ export function createEntrypoints(
const bundleFile = `${normalizePagePath(page)}.js`
const isApiRoute = page.match(API_ROUTE)
- const bundlePath = join('static', buildId, 'pages', bundleFile)
+ const bundlePath = join('static', 'BUILD_ID', 'pages', bundleFile)
const isLikeS... | true |
Other | vercel | next.js | 76fddcd7efd930ca1fcef9573c83719f47233d3e.json | Use chunkhash instead of buildId for pages (#13937)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | packages/next/build/index.ts | @@ -499,7 +499,6 @@ export default async function build(dir: string, conf = null): Promise<void> {
const [selfSize, allSize] = await getJsPageSizeInKb(
actualPage,
distDir,
- buildId,
buildManifest,
config.experimental.modern
)
@@ -989,8 +988,6 @@ export default ... | true |
Other | vercel | next.js | 76fddcd7efd930ca1fcef9573c83719f47233d3e.json | Use chunkhash instead of buildId for pages (#13937)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | packages/next/build/utils.ts | @@ -22,6 +22,7 @@ import { getRouteMatcher, getRouteRegex } from '../next-server/lib/router/utils'
import { isDynamicRoute } from '../next-server/lib/router/utils/is-dynamic'
import { findPageFile } from '../server/lib/find-page-file'
import { GetStaticPaths } from 'next/types'
+import { denormalizePagePath } from '... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.