Skip to content
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

Fix Tests #9963

Merged
merged 1 commit into from
Jan 6, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
"postcss-trolling": "0.1.7",
"pre-commit": "1.2.2",
"prettier": "1.19.1",
"react": "16.10.2",
"react-dom": "16.10.2",
"react": "16.12.0",
"react-dom": "16.12.0",
"react-ssr-prepass": "1.0.8",
"release": "6.0.1",
"request-promise-core": "1.1.2",
Expand All @@ -100,11 +100,13 @@
"tree-kill": "1.2.1",
"typescript": "3.7.3",
"wait-port": "0.2.2",
"webpack-bundle-analyzer": "3.3.2"
"webpack-bundle-analyzer": "3.3.2",
"browserslist": "^4.8.3",
"caniuse-lite": "^1.0.30001019"
},
"resolutions": {
"browserslist": "^4.7.1",
"caniuse-lite": "^1.0.30001002"
"browserslist": "^4.8.3",
"caniuse-lite": "^1.0.30001019"
},
"engines": {
"node": ">= 8.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getRouteRegex } from './route-regex'

export function getRouteMatcher(routeRegex: ReturnType<typeof getRouteRegex>) {
const { re, groups } = routeRegex
return (pathname: string | undefined) => {
return (pathname: string | null | undefined) => {
const routeMatch = re.exec(pathname!)
if (!routeMatch) {
return false
Expand Down
2 changes: 1 addition & 1 deletion packages/next/next-server/server/lib/path-match.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default (customRoute = false) => {
decode: decodeParam,
})

return (pathname: string | undefined, params?: any) => {
return (pathname: string | null | undefined, params?: any) => {
const res = pathname == null ? false : matcher(pathname)
if (!res) {
return false
Expand Down
2 changes: 1 addition & 1 deletion packages/next/next-server/server/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const route = pathMatch()

export type Params = { [param: string]: any }

export type RouteMatch = (pathname: string | undefined) => false | Params
export type RouteMatch = (pathname: string | null | undefined) => false | Params

type RouteResult = {
finished: boolean
Expand Down
4 changes: 2 additions & 2 deletions packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@
"@types/mkdirp": "0.5.2",
"@types/nanoid": "2.0.0",
"@types/node-fetch": "2.3.4",
"@types/react": "16.8.18",
"@types/react-dom": "16.9.3",
"@types/react": "16.9.17",
"@types/react-dom": "16.9.4",
"@types/react-is": "16.7.1",
"@types/resolve": "0.0.8",
"@types/send": "0.14.4",
Expand Down
2 changes: 1 addition & 1 deletion test/integration/size-limit/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('Production response size', () => {
)

// These numbers are without gzip compression!
const delta = responseSizeKilobytes - 198
const delta = responseSizeKilobytes - 196
expect(delta).toBeLessThanOrEqual(0) // don't increase size
expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target
})
Expand Down
3,413 changes: 1,521 additions & 1,892 deletions yarn.lock

Large diffs are not rendered by default.