Unverified Commit bdcca0cc authored by JJ Kasper's avatar JJ Kasper Committed by GitHub
parent 1660fdfc
...@@ -418,9 +418,6 @@ jobs: ...@@ -418,9 +418,6 @@ jobs:
NEXT_TELEMETRY_DISABLED: 1 NEXT_TELEMETRY_DISABLED: 1
VERCEL_TEST_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
VERCEL_TEST_TEAM: vtest314-next-e2e-tests VERCEL_TEST_TEAM: vtest314-next-e2e-tests
# run all tests so we can see all failures even if
# some flake or aren't patched yet
NEXT_TEST_CONTINUE_ON_ERROR: 1
steps: steps:
- uses: actions/cache@v3 - uses: actions/cache@v3
timeout-minutes: 5 timeout-minutes: 5
...@@ -439,7 +436,7 @@ jobs: ...@@ -439,7 +436,7 @@ jobs:
- run: RESET_VC_PROJECT=true node scripts/reset-vercel-project.mjs - run: RESET_VC_PROJECT=true node scripts/reset-vercel-project.mjs
name: Reset test project name: Reset test project
- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e >> /proc/1/fd/1" - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} NEXT_TEST_CONTINUE_ON_ERROR=1 xvfb-run node run-tests.js --type e2e >> /proc/1/fd/1"
name: Run test/e2e (deploy) name: Run test/e2e (deploy)
- name: Upload test trace - name: Upload test trace
......
...@@ -39,21 +39,36 @@ declare global { ...@@ -39,21 +39,36 @@ declare global {
const __webpack_require__: any const __webpack_require__: any
} }
// eslint-disable-next-line no-undef const addChunkSuffix =
const getChunkScriptFilename = __webpack_require__.u (getOriginalChunk: (chunkId: any) => string) => (chunkId: any) => {
const chunkFilenameMap: any = {}
// eslint-disable-next-line no-undef
__webpack_require__.u = (chunkId: any) => {
return ( return (
encodeURI(chunkFilenameMap[chunkId] || getChunkScriptFilename(chunkId)) + getOriginalChunk(chunkId) +
`${ `${
process.env.__NEXT_DEPLOYMENT_ID process.env.__NEXT_DEPLOYMENT_ID
? `?dpl=${process.env.__NEXT_DEPLOYMENT_ID}` ? `?dpl=${process.env.__NEXT_DEPLOYMENT_ID}`
: '' : ''
}` }`
) )
} }
// eslint-disable-next-line no-undef
const getChunkScriptFilename = __webpack_require__.u
const chunkFilenameMap: any = {}
// eslint-disable-next-line no-undef
__webpack_require__.u = addChunkSuffix((chunkId) =>
encodeURI(chunkFilenameMap[chunkId] || getChunkScriptFilename(chunkId))
)
// eslint-disable-next-line no-undef
const getChunkCssFilename = __webpack_require__.k
// eslint-disable-next-line no-undef
__webpack_require__.k = addChunkSuffix(getChunkCssFilename)
// eslint-disable-next-line no-undef
const getMiniCssFilename = __webpack_require__.miniCssF
// eslint-disable-next-line no-undef
__webpack_require__.miniCssF = addChunkSuffix(getMiniCssFilename)
// Ignore the module ID transform in client. // Ignore the module ID transform in client.
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
......
...@@ -63,20 +63,32 @@ declare global { ...@@ -63,20 +63,32 @@ declare global {
} }
} }
// ensure dynamic imports have deployment id added if enabled const addChunkSuffix =
const getChunkScriptFilename = __webpack_require__.u (getOriginalChunk: (chunkId: any) => string) => (chunkId: any) => {
// eslint-disable-next-line no-undef
__webpack_require__.u = (chunkId: any) => {
return ( return (
getChunkScriptFilename(chunkId) + getOriginalChunk(chunkId) +
`${ `${
process.env.__NEXT_DEPLOYMENT_ID process.env.__NEXT_DEPLOYMENT_ID
? `?dpl=${process.env.__NEXT_DEPLOYMENT_ID}` ? `?dpl=${process.env.__NEXT_DEPLOYMENT_ID}`
: '' : ''
}` }`
) )
} }
// ensure dynamic imports have deployment id added if enabled
const getChunkScriptFilename = __webpack_require__.u
// eslint-disable-next-line no-undef
__webpack_require__.u = addChunkSuffix(getChunkScriptFilename)
// eslint-disable-next-line no-undef
const getChunkCssFilename = __webpack_require__.k
// eslint-disable-next-line no-undef
__webpack_require__.k = addChunkSuffix(getChunkCssFilename)
// eslint-disable-next-line no-undef
const getMiniCssFilename = __webpack_require__.miniCssF
// eslint-disable-next-line no-undef
__webpack_require__.miniCssF = addChunkSuffix(getMiniCssFilename)
type RenderRouteInfo = PrivateRouteInfo & { type RenderRouteInfo = PrivateRouteInfo & {
App: AppComponent App: AppComponent
......
import styles from './data.module.css'
export const data = { export const data = {
now: Date.now(), now: Date.now(),
styles,
} }
module.exports = {
experimental: {
useDeploymentId: true,
},
}
import testImage from '../public/test.jpg' import testImage from '../public/test.jpg'
import Image from 'next/image' import Image from 'next/image'
import styles from './styles.module.css'
export default function Page() { export default function Page() {
return ( return (
<> <>
<p>hello pages</p> <p className={styles.template}>hello pages</p>
<Image src={testImage} alt="test image" /> <Image src={testImage} alt="test image" />
<button <button
......
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"plugins": [
{
"name": "next"
}
],
"strictNullChecks": true
},
"include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
...@@ -11,11 +11,6 @@ createNextDescribe( ...@@ -11,11 +11,6 @@ createNextDescribe(
env: { env: {
NEXT_DEPLOYMENT_ID: deploymentId, NEXT_DEPLOYMENT_ID: deploymentId,
}, },
nextConfig: {
experimental: {
useDeploymentId: true,
},
},
}, },
({ next }) => { ({ next }) => {
it.each([ it.each([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment