forked from redwoodjs/redwood
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:redwoodjs/redwood into try/dbauth-s…
…sr-updated * 'main' of github.com:redwoodjs/redwood: (80 commits) fix(deps): update dependency @fastify/http-proxy to v9.3.0 (redwoodjs#9451) fix(deps): update dependency @fastify/static to v6.12.0 (redwoodjs#9452) chore: migrate type tests to TSTyche (redwoodjs#9394) fix(deps): update dependency @testing-library/user-event to v14.5.1 (redwoodjs#9455) fix(deps): update dependency @vitejs/plugin-react to v4.1.1 (redwoodjs#9456) fix(deps): update dependency pino to v8.16.1 (redwoodjs#9459) fix(deps): update dependency firebase-admin to v11.11.0 (redwoodjs#9458) chore(deps): update dependency firebase to v10.6.0 (redwoodjs#9449) fix(deps): update dependency @fastify/url-data to v5.4.0 (redwoodjs#9453) fix(deps): update dependency @simplewebauthn/browser to v7.4.0 (redwoodjs#9454) chore(deps): update actions/setup-node action to v4 (redwoodjs#9461) chore(deps): update actions/checkout action to v4 (redwoodjs#9460) fix(deps): update dependency @graphql-yoga/plugin-graphql-sse to v2.0.5 (redwoodjs#9440) fix(deps): update prisma monorepo to v5.6.0 (redwoodjs#9447) fix(deps): update dependency nodemailer to v6.9.7 (redwoodjs#9444) chore(deps): update dependency esbuild to v0.19.5 (redwoodjs#9359) fix(deps): update dependency @envelop/on-resolve to v3.0.3 (redwoodjs#9436) fix(deps): update dependency semver to v7.5.4 (redwoodjs#9445) fix(deps): update dependency jsonwebtoken to v9.0.2 (redwoodjs#9443) fix(deps): update dependency systeminformation to v5.21.17 (redwoodjs#9446) ...
- Loading branch information
Showing
374 changed files
with
10,142 additions
and
6,668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Detect Changes | ||
description: Determines what areas of the framework have been changed | ||
|
||
outputs: | ||
docs: | ||
description: If *only* docs have changed | ||
rsc: | ||
description: If RSC-related changes have been made | ||
ssr: | ||
description: If SSR-related changes have been made | ||
|
||
runs: | ||
using: node20 | ||
main: detectChanges.mjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Detects if there are only changes to the documentation | ||
* | ||
* @param {string[]} changedFiles The list of files which git has listed as changed | ||
* @returns {boolean} True if there are changes, false if not | ||
*/ | ||
export function onlyDocsChanged(changedFiles){ | ||
for (const changedFile of changedFiles) { | ||
if (changedFile.startsWith('docs')) { | ||
continue | ||
} | ||
|
||
for (const fileToIgnore of [ | ||
'CHANGELOG.md', | ||
'CODE_OF_CONDUCT.md', | ||
'CONTRIBUTING.md', | ||
'CONTRIBUTORS.md', | ||
'LICENSE', | ||
'README.md', | ||
'SECURITY.md', | ||
]) { | ||
if (changedFile === fileToIgnore) { | ||
continue | ||
} | ||
} | ||
|
||
console.log('Non-docs change detected:', changedFile) | ||
return false | ||
} | ||
|
||
console.log('Only docs changes') | ||
return true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Detects if there are SSR changes | ||
* | ||
* @param {string[]} changedFiles The list of files which git has listed as changed | ||
* @returns {boolean} True if there are changes, false if not | ||
*/ | ||
export function ssrChanged(changedFiles){ | ||
for (const changedFile of changedFiles) { | ||
if ( | ||
changedFile.startsWith('tasks/smoke-tests/streaming-ssr') || | ||
changedFile.startsWith('tasks/smoke-tests/basePlaywright.config.ts') || | ||
changedFile.startsWith('packages/internal/') || | ||
changedFile.startsWith('packages/project-config/') || | ||
changedFile.startsWith('packages/web/') || | ||
changedFile.startsWith('packages/router/') || | ||
changedFile.startsWith('packages/web-server/') || | ||
changedFile.startsWith('packages/vite/') | ||
) { | ||
console.log('SSR change detected:', changedFile) | ||
return true | ||
} | ||
} | ||
|
||
console.log('No SSR changes') | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import core from '@actions/core' | ||
import { exec, getExecOutput } from '@actions/exec' | ||
import { onlyDocsChanged } from './cases/onlydocs.mjs' | ||
import { rscChanged } from './cases/rsc.mjs' | ||
import { ssrChanged } from './cases/ssr.mjs' | ||
|
||
async function main() { | ||
const branch = process.env.GITHUB_BASE_REF | ||
|
||
// If there's no branch, we're not in a pull request. | ||
if (!branch) { | ||
core.setOutput('onlydocs', false) | ||
core.setOutput('rsc', false) | ||
core.setOutput('ssr', false) | ||
return | ||
} | ||
|
||
await exec(`git fetch origin ${branch}`) | ||
|
||
const { stdout } = await getExecOutput(`git diff origin/${branch} --name-only`) | ||
const changedFiles = stdout.toString().trim().split('\n').filter(Boolean) | ||
console.log(`${changedFiles.length} changed files`) | ||
|
||
const onlyDocs = onlyDocsChanged(changedFiles) | ||
if(onlyDocs){ | ||
core.setOutput('onlydocs', true) | ||
core.setOutput('rsc', false) | ||
core.setOutput('ssr', false) | ||
return | ||
} | ||
|
||
core.setOutput('onlydocs', false) | ||
core.setOutput('rsc', rscChanged(changedFiles)) | ||
core.setOutput('ssr', ssrChanged(changedFiles)) | ||
} | ||
|
||
main() |
4 changes: 2 additions & 2 deletions
4
.../actions/rsc_related_changes/package.json → .github/actions/detect-changes/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.