Unverified Commit 032e8d0e authored by Steven's avatar Steven Committed by GitHub

chore(ci): add pnpm workspace for github actions (#52976)

This creates a monorepo for each github action and ensures they all use pnpm.

You can install and build all with the following:

```
cd .github
pnpm i
pnpm -r build
```
parent 319353e8
This diff is collapsed.
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "module", "type": "module",
"exports": "./lib/index.js", "exports": "./lib/index.js",
"scripts": { "scripts": {
"build": "pnpm types && pnpm ncc -m -o ./lib build src/index.ts --license licenses.txt", "build": "pnpm types && ncc -m -o ./lib build src/index.ts --license licenses.txt",
"types": "tsc" "types": "tsc"
}, },
"dependencies": { "dependencies": {
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^18.15.3", "@types/node": "^18.15.3",
"@vercel/ncc": "0.36.1" "@vercel/ncc": "0.36.1",
"typescript": "5.1.6"
} }
} }
This diff is collapsed.
This diff is collapsed.
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
"build": "ncc -m -o . build src/index.mjs --license licenses.txt" "build": "ncc -m -o . build src/index.mjs --license licenses.txt"
}, },
"devDependencies": { "devDependencies": {
"@vercel/ncc": "0.34.0" "@vercel/ncc": "0.34.0",
"typescript": "5.1.6"
}, },
"dependencies": { "dependencies": {
"@actions/core": "1.10.0", "@actions/core": "1.10.0",
......
This diff is collapsed.
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
"build": "ncc -m -o . build src/index.mjs --license licenses.txt" "build": "ncc -m -o . build src/index.mjs --license licenses.txt"
}, },
"devDependencies": { "devDependencies": {
"@vercel/ncc": "0.34.0" "@vercel/ncc": "0.34.0",
"typescript": "5.1.6"
}, },
"dependencies": { "dependencies": {
"@actions/core": "1.10.0", "@actions/core": "1.10.0",
"@actions/github": "5.1.1", "@actions/github": "5.1.1",
"@octokit/graphql": "7.0.1" "@octokit/graphql": "7.0.1"
}, }
"packageManager": "npm@9.2.0"
} }
This diff is collapsed.
This diff is collapsed.
...@@ -5,18 +5,16 @@ ...@@ -5,18 +5,16 @@
"src" "src"
], ],
"scripts": { "scripts": {
"types": "tsc", "build": "pnpm types && ncc -m -o . build lib/index.js --license licenses.txt",
"pack": "ncc -m -o . build lib/index.js --license licenses.txt", "types": "tsc"
"build": "npm run types && npm run pack"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^18.11.0", "@types/node": "^18.11.0",
"@vercel/ncc": "0.34.0", "@vercel/ncc": "0.34.0",
"typescript": "^4.4.4" "typescript": "5.1.6"
}, },
"dependencies": { "dependencies": {
"@actions/core": "1.10.0", "@actions/core": "1.10.0",
"@actions/github": "5.1.1" "@actions/github": "5.1.1"
}, }
"packageManager": "npm@9.2.0"
} }
...@@ -14,5 +14,8 @@ ...@@ -14,5 +14,8 @@
"pretty-bytes": "^5.3.0", "pretty-bytes": "^5.3.0",
"pretty-ms": "^5.0.0", "pretty-ms": "^5.0.0",
"semver": "7.3.4" "semver": "7.3.4"
},
"devDependencies": {
"typescript": "5.1.6"
} }
} }
...@@ -6,12 +6,13 @@ ...@@ -6,12 +6,13 @@
"src" "src"
], ],
"scripts": { "scripts": {
"build": "npm run types && ncc -m -o ./lib build src/index.ts --license licenses.txt", "build": "pnpm types && ncc -m -o ./lib build src/index.ts --license licenses.txt",
"types": "tsc" "types": "tsc"
}, },
"devDependencies": { "devDependencies": {
"@types/github-slugger": "^1.3.0", "@types/github-slugger": "^1.3.0",
"@vercel/ncc": "0.34.0" "@vercel/ncc": "0.34.0",
"typescript": "5.1.6"
}, },
"dependencies": { "dependencies": {
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
......
...@@ -9,7 +9,6 @@ import GithubSlugger from 'github-slugger' ...@@ -9,7 +9,6 @@ import GithubSlugger from 'github-slugger'
import matter from 'gray-matter' import matter from 'gray-matter'
import * as github from '@actions/github' import * as github from '@actions/github'
import { setFailed } from '@actions/core' import { setFailed } from '@actions/core'
import type { Node, Data } from 'unist'
/** /**
* This script validates internal links in /docs and /errors including internal, * This script validates internal links in /docs and /errors including internal,
...@@ -88,7 +87,9 @@ async function getAllMdxFilePaths( ...@@ -88,7 +87,9 @@ async function getAllMdxFilePaths(
} }
// Returns the slugs of all headings in a tree // Returns the slugs of all headings in a tree
function getHeadingsFromMarkdownTree(tree: Node<Data>): string[] { function getHeadingsFromMarkdownTree(
tree: ReturnType<typeof markdownProcessor.parse>
): string[] {
const headings: string[] = [] const headings: string[] = []
slugger.reset() slugger.reset()
......
This diff is collapsed.
packages:
- 'actions/*'
...@@ -10,6 +10,7 @@ packages/next-codemod/transforms/__tests__/**/* ...@@ -10,6 +10,7 @@ packages/next-codemod/transforms/__tests__/**/*
test/development/basic/hmr/components/parse-error.js test/development/basic/hmr/components/parse-error.js
pnpm-lock.yaml pnpm-lock.yaml
.github/actions/issue-validator/index.mjs .github/actions/issue-validator/index.mjs
.github/actions/issue-labeler/lib/index.js
.github/actions/validate-docs-links/lib/index.js .github/actions/validate-docs-links/lib/index.js
.github/actions/needs-triage/index.js .github/actions/needs-triage/index.js
.github/actions/minus-one/index.mjs .github/actions/minus-one/index.mjs
......
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