Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/canary' into feat/vercel#50285-…
Browse files Browse the repository at this point in the history
…server-only-deps
  • Loading branch information
AlessioGr committed May 8, 2024
2 parents 3ff6b10 + 5ff2731 commit e441c00
Show file tree
Hide file tree
Showing 327 changed files with 4,439 additions and 3,062 deletions.
41 changes: 22 additions & 19 deletions .github/actions/next-integration-stat/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,29 +447,32 @@ async function getTestResultDiffBase(

// Find the latest test result tree, iterate results file names to find out the latest one.
// Filename follow ${yyyyMMddHHmm}-${sha}.json format.
const actualTestResultTree = testResultJsonTree.reduce((acc, value) => {
const dateStr = value.path?.split('-')[0].match(/(....)(..)(..)(..)(..)/)
const actualTestResultTree = testResultJsonTree.reduce(
(acc, value) => {
const dateStr = value.path?.split('-')[0].match(/(....)(..)(..)(..)(..)/)

if (!dateStr || dateStr.length < 5) {
return acc
}
if (!dateStr || dateStr.length < 5) {
return acc
}

const date = new Date(
dateStr![1] as any,
(dateStr![2] as any) - 1,
dateStr![3] as any,
dateStr![4] as any,
dateStr![5] as any
)
if (!acc) {
return {
date,
value,
const date = new Date(
dateStr![1] as any,
(dateStr![2] as any) - 1,
dateStr![3] as any,
dateStr![4] as any,
dateStr![5] as any
)
if (!acc) {
return {
date,
value,
}
}
}

return acc.date >= date ? acc : { date, value }
}, null as any as { date: Date; value: (typeof testResultJsonTree)[0] })
return acc.date >= date ? acc : { date, value }
},
null as any as { date: Date; value: (typeof testResultJsonTree)[0] }
)

if (!actualTestResultTree || !actualTestResultTree?.value?.sha) {
console.log('There is no test results json stored in the base yet')
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/next-stats-action/src/add-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ module.exports = async function addComment(
? '⚠️ '
: ''
: change > 0
? '⚠️ '
: ''
? '⚠️ '
: ''
change = `${warn}${change < 0 ? '-' : '+'}${
useRawValue ? absChange : prettify(absChange, prettyType)
}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ function loadStatsConfig() {
for (const configPath of allowedConfigLocations) {
try {
relativeStatsAppDir = configPath
statsConfig = require(path.join(
diffRepoDir,
configPath,
'stats-config.js'
))
statsConfig = require(
path.join(diffRepoDir, configPath, 'stats-config.js')
)
break
} catch (err) {
if (err.code !== 'MODULE_NOT_FOUND') {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
- run: turbo run get-test-timings -- --build ${{ github.sha }}

- run: /bin/bash -c "${{ inputs.afterBuild }}"
timeout-minutes: 15
timeout-minutes: 30

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
9 changes: 8 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
_next/
__tmp__/
dist/
node_modules/
target/
compiled/

Expand All @@ -19,6 +18,14 @@ packages/next/src/bundles/webpack/packages/lazy-compilation-*.js

packages/next-swc/crates/**/tests/**/output*
packages/next-swc/crates/core/tests/loader/issue-32553/input.js
# prettier destroys the directives here
packages/next-swc/crates/next-custom-transforms/tests/errors/react-server-components/client-graph/use-client/input.js
packages/next-swc/crates/next-custom-transforms/tests/errors/react-server-components/server-graph/fake-client-entry/input.js
packages/next-swc/crates/next-custom-transforms/tests/errors/server-actions/server-graph/8/input.js
packages/next-swc/crates/next-custom-transforms/tests/errors/server-actions/server-graph/9/input.js
packages/next-swc/crates/next-custom-transforms/tests/fixture/optimize-barrel/normal/4/input.js
packages/next-swc/crates/next-custom-transforms/tests/fixture/react-server-components/client-graph/client-entry/input.js
packages/next-swc/crates/next-custom-transforms/tests/fixture/react-server-components/server-graph/client-entry/input.js
packages/next-swc/native/**/*
packages/next-swc/docs/assets/**/*

Expand Down
17 changes: 0 additions & 17 deletions .prettierignore_staged

This file was deleted.

Loading

0 comments on commit e441c00

Please sign in to comment.