Skip to content

Commit

Permalink
Merge branch 'canary' into hotfix/build-id
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Jan 9, 2020
2 parents 14f0fad + 345efa3 commit 156d426
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/next/build/utils.ts
Expand Up @@ -172,7 +172,7 @@ export async function printTreeView(
// Re-add `static/` for root files
.replace(/^<buildId>/, 'static')
// Remove file hash
.replace(/[.-][0-9a-z]{20}(?=\.)/, '')
.replace(/[.-]([0-9a-z]{6})[0-9a-z]{14}(?=\.)/, '.$1')

messages.push([
` ${innerSymbol} ${cleanName}`,
Expand Down
3 changes: 1 addition & 2 deletions packages/next/taskfile-babel.js
Expand Up @@ -10,7 +10,6 @@ module.exports = function(task) {
const options = {
...babelOpts,
compact: true,
comments: false,
babelrc: false,
configFile: false,
filename: file.base,
Expand All @@ -31,7 +30,7 @@ module.exports = function(task) {
// Workaround for noop.js loading
if (file.base === 'next-dev.js') {
output.code = output.code.replace(
'__REPLACE_NOOP_IMPORT__',
/__REPLACE_NOOP_IMPORT__/g,
`import('./dev/noop');`
)
}
Expand Down
16 changes: 8 additions & 8 deletions test/integration/build-output/test/index.test.js
Expand Up @@ -24,8 +24,8 @@ describe('Build Output', () => {

expect(stdout).toMatch(/\/ [ ]* \d{1,} B/)
expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/)
expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/)
expect(stdout).toMatch(/ runtime\/main\.[0-9a-z]{6}\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.[0-9a-z]{6}\.js [ 0-9. ]* kB/)

expect(stdout).not.toContain(' /_document')
expect(stdout).not.toContain(' /_app')
Expand All @@ -51,8 +51,8 @@ describe('Build Output', () => {
expect(stdout).toMatch(/\/ [ ]* \d{1,} B/)
expect(stdout).toMatch(/\/_app [ ]* \d{1,} B/)
expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/)
expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/)
expect(stdout).toMatch(/ runtime\/main\.[0-9a-z]{6}\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.[0-9a-z]{6}\.js [ 0-9. ]* kB/)

expect(stdout).not.toContain(' /_document')
expect(stdout).not.toContain(' /_error')
Expand All @@ -79,8 +79,8 @@ describe('Build Output', () => {
expect(stdout).toMatch(/\/amp .* AMP/)
expect(stdout).toMatch(/\/hybrid [ 0-9.]* B/)
expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/)
expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/)
expect(stdout).toMatch(/ runtime\/main\.[0-9a-z]{6}\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.[0-9a-z]{6}\.js [ 0-9. ]* kB/)

expect(stdout).not.toContain(' /_document')
expect(stdout).not.toContain(' /_error')
Expand All @@ -105,8 +105,8 @@ describe('Build Output', () => {
expect(stdout).toMatch(/\/ [ ]* \d{1,} B/)
expect(stdout).toMatch(/λ \/_error [ ]* \d{1,} B/)
expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/)
expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/)
expect(stdout).toMatch(/ runtime\/main\.[0-9a-z]{6}\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.[0-9a-z]{6}\.js [ 0-9. ]* kB/)

expect(stdout).not.toContain(' /_document')
expect(stdout).not.toContain(' /_app')
Expand Down

0 comments on commit 156d426

Please sign in to comment.