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
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/.gitignore
@@ -0,0 +1,34 @@ +# 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 + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# loc...
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/README.md
@@ -0,0 +1,96 @@ +# Userbase Example + +This is an example of using [Userbase](https://userbase.com) in a Next.js project. + +Deployed Demo: [https://next-userbase.now.sh](https://next-userbase.now.sh) + +## Deploy your own + +Deploy the example using [Vercel](https://vercel.com): + +[![Deploy with Vercel](https://verc...
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/components/layout/index.js
@@ -0,0 +1,11 @@ +import Nav from '../nav' +function Layout({ user, setUser, children }) { + return ( + <div className="container mx-auto"> + <Nav user={user} setUser={setUser} /> + {children} + </div> + ) +} + +export default Layout
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/components/modal/index.js
@@ -0,0 +1,114 @@ +import { useState, useEffect } from 'react' +import userbase from 'userbase-js' + +function LoginModal({ toggle, modalType, setUser }) { + const [username, setUsername] = useState('') + const [password, setPassword] = useState('') + const [loading, setLoading] = useState() + const [error, setErro...
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/components/nav/index.js
@@ -0,0 +1,65 @@ +import { useState } from 'react' +import LoginModal from '../modal' + +import userbase from 'userbase-js' + +export default function Nav({ user, setUser }) { + const [open, setOpen] = useState() + const [modalType, setModalType] = useState() + + function openModal(type) { + setOpen(true) + se...
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/components/todo-form/index.js
@@ -0,0 +1,132 @@ +import { useState, useEffect } from 'react' +import userbase from 'userbase-js' + +function Todo({ name, done, toggleComplete, deleteTodo }) { + return ( + <li className="my-4"> + <div className="flex items-center"> + <span className={done ? 'text-gray-500' : ''}>{name}</span> + ...
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/next.config.js
@@ -0,0 +1,7 @@ +require('dotenv').config() + +module.exports = { + env: { + USERBASE_APP_ID: process.env.USERBASE_APP_ID, + }, +}
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/now.json
@@ -0,0 +1,7 @@ +{ + "build": { + "env": { + "USERBASE_APP_ID": "@userbase-app-id" + } + } +}
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/package.json
@@ -0,0 +1,21 @@ +{ + "name": "with-tailwindcss", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "dotenv": "8.2.0", + "next": "^9.2.0", + "react": "^16.12.0", + "react-dom": "^16.12.0", + "userbase-js": "^1.3...
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/pages/_app.js
@@ -0,0 +1,21 @@ +import { useState, useEffect } from 'react' +import userbase from 'userbase-js' +import Layout from '../components/layout' + +import '../styles/index.css' + +function MyApp({ Component, pageProps }) { + const [user, setUser] = useState() + + useEffect(() => { + userbase.init({ appId: process.env....
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/pages/index.js
@@ -0,0 +1,18 @@ +import TodoForm from '../components/todo-form' + +function Index({ user }) { + if (user) { + return ( + <div className="w-4/5 md:w-1/2 mx-auto"> + <h3 className="font-bold text-4xl"> + Welcome, <span className="bg-yellow-400">{user.username}</span>! + </h3> + <To...
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/postcss.config.js
@@ -0,0 +1,21 @@ +module.exports = { + plugins: [ + 'tailwindcss', + ...(process.env.NODE_ENV === 'production' + ? [ + [ + '@fullhuman/postcss-purgecss', + { + content: [ + './pages/**/*.{js,jsx,ts,tsx}', + './components/**/*.{js,jsx,...
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/styles/button.css
@@ -0,0 +1,7 @@ +.btn-yellow { + @apply bg-yellow-400 text-black font-bold py-2 px-4 rounded; +} + +.btn-yellow:hover { + @apply bg-yellow-500; +}
true
Other
vercel
next.js
0c6ee2c7607402c4d10072e21e13a1bc72038336.json
Add userbase example (#12150) * add userbase example * update readme and add now.json with build.env * update deploy button import path for testing * update readme * update readme with canary tree path for deploy button * remove prepopulated test username + password * Apply lint-fix * add deployed...
examples/with-userbase/styles/index.css
@@ -0,0 +1,7 @@ +@import './button.css'; + +/* purgecss start ignore */ +@tailwind base; +@tailwind components; +/* purgecss end ignore */ +@tailwind utilities;
true
Other
vercel
next.js
0a3b64d274dff0eb0bbe8e0c1609815d5bab327c.json
Add tests for dotenv-expand behavior (#12140)
packages/next/lib/load-env-config.ts
@@ -17,7 +17,11 @@ const packageJsonHasDep = (packageJsonPath: string, dep: string): boolean => { return allPackages.some(pkg => pkg === dep) } +let combinedEnv: Env | undefined = undefined + export function loadEnvConfig(dir: string, dev?: boolean): Env | false { + if (combinedEnv) return combinedEnv + cons...
true
Other
vercel
next.js
0a3b64d274dff0eb0bbe8e0c1609815d5bab327c.json
Add tests for dotenv-expand behavior (#12140)
test/integration/env-config/app/.env
@@ -7,4 +7,7 @@ ENV_FILE_PRODUCTION_OVERRIDEOVERRIDE_TEST=env ENV_FILE_PRODUCTION_LOCAL_OVERRIDEOVERRIDE_TEST=env ENV_FILE_TEST_OVERRIDE_TEST=env ENV_FILE_TEST_LOCAL_OVERRIDEOVERRIDE_TEST=env -NEXT_PUBLIC_TEST_DEST=another \ No newline at end of file +NEXT_PUBLIC_TEST_DEST=another +ENV_FILE_EXPANDED=$ENV_FILE_KEY +E...
true
Other
vercel
next.js
0a3b64d274dff0eb0bbe8e0c1609815d5bab327c.json
Add tests for dotenv-expand behavior (#12140)
test/integration/env-config/app/pages/api/all.js
@@ -15,6 +15,9 @@ const variables = [ 'LOCAL_TEST_ENV_FILE_KEY', 'ENV_FILE_TEST_OVERRIDE_TEST', 'ENV_FILE_TEST_LOCAL_OVERRIDEOVERRIDE_TEST', + 'ENV_FILE_EXPANDED', + 'ENV_FILE_EXPANDED_CONCAT', + 'ENV_FILE_EXPANDED_ESCAPED', ] const items = {}
true
Other
vercel
next.js
0a3b64d274dff0eb0bbe8e0c1609815d5bab327c.json
Add tests for dotenv-expand behavior (#12140)
test/integration/env-config/app/pages/index.js
@@ -15,6 +15,9 @@ const variables = [ 'LOCAL_TEST_ENV_FILE_KEY', 'ENV_FILE_TEST_OVERRIDE_TEST', 'ENV_FILE_TEST_LOCAL_OVERRIDEOVERRIDE_TEST', + 'ENV_FILE_EXPANDED', + 'ENV_FILE_EXPANDED_CONCAT', + 'ENV_FILE_EXPANDED_ESCAPED', ] export async function getStaticProps() {
true
Other
vercel
next.js
0a3b64d274dff0eb0bbe8e0c1609815d5bab327c.json
Add tests for dotenv-expand behavior (#12140)
test/integration/env-config/app/pages/some-ssg.js
@@ -15,6 +15,9 @@ const variables = [ 'LOCAL_TEST_ENV_FILE_KEY', 'ENV_FILE_TEST_OVERRIDE_TEST', 'ENV_FILE_TEST_LOCAL_OVERRIDEOVERRIDE_TEST', + 'ENV_FILE_EXPANDED', + 'ENV_FILE_EXPANDED_CONCAT', + 'ENV_FILE_EXPANDED_ESCAPED', ] export async function getStaticProps() {
true
Other
vercel
next.js
0a3b64d274dff0eb0bbe8e0c1609815d5bab327c.json
Add tests for dotenv-expand behavior (#12140)
test/integration/env-config/app/pages/some-ssp.js
@@ -15,6 +15,9 @@ const variables = [ 'LOCAL_TEST_ENV_FILE_KEY', 'ENV_FILE_TEST_OVERRIDE_TEST', 'ENV_FILE_TEST_LOCAL_OVERRIDEOVERRIDE_TEST', + 'ENV_FILE_EXPANDED', + 'ENV_FILE_EXPANDED_CONCAT', + 'ENV_FILE_EXPANDED_ESCAPED', ] export async function getServerSideProps() {
true
Other
vercel
next.js
0a3b64d274dff0eb0bbe8e0c1609815d5bab327c.json
Add tests for dotenv-expand behavior (#12140)
test/integration/env-config/app/pages/ssp.js
@@ -1,35 +0,0 @@ -const variables = [ - 'PROCESS_ENV_KEY', - 'ENV_FILE_KEY', - 'LOCAL_ENV_FILE_KEY', - 'ENV_FILE_LOCAL_OVERRIDE_TEST', - 'PRODUCTION_ENV_FILE_KEY', - 'LOCAL_PRODUCTION_ENV_FILE_KEY', - 'DEVELOPMENT_ENV_FILE_KEY', - 'LOCAL_DEVELOPMENT_ENV_FILE_KEY', - 'ENV_FILE_DEVELOPMENT_OVERRIDE_TEST', - 'EN...
true
Other
vercel
next.js
0a3b64d274dff0eb0bbe8e0c1609815d5bab327c.json
Add tests for dotenv-expand behavior (#12140)
test/integration/env-config/test/index.test.js
@@ -52,6 +52,9 @@ const runTests = (mode = 'dev') => { expect(data.LOCAL_PRODUCTION_ENV_FILE_KEY).toBe( isDev ? undefined : 'localproduction' ) + expect(data.ENV_FILE_EXPANDED).toBe('env') + expect(data.ENV_FILE_EXPANDED_CONCAT).toBe('hello-env') + expect(data.ENV_FILE_EXPANDED_ESCAPED).toBe('...
true
Other
vercel
next.js
39d9476992420bac12751b48d592c79caa9ac8d1.json
Avoid bugs with native Date class (#12098)
examples/blog-starter/components/date-formater.js
@@ -1,6 +1,6 @@ import { parseISO, format } from 'date-fns' -export default function Date({ dateString }) { +export default function DateFormater({ dateString }) { const date = parseISO(dateString) return <time dateTime={dateString}>{format(date, 'LLLL d, yyyy')}</time> }
true
Other
vercel
next.js
39d9476992420bac12751b48d592c79caa9ac8d1.json
Avoid bugs with native Date class (#12098)
examples/blog-starter/components/hero-post.js
@@ -1,5 +1,5 @@ import Avatar from '../components/avatar' -import Date from '../components/date' +import DateFormater from '../components/date-formater' import CoverImage from '../components/cover-image' import Link from 'next/link' @@ -24,7 +24,7 @@ export default function HeroPost({ </Link> ...
true
Other
vercel
next.js
39d9476992420bac12751b48d592c79caa9ac8d1.json
Avoid bugs with native Date class (#12098)
examples/blog-starter/components/post-header.js
@@ -1,5 +1,5 @@ import Avatar from '../components/avatar' -import Date from '../components/date' +import DateFormater from '../components/date-formater' import CoverImage from '../components/cover-image' import PostTitle from '../components/post-title' @@ -18,7 +18,7 @@ export default function PostHeader({ title, ...
true
Other
vercel
next.js
39d9476992420bac12751b48d592c79caa9ac8d1.json
Avoid bugs with native Date class (#12098)
examples/blog-starter/components/post-preview.js
@@ -1,5 +1,5 @@ import Avatar from '../components/avatar' -import Date from '../components/date' +import DateFormater from '../components/date-formater' import CoverImage from './cover-image' import Link from 'next/link' @@ -22,7 +22,7 @@ export default function PostPreview({ </Link> </h3> <...
true
Other
vercel
next.js
47d7eddd0d486a2c6a875cf39fbf7de855c5a946.json
fix(dev-server): render 404 when dynamic ssg path doesn't exist (#12085) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
packages/next/server/next-dev-server.ts
@@ -513,7 +513,11 @@ export default class DevServer extends Server { pathname: string, query: { [key: string]: string } ) { - await this.hotReloader!.ensurePage('/_error') + if (res.statusCode === 404 && (await this.hasPage('/404'))) { + await this.hotReloader!.ensurePage('/404') + } else { +...
true
Other
vercel
next.js
47d7eddd0d486a2c6a875cf39fbf7de855c5a946.json
fix(dev-server): render 404 when dynamic ssg path doesn't exist (#12085) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
test/integration/ssg-dynamic-routes-404-page/pages/404.js
@@ -0,0 +1,2 @@ +const page = () => 'custom 404 page' +export default page
true
Other
vercel
next.js
47d7eddd0d486a2c6a875cf39fbf7de855c5a946.json
fix(dev-server): render 404 when dynamic ssg path doesn't exist (#12085) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
test/integration/ssg-dynamic-routes-404-page/pages/post/[id].js
@@ -0,0 +1,6 @@ +export const getStaticPaths = async () => ({ + paths: ['/post/1'], + fallback: false, +}) +export const getStaticProps = async () => ({ props: {} }) +export default () => 'blog post'
true
Other
vercel
next.js
47d7eddd0d486a2c6a875cf39fbf7de855c5a946.json
fix(dev-server): render 404 when dynamic ssg path doesn't exist (#12085) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
test/integration/ssg-dynamic-routes-404-page/test/index.test.js
@@ -0,0 +1,86 @@ +/* eslint-env jest */ +/* global jasmine */ +import fs from 'fs-extra' +import { join } from 'path' +import { + killApp, + findPort, + launchApp, + nextStart, + nextBuild, + fetchViaHTTP, +} from 'next-test-utils' + +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 + +const appDir = join(__dirna...
true
Other
vercel
next.js
06f379ffadd263a35d0a7d2c2e3c13449a66a2a2.json
Fix typo in example (#12094) Line 4: "...special configuration file `next.js.config` and..." Is it meant to be `next.config.js`?
examples/with-env-from-next-config-js/README.md
@@ -1,7 +1,7 @@ # With env From next.config.js This example demonstrates setting parameters that will be used by your application and set at build time (not run time). -More specifically, what that means, is that environmental variables are programmed into the special configuration file `next.js.config` and then +M...
false
Other
vercel
next.js
906da4c9ec76c0f75b3d7301cf23b3ab6131cb5e.json
Add Additional Test Case for CSS Order in Dev (#12007) * Failing test to demonstrate issue #12004 * Separate position for global vs client scripts. Fixes #12004 * Revert client.ts * Revert global.ts Co-authored-by: Joe Haddad <timer150@gmail.com> Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
test/integration/css/test/index.test.js
@@ -828,6 +828,35 @@ describe('CSS Support', () => { ) expect(currentColor).toMatchInlineSnapshot(`"rgb(0, 0, 255)"`) }) + + it('should have the correct color (css ordering) during hot reloads', async () => { + let browser + try { + browser = await webdriver(appPort, '/') + + ...
false
Other
vercel
next.js
d8c71b1537e6a511c7b21f6f2faef54dc6331855.json
Evaluate App before Page in Dev for CSS Ordering (#12090)
packages/next/build/webpack/config/blocks/css/loaders/client.ts
@@ -17,16 +17,18 @@ export function getClientStyleLoader({ // and prod. To fix this, we render a <noscript> tag as // an anchor for the styles to be placed before. These // styles will be applied _before_ <style jsx global>. - insert: function(element: Element) { + ins...
true
Other
vercel
next.js
d8c71b1537e6a511c7b21f6f2faef54dc6331855.json
Evaluate App before Page in Dev for CSS Ordering (#12090)
packages/next/package.json
@@ -80,7 +80,7 @@ "babel-plugin-transform-define": "2.0.0", "babel-plugin-transform-react-remove-prop-types": "0.4.24", "browserslist": "4.8.3", - "css-loader": "3.3.0", + "css-loader": "3.5.2", "find-cache-dir": "3.3.1", "fork-ts-checker-webpack-plugin": "3.1.1", "jest-worker": "24....
true
Other
vercel
next.js
d8c71b1537e6a511c7b21f6f2faef54dc6331855.json
Evaluate App before Page in Dev for CSS Ordering (#12090)
packages/next/pages/_document.tsx
@@ -492,15 +492,13 @@ export class Head extends Component< /> )} {this.getCssLinks()} - {!disableRuntimeJS && page !== '/_error' && ( + {!disableRuntimeJS && ( <link rel="preload" href={ as...
true
Other
vercel
next.js
d8c71b1537e6a511c7b21f6f2faef54dc6331855.json
Evaluate App before Page in Dev for CSS Ordering (#12090)
test/integration/css-fixtures/global-and-module-ordering/pages/index.js
@@ -1,8 +1,12 @@ -import styles from './index.module.css' +import styles1 from './index.module.css' +import styles2 from './index2.module.css' export default function Home() { return ( - <div id="blueText" className={`${styles.textModule} textGlobal`}> + <div + id="blueText" + className={`${styles...
true
Other
vercel
next.js
d8c71b1537e6a511c7b21f6f2faef54dc6331855.json
Evaluate App before Page in Dev for CSS Ordering (#12090)
test/integration/css-fixtures/global-and-module-ordering/pages/index.module.css
@@ -1,3 +1,3 @@ .textModule { - color: blue; + color: yellow; }
true
Other
vercel
next.js
d8c71b1537e6a511c7b21f6f2faef54dc6331855.json
Evaluate App before Page in Dev for CSS Ordering (#12090)
test/integration/css-fixtures/global-and-module-ordering/pages/index2.module.css
@@ -0,0 +1,3 @@ +.textModule { + color: blue; +}
true
Other
vercel
next.js
d8c71b1537e6a511c7b21f6f2faef54dc6331855.json
Evaluate App before Page in Dev for CSS Ordering (#12090)
yarn.lock
@@ -5622,23 +5622,24 @@ css-loader@1.0.0: postcss-value-parser "^3.3.0" source-list-map "^2.0.0" -css-loader@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.3.0.tgz#65f889807baec3197313965d6cda9899f936734d" - integrity sha512-x9Y1vvHe5RR+4tzwFdWExPueK00uqFTCw7m...
true
Other
vercel
next.js
600b78c098bb9c1d4b6135df146e5948c1baf07f.json
fix postcss.config.js warnings (#12070) * update postcss.config.js to fix warnings Return empty array if the condition is not met to avoid a null/undefined PostCSS plugin. Related PR: https://github.com/zeit/next.js/pull/11366 * style: correct linting error
examples/blog-starter/postcss.config.js
@@ -1,18 +1,21 @@ module.exports = { plugins: [ 'tailwindcss', - process.env.NODE_ENV === 'production' + ...(process.env.NODE_ENV === 'production' ? [ - '@fullhuman/postcss-purgecss', - { - content: [ - './pages/**/*.{js,jsx,ts,tsx}', - './com...
false
Other
vercel
next.js
099471eaec8e86d49d6fa11b3d19defa819b1ed8.json
Fix typo in next/amp docs (#12040)
docs/api-reference/next/amp.md
@@ -22,7 +22,7 @@ export const config = { amp: true } The `amp` config accepts the following values: - `true` - The page will be AMP-only -- `'hybrid'` - The page will two versions, one with AMP and another one with HTML +- `'hybrid'` - The page will have two versions, one with AMP and another one with HTML To l...
false
Other
vercel
next.js
16ee0fe2dcf9fe1ad6ff28b1b93a709aa0cc16e7.json
Add note about polyfilling CSS Grid for IE11. (#12035)
docs/advanced-features/customizing-postcss-config.md
@@ -24,14 +24,15 @@ Out of the box, with no configuration, Next.js compiles CSS with the following t - [Break Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/break-after) - [`font-variant` Property](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant) - [Gap Properties](https://develo...
false
Other
vercel
next.js
b52d7ff323d4e8794971d2f2cb873ff5a8236aaf.json
Add documentation on `next build` output. (#12034)
docs/api-reference/cli.md
@@ -38,3 +38,12 @@ NODE_OPTIONS='--throw-deprecation' next NODE_OPTIONS='-r esm' next NODE_OPTIONS='--inspect' next ``` + +## Build + +`next build` creates an optimized production build of your application. The output displays information about each route. + +- **Size** – The number of assets downloaded when navigat...
false
Other
vercel
next.js
b6f44e66f8d83e5173f969ddd3b0ad9e52f0f6d8.json
Add Heroku to list of cache examples (#12037)
errors/no-cache.md
@@ -105,3 +105,11 @@ Then reference it in the `caches` section of your pipeline's `step`: - node - nextcache ``` + +#### Heroku + +Using Heroku's [custom cache](https://devcenter.heroku.com/articles/nodejs-support#custom-caching), add a `cacheDirectories` array in your top-level package.json: + +```javas...
false
Other
vercel
next.js
73b859d53ec3ab1ad29129b4578fd96ac2ad8650.json
Add `module.hot.invalidate()` to webpack HMR (#12038)
packages/next/build/webpack-config.ts
@@ -156,6 +156,18 @@ export default async function getBaseWebpackConfig( const hasReactRefresh = dev && !isServer && config.experimental.reactRefresh === true + // Inject additional features into webpack HMR runtime + if (hasReactRefresh) { + const injectPath = require.resolve( + 'webpack/lib/HotMod...
true
Other
vercel
next.js
73b859d53ec3ab1ad29129b4578fd96ac2ad8650.json
Add `module.hot.invalidate()` to webpack HMR (#12038)
packages/next/build/webpack/lib/HotModuleReplacement.runtime.js
@@ -0,0 +1,720 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// eslint-disable no-unused-vars +var $hash$ = undefined +var $requestTimeout$ = undefined +var installedModules = undefined +var $require$ = undefined +var hotDownloadManifest = undefined +var hot...
true
Other
vercel
next.js
bc845f2206a6cb5c12838f89656fd649272c92b0.json
Stabilize HMR tests on CI (#12029)
packages/next/client/dev/error-overlay/hot-dev-client.js
@@ -213,6 +213,12 @@ function handleErrors(errors) { // Do not attempt to reload now. // We will reload on next success instead. + if (process.env.__NEXT_TEST_MODE) { + if (self.__NEXT_HMR_CB) { + self.__NEXT_HMR_CB(formatted.errors[0]) + self.__NEXT_HMR_CB = null + } + } } function tryDis...
true
Other
vercel
next.js
bc845f2206a6cb5c12838f89656fd649272c92b0.json
Stabilize HMR tests on CI (#12029)
test/acceptance/helpers.js
@@ -69,7 +69,7 @@ export async function sandbox(id = nanoid()) { console.log('Application re-loaded.') // Slow down tests a bit: - await new Promise(resolve => setTimeout(resolve, 250)) + await new Promise(resolve => setTimeout(resolve, 750)) return false ...
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
.eslintignore
@@ -6,3 +6,4 @@ examples/with-ioc/** examples/with-kea/** packages/next/compiled/**/* packages/react-refresh-utils/**/*.js +**/__tmp__/**
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
.prettierignore
@@ -5,3 +5,4 @@ node_modules packages/next/compiled/** packages/react-refresh-utils/**/*.js packages/react-refresh-utils/**/*.d.ts +**/__tmp__/**
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
package.json
@@ -41,6 +41,7 @@ "@fullhuman/postcss-purgecss": "1.3.0", "@mdx-js/loader": "0.18.0", "@types/cheerio": "0.22.16", + "@types/fs-extra": "8.1.0", "@types/http-proxy": "1.17.3", "@types/jest": "24.0.13", "@types/string-hash": "1.1.1",
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
packages/next/build/entries.ts
@@ -133,7 +133,12 @@ export function createEntrypoints( const pageLoaderOpts: ClientPagesLoaderOptions = { page, absolutePagePath, - hotRouterUpdates: dev, // Hot router updates only apply in development mode + hotRouterUpdates: + // Hot router updates only apply in devel...
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
packages/next/build/webpack-config.ts
@@ -1,3 +1,4 @@ +import ReactRefreshWebpackPlugin from '@next/react-refresh-utils/ReactRefreshWebpackPlugin' import crypto from 'crypto' import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin' import { readFileSync } from 'fs' @@ -151,6 +152,10 @@ export default async function getBaseWebpackConfig( ...
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
packages/next/build/webpack/loaders/next-babel-loader.js
@@ -1,10 +1,10 @@ import babelLoader from 'next/dist/compiled/babel-loader' -import { basename, join } from 'path' import hash from 'next/dist/compiled/string-hash' +import { basename, join } from 'path' -// increment 'j' to invalidate cache +// increment 'k' to invalidate cache // eslint-disable-next-line no-usel...
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
packages/next/build/webpack/plugins/build-manifest-plugin.ts
@@ -6,6 +6,7 @@ import { CLIENT_STATIC_FILES_PATH, CLIENT_STATIC_FILES_RUNTIME_MAIN, CLIENT_STATIC_FILES_RUNTIME_POLYFILLS, + CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH, IS_BUNDLED_PAGE_REGEX, ROUTE_NAME_REGEX, } from '../../../next-server/lib/constants' @@ -79,6 +80,11 @@ export default class BuildMani...
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
packages/next/client/dev/error-overlay/hot-dev-client.js
@@ -26,12 +26,12 @@ // can be found here: // https://github.com/facebook/create-react-app/blob/v3.4.1/packages/react-dev-utils/webpackHotDevClient.js -import { getEventSourceWrapper } from './eventsource' -import formatWebpackMessages from './format-webpack-messages' +import fetch from 'next/dist/build/polyfills/un...
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
packages/next/next-server/lib/constants.ts
@@ -21,6 +21,8 @@ export const AMP_RENDER_TARGET = '__NEXT_AMP_RENDER_TARGET__' export const CLIENT_STATIC_FILES_RUNTIME_PATH = `${CLIENT_STATIC_FILES_PATH}/${CLIENT_STATIC_FILES_RUNTIME}` // static/runtime/main.js export const CLIENT_STATIC_FILES_RUNTIME_MAIN = `${CLIENT_STATIC_FILES_RUNTIME_PATH}/main.js` +// stat...
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
packages/next/next-server/server/config.ts
@@ -55,6 +55,7 @@ const defaultConfig: { [key: string]: any } = { sassOptions: {}, pageEnv: false, measureFid: false, + reactRefresh: false, }, future: { excludeDefaultMomentLocales: false,
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
packages/next/package.json
@@ -75,6 +75,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/types": "7.7.4", + "@next/react-refresh-utils": "9.3.6-canary.4", "babel-plugin-syntax-jsx": "6.18.0", "babel-plugin-transform-define": "2.0.0", "babel-plugin-transform-react-remove-prop-types": "0...
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
packages/next/server/hot-reloader.ts
@@ -14,6 +14,7 @@ import { recursiveDelete } from '../lib/recursive-delete' import { BLOCKED_PAGES, CLIENT_STATIC_FILES_RUNTIME_AMP, + CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH, IS_BUNDLED_PAGE_REGEX, ROUTE_NAME_REGEX, } from '../next-server/lib/constants' @@ -268,6 +269,10 @@ export default class HotRel...
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
test/acceptance/.gitignore
@@ -0,0 +1 @@ +**/__tmp__/**
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
test/acceptance/ReactRefresh.test.js
@@ -0,0 +1,60 @@ +/* global jasmine */ +/* eslint-env jest */ +import { sandbox } from './helpers' + +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5 + +test('basic: can edit a component without losing state', async () => { + const [session, cleanup] = await sandbox() + + await session.patch( + 'index.js', + `...
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
test/acceptance/helpers.js
@@ -0,0 +1,115 @@ +import * as fs from 'fs-extra' +import nanoid from 'nanoid' +import { findPort, killApp, launchApp } from 'next-test-utils' +import webdriver from 'next-webdriver' +import path from 'path' + +const rootSandboxDirectory = path.join(__dirname, '__tmp__') + +export async function sandbox(id = nanoid()) ...
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
test/acceptance/next.config.js
@@ -0,0 +1,5 @@ +module.exports = { + experimental: { + reactRefresh: true, + }, +}
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
test/lib/next-webdriver.d.ts
@@ -1,5 +1,5 @@ interface Chain { - elementByCss: () => Chain + elementByCss: (selector: string) => Chain elementById: () => Chain getValue: () => Chain text: () => Chain
true
Other
vercel
next.js
450d4bd0f32a042fd452c81bc3850ec31306eab3.json
Experimental: React Refresh Support (#12008) * Add Fast Refresh Support * Add Basic Acceptance Test * Increase delay * fix version * Ignore test files * Update packages/next/build/webpack/loaders/next-babel-loader.js * Copy tests * Redo test style * drop directory * fix compile * fix remove function * Updat...
yarn.lock
@@ -2603,6 +2603,13 @@ resolved "https://registry.yarnpkg.com/@types/fresh/-/fresh-0.5.0.tgz#4d09231027d69c4369cfb01a9af5ef083d0d285f" integrity sha512-eGPzuyc6wZM3sSHJdF7NM2jW6B/xsB014Rqg/iDa6xY02mlfy1w/TE2sYhR8vbHxkzJOXiGo6NuIk3xk35vsgQ== +"@types/fs-extra@8.1.0": + version "8.1.0" + resolved "https://regis...
true
Other
vercel
next.js
4619996d4e854126e63a59bf501c14b3298dafff.json
Resolve TypeScript Extension in Correct Order (#12014)
packages/next/build/webpack-config.ts
@@ -247,17 +247,17 @@ export default async function getBaseWebpackConfig( // Disable .mjs for node_modules bundling extensions: isServer ? [ - ...(useTypeScript ? ['.tsx', '.ts'] : []), '.js', '.mjs', + ...(useTypeScript ? ['.tsx', '.ts'] : []), '.jsx'...
true
Other
vercel
next.js
4619996d4e854126e63a59bf501c14b3298dafff.json
Resolve TypeScript Extension in Correct Order (#12014)
test/integration/typescript/extension-order/js-first.js
@@ -0,0 +1 @@ +export const value = 'OK'
true
Other
vercel
next.js
4619996d4e854126e63a59bf501c14b3298dafff.json
Resolve TypeScript Extension in Correct Order (#12014)
test/integration/typescript/extension-order/js-first.ts
@@ -0,0 +1 @@ +export const value = 'WRONG FILE'
true
Other
vercel
next.js
4619996d4e854126e63a59bf501c14b3298dafff.json
Resolve TypeScript Extension in Correct Order (#12014)
test/integration/typescript/pages/hello.tsx
@@ -1,9 +1,10 @@ -import React from 'react' import { useRouter } from 'next/router' +import React from 'react' import { hello } from '../components/hello' -import { World } from '../components/world' -import Router from '../components/router' import Link from '../components/link' +import Router from '../components/r...
true
Other
vercel
next.js
4619996d4e854126e63a59bf501c14b3298dafff.json
Resolve TypeScript Extension in Correct Order (#12014)
test/integration/typescript/test/index.test.js
@@ -46,6 +46,11 @@ describe('TypeScript Features', () => { expect($('body').text()).toMatch(/1000000000000/) }) + it('should resolve files in correct order', async () => { + const $ = await get$('/hello') + expect($('#imported-value').text()).toBe('OK') + }) + it('should report type c...
true
Other
vercel
next.js
4b3967fa100bf5255a0e22f9a6a125b498cbf9ea.json
examples/with-react-helmet: upgrade react-helmet to v6.0.0 (#12000)
examples/with-react-helmet/package.json
@@ -11,6 +11,6 @@ "next": "latest", "react": "^16.7.0", "react-dom": "^16.7.0", - "react-helmet": "^5.1.3" + "react-helmet": "^6.0.0" } }
true
Other
vercel
next.js
4b3967fa100bf5255a0e22f9a6a125b498cbf9ea.json
examples/with-react-helmet: upgrade react-helmet to v6.0.0 (#12000)
examples/with-react-helmet/pages/_app.js
@@ -1,5 +1,5 @@ import React from 'react' -import Helmet from 'react-helmet' +import { Helmet } from 'react-helmet' function MyApp({ Component, pageProps }) { return (
true
Other
vercel
next.js
4b3967fa100bf5255a0e22f9a6a125b498cbf9ea.json
examples/with-react-helmet: upgrade react-helmet to v6.0.0 (#12000)
examples/with-react-helmet/pages/_document.js
@@ -1,5 +1,5 @@ import Document, { Head, Main, NextScript } from 'next/document' -import Helmet from 'react-helmet' +import { Helmet } from 'react-helmet' export default class extends Document { static async getInitialProps(...args) {
true
Other
vercel
next.js
4b3967fa100bf5255a0e22f9a6a125b498cbf9ea.json
examples/with-react-helmet: upgrade react-helmet to v6.0.0 (#12000)
examples/with-react-helmet/pages/about.js
@@ -1,5 +1,5 @@ import React from 'react' -import Helmet from 'react-helmet' +import { Helmet } from 'react-helmet' export default function About() { return (
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
.eslintignore
@@ -4,4 +4,5 @@ node_modules **/dist/** examples/with-ioc/** examples/with-kea/** -packages/next/compiled/**/* \ No newline at end of file +packages/next/compiled/**/* +packages/react-refresh-utils/**/*.js
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
.prettierignore
@@ -2,4 +2,6 @@ node_modules **/.next/** **/_next/** **/dist/** -packages/next/compiled/** \ No newline at end of file +packages/next/compiled/** +packages/react-refresh-utils/**/*.js +packages/react-refresh-utils/**/*.d.ts
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
packages/react-refresh-utils/.gitignore
@@ -0,0 +1,2 @@ +*.d.ts +*.js
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
packages/react-refresh-utils/README.md
@@ -0,0 +1,17 @@ +# `@next/react-refresh-utils` + +This is an **experimental** package that provides utilities for React Refresh. + +Its API is not stable as that of Next.js, nor does it follow semver rules. + +**Use it at your own risk**. + +## Usage + +All entrypoints below must wired into your build tooling for this...
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
packages/react-refresh-utils/ReactRefreshWebpackPlugin.ts
@@ -0,0 +1,69 @@ +import { Compiler, Template, version } from 'webpack' + +function webpack4(compiler: Compiler) { + // Webpack 4 does not have a method to handle interception of module + // execution. + // The closest thing we have to emulating this is mimicking the behavior of + // `strictModuleExceptionHandling`...
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts
@@ -0,0 +1,72 @@ +import { RefreshRuntimeGlobals } from '../runtime' + +declare const self: Window & RefreshRuntimeGlobals + +type Dictionary = { [key: string]: unknown } +declare const module: { + id: string + __proto__: { exports: unknown } + hot: { + accept: () => void + dispose: (onDispose: (data: Dictiona...
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
packages/react-refresh-utils/internal/helpers.ts
@@ -0,0 +1,151 @@ +/** + * MIT License + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including withou...
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
packages/react-refresh-utils/loader.ts
@@ -0,0 +1,17 @@ +import { loader } from 'webpack' +import RefreshModuleRuntime from './internal/ReactRefreshModule.runtime' + +let refreshModuleRuntime = RefreshModuleRuntime.toString() +refreshModuleRuntime = refreshModuleRuntime.slice( + refreshModuleRuntime.indexOf('{') + 1, + refreshModuleRuntime.lastIndexOf('}'...
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
packages/react-refresh-utils/package.json
@@ -0,0 +1,30 @@ +{ + "name": "@next/react-refresh-utils", + "version": "9.3.6-canary.3", + "description": "An experimental package providing utilities for React Refresh.", + "repository": { + "url": "zeit/next.js", + "directory": "packages/react-refresh-utils" + }, + "files": [ + "internal/*.d.ts", + ...
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
packages/react-refresh-utils/runtime.ts
@@ -0,0 +1,39 @@ +import RefreshRuntime from 'react-refresh/runtime' +import RefreshHelpers from './internal/helpers' + +export type RefreshRuntimeGlobals = { + $RefreshReg$: (type: unknown, id: string) => void + $RefreshSig$: () => (type: unknown) => unknown + $RefreshInterceptModuleExecution$: (moduleId: string) =...
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
packages/react-refresh-utils/tsconfig.json
@@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "target": "es3", + "lib": ["dom"], + "downlevelIteration": true, + "preserveWatchOutput": true + }, + "include": ["**/*.ts"], + "exclude": ["node_modules"] +}
true
Other
vercel
next.js
ec3f8e5815d2108b6ab5123a8813db465babff5d.json
Create React Refresh Utils (#12006) * Create React Refresh Utils * Fix Linting * Update Prettier Ignore * fix rules
yarn.lock
@@ -13976,6 +13976,11 @@ react-is@^16.8.1, react-is@^16.8.4: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== +react-refresh@0.8.1: + version...
true
Other
vercel
next.js
28ca0a70866a19b3c4b79b7799661cb8bb19b004.json
Add API route to default CNA template (#11981)
packages/create-next-app/templates/default/pages/api/hello.js
@@ -0,0 +1,6 @@ +// Next.js API route support: https://nextjs.org/docs/api-routes/introduction + +export default (req, res) => { + res.statusCode = 200 + res.json({ name: 'John Doe' }) +}
false
Other
vercel
next.js
0e915b118d5e1e28ab8a351c6a225a277834c561.json
Add Missing Hook for MainTemplate (#11984)
packages/next/types/webpack.d.ts
@@ -1044,6 +1044,7 @@ declare module 'webpack' { class MainTemplate extends Tapable { hooks: { jsonpScript?: SyncWaterfallHook<string, Chunk, string> + require: SyncWaterfallHook<string, Chunk, string> requireExtensions: SyncWaterfallHook<string, Chunk, string> } ...
false
Other
vercel
next.js
5e23e3545655307576e7d2f827ba2b402889d69d.json
Add missin create permission for faunadb example (#10575)
examples/with-graphql-faunadb/scripts/setup.js
@@ -52,7 +52,7 @@ readline.question(`Please provide the FaunaDB admin key\n`, adminKey => { privileges: [ { resource: q.Collection('GuestbookEntry'), - actions: { read: true, write: true }, + actions: { read: true, write: true, create: true }, ...
false
Other
vercel
next.js
3a1aa554c5fa5a95e2b4d408c1cbfee69f201cc1.json
Enable pages/404.js support (#10572)
packages/next/next-server/server/config.ts
@@ -53,7 +53,7 @@ const defaultConfig: { [key: string]: any } = { workerThreads: false, basePath: '', static404: true, - pages404: false, + pages404: true, }, future: { excludeDefaultMomentLocales: false,
false
Other
vercel
next.js
162f11c0c0541a4d7c92fc4a53decd9ac9e6747d.json
Add extra profiling app (#10568) Just another app that I’ve been using for analysis
test/integration/bundle-size-profiling/next.config.js
@@ -0,0 +1,22 @@ +module.exports = { + experimental: { + polyfillsOptimization: true, + }, + webpack(config, options) { + if (!options.isServer) { + config.profile = true + const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') + config.plugins.push( + new BundleAnalyzerPlugi...
true
Other
vercel
next.js
162f11c0c0541a4d7c92fc4a53decd9ac9e6747d.json
Add extra profiling app (#10568) Just another app that I’ve been using for analysis
test/integration/bundle-size-profiling/pages/index.js
@@ -0,0 +1 @@ +export default () => 'Hello World'
true
Other
vercel
next.js
88b1fe50c52618c82d646b7b04832e9be3b53d36.json
Remove react import in create-next-app template (#10564)
.eslintrc.json
@@ -76,7 +76,11 @@ } }, { - "files": ["test/**/*", "examples/**/*"], + "files": [ + "test/**/*", + "examples/**/*", + "packages/create-next-app/templates/**/*" + ], "rules": { "react/react-in-jsx-scope": "off" } } ],
true
Other
vercel
next.js
88b1fe50c52618c82d646b7b04832e9be3b53d36.json
Remove react import in create-next-app template (#10564)
packages/create-next-app/templates/default/pages/index.js
@@ -1,4 +1,3 @@ -import React from 'react' import Head from 'next/head' const Home = () => (
true
Other
vercel
next.js
3f691eaa45e8f802f9977ff050f66ac64f016e74.json
Remove ts-ignore where possible (#10541) * Remove ts-ignore where possible And replace by typecasts * More accurate types * bend cliententries in a correct shape earlier on * comment becomes unnecessary * add webpack overload to allow for the next.js use case * Avoid changing public interface Co-authored-by: Jo...
packages/next/build/babel/plugins/react-loadable-plugin.ts
@@ -85,8 +85,6 @@ export default function({ types: t }: { types: typeof BabelTypes }): PluginObj { callExpression.node.arguments.push(t.objectExpression([])) } // This is needed as the code is modified above - // TODO: remove ignore statement - // @ts-ignor...
true
Other
vercel
next.js
3f691eaa45e8f802f9977ff050f66ac64f016e74.json
Remove ts-ignore where possible (#10541) * Remove ts-ignore where possible And replace by typecasts * More accurate types * bend cliententries in a correct shape earlier on * comment becomes unnecessary * add webpack overload to allow for the next.js use case * Avoid changing public interface Co-authored-by: Jo...
packages/next/build/compiler.ts
@@ -26,7 +26,6 @@ export function runCompiler( config: webpack.Configuration | webpack.Configuration[] ): Promise<CompilerResult> { return new Promise(async (resolve, reject) => { - // @ts-ignore webpack allows both a single config or array of configs const compiler = webpack(config) compiler.run((e...
true
Other
vercel
next.js
3f691eaa45e8f802f9977ff050f66ac64f016e74.json
Remove ts-ignore where possible (#10541) * Remove ts-ignore where possible And replace by typecasts * More accurate types * bend cliententries in a correct shape earlier on * comment becomes unnecessary * add webpack overload to allow for the next.js use case * Avoid changing public interface Co-authored-by: Jo...
packages/next/build/webpack-config.ts
@@ -1,7 +1,6 @@ import crypto from 'crypto' import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin' import path from 'path' -// @ts-ignore: Currently missing types import PnpWebpackPlugin from 'pnp-webpack-plugin' import webpack from 'webpack' import { @@ -29,7 +28,6 @@ import { } from './plugins...
true
Other
vercel
next.js
3f691eaa45e8f802f9977ff050f66ac64f016e74.json
Remove ts-ignore where possible (#10541) * Remove ts-ignore where possible And replace by typecasts * More accurate types * bend cliententries in a correct shape earlier on * comment becomes unnecessary * add webpack overload to allow for the next.js use case * Avoid changing public interface Co-authored-by: Jo...
packages/next/build/webpack/plugins/webpack-conformance-plugin/index.ts
@@ -88,16 +88,17 @@ export default class WebpackConformancePlugin { private parserHandler = (factory: compilation.NormalModuleFactory): void => { const JS_TYPES = ['auto', 'esm', 'dynamic'] const collectedVisitors: Map<string, [NodeInspector?]> = new Map() - // Collect all intereseted visitors from all ...
true
Other
vercel
next.js
3f691eaa45e8f802f9977ff050f66ac64f016e74.json
Remove ts-ignore where possible (#10541) * Remove ts-ignore where possible And replace by typecasts * More accurate types * bend cliententries in a correct shape earlier on * comment becomes unnecessary * add webpack overload to allow for the next.js use case * Avoid changing public interface Co-authored-by: Jo...
packages/next/client/link.tsx
@@ -161,8 +161,7 @@ class Link extends Component<LinkProps> { }) linkClicked = (e: React.MouseEvent) => { - // @ts-ignore target exists on currentTarget - const { nodeName, target } = e.currentTarget + const { nodeName, target } = e.currentTarget as HTMLAnchorElement if ( nodeName === 'A' &...
true