Skip to content

Commit

Permalink
Merge branch 'canary' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
jyunhanlin authored Jul 10, 2023
2 parents e771a9f + 922498e commit da3ca11
Show file tree
Hide file tree
Showing 877 changed files with 21,876 additions and 15,876 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ body:
label: Which area(s) of Next.js are affected? (leave empty if unsure)
multiple: true
options:
- 'App directory (appDir: true)'
- 'App Router'
- 'CLI (create-next-app)'
- 'Data fetching (gS(S)P, getInitialProps)'
- 'Dynamic imports (next/dynamic)'
Expand All @@ -37,7 +37,7 @@ body:
- 'Internationalization (i18n)'
- 'Jest (next/jest)'
- 'MDX (@next/mdx)'
- 'Metadata (metadata, generateMetadata, next/head, head.js)'
- 'Metadata (metadata, generateMetadata, next/head)'
- 'Middleware / Edge (API routes, runtime)'
- 'Operating System (Windows, MacOS, Linux)'
- 'Package manager (npm, pnpm, Yarn)'
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/next-stats-action/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
let mainRef = statsConfig.mainBranch

if (actionInfo.isRelease) {
logger('Release detected, using last stable tag')
logger(`Release detected, using last stable tag: "${actionInfo.prRef}"`)
const lastStableTag = await getLastStable(diffRepoDir, actionInfo.prRef)
mainRef = lastStableTag
mainNextSwcVersion = lastStableTag
if (!lastStableTag) throw new Error('failed to get last stable tag')
console.log('using latestStable', lastStableTag)
logger(`using latestStable: "${lastStableTag}"`)

/* eslint-disable-next-line */
actionInfo.lastStableTag = lastStableTag
Expand Down
11 changes: 8 additions & 3 deletions .github/actions/next-stats-action/src/prepare/repo-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@ module.exports = (actionInfo) => {
const tag = stdout.trim()

if (!tag || !tag.startsWith('v')) {
throw new Error(`Failed to get tag info ${stdout}`)
throw new Error(`Failed to get tag info: "${stdout}"`)
}
const [major, minor, patch] = tag.split('-canary')[0].split('.')
if (!major || !minor || !patch) {
throw new Error(
`Failed to split tag into major/minor/patch: "${stdout}"`
)
}
const tagParts = tag.split('-canary')[0].split('.')
// last stable tag will always be 1 patch less than canary
return `${tagParts[0]}.${tagParts[1]}.${Number(tagParts[2]) - 1}`
return `${major}.${minor}.${Number(patch) - 1}`
},
async getCommitId(repoDir = '') {
const { stdout } = await exec(`cd ${repoDir} && git rev-parse HEAD`)
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/validate-docs-links/lib/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit da3ca11

Please sign in to comment.