Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish-search-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: macos-latest
timeout-minutes: 10
steps:
- uses: google/wireit@setup-github-actions-caching/v1
- uses: google/wireit@setup-github-actions-caching/v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-api-data-in-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: google/wireit@setup-github-actions-caching/v1
- uses: google/wireit@setup-github-actions-caching/v2
with:
node-version: 18
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: macos-latest
timeout-minutes: 10
steps:
- uses: google/wireit@setup-github-actions-caching/v1
- uses: google/wireit@setup-github-actions-caching/v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: macos-latest
timeout-minutes: 20
steps:
- uses: google/wireit@setup-github-actions-caching/v1
- uses: google/wireit@setup-github-actions-caching/v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: macos-latest
timeout-minutes: 10
steps:
- uses: google/wireit@setup-github-actions-caching/v1
- uses: google/wireit@setup-github-actions-caching/v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
Expand Down
33 changes: 29 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
"playground-elements": "^0.20.0",
"prettier": "^2.1.2",
"typescript": "~4.7.4",
"wireit": "^0.14.0"
"wireit": "^0.14.12"
}
}
2 changes: 2 additions & 0 deletions packages/lit-dev-tools-cjs/src/api-docs/configs/lit-2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export const lit2Config: ApiDocsConfig = {
{
cmd: 'npm',
args: ['run', 'build:ts'],
// disable wireit cache for to avoid caching errors in Github Actions
env: {WIREIT_CACHE: 'none'},
},
],

Expand Down
2 changes: 2 additions & 0 deletions packages/lit-dev-tools-cjs/src/api-docs/configs/lit-3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export const lit3Config: ApiDocsConfig = {
{
cmd: 'npm',
args: ['run', 'build:ts'],
// disable wireit cache for to avoid caching errors in Github Actions
env: {WIREIT_CACHE: 'none'},
},
// Apply file patch to fix typedoc errors during docs generation. Because
// `npm run build:ts` is run prior to this, the patch file can always be
Expand Down
7 changes: 5 additions & 2 deletions packages/lit-dev-tools-cjs/src/api-docs/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ const INSTALLED_FILE = 'INSTALLED';
const setup = async (config: ApiDocsConfig) => {
console.log(`running npm ci in ${config.gitDir}`);
await execFileAsync('npm', ['ci'], {cwd: config.gitDir});
for (const {cmd, args} of config.extraSetupCommands ?? []) {
for (const {cmd, args, env} of config.extraSetupCommands ?? []) {
console.log(`running ${cmd} ${args.join(' ')} in ${config.gitDir}`);
await execFileAsync(cmd, args, {cwd: config.gitDir});
await execFileAsync(cmd, args, {
cwd: config.gitDir,
env: {...process.env, ...env},
});
}
await fs.writeFile(pathlib.join(config.workDir, INSTALLED_FILE), '', 'utf8');
};
Expand Down
6 changes: 5 additions & 1 deletion packages/lit-dev-tools-cjs/src/api-docs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ export interface ApiDocsConfig {
* Extra setup/build commands to run after NPM install and before running
* TypeDoc.
*/
extraSetupCommands?: Array<{cmd: string; args: string[]}>;
extraSetupCommands?: Array<{
cmd: string;
args: string[];
env?: Record<string, string>;
}>;

/**
* Entrypoint TypeScript modules for TypeDoc to analyze.
Expand Down
Loading