Skip to content

Commit f6694e6

Browse files
authored
Merge branch 'main' into copilot/include-example-urls-jsdocs
2 parents 65e3e42 + d5ec8ca commit f6694e6

File tree

9 files changed

+3270
-4292
lines changed

9 files changed

+3270
-4292
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
Lint:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
12-
- uses: actions/setup-node@v4
11+
- uses: actions/checkout@v6
12+
- uses: actions/setup-node@v6
1313
with:
1414
node-version-file: package.json
1515
- run: npm ci
@@ -18,8 +18,8 @@ jobs:
1818
Test:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4
22-
- uses: actions/setup-node@v4
21+
- uses: actions/checkout@v6
22+
- uses: actions/setup-node@v6
2323
with:
2424
node-version-file: package.json
2525
- run: npm ci
@@ -28,7 +28,10 @@ jobs:
2828
Build:
2929
runs-on: ubuntu-latest
3030
steps:
31-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v6
32+
- uses: actions/setup-node@v6
33+
with:
34+
node-version-file: package.json
3235
- run: npm ci
3336
- run: npm run build
3437
- name: Ensure that test URLs aren't included in the built file

.github/workflows/demo.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ jobs:
1515
build:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v6
19+
- uses: actions/setup-node@v6
20+
with:
21+
node-version-file: package.json
1922
- run: npm ci
2023
- run: npm run build:demo
2124
- run: npm run test:demo
2225
- run: grep -rq "/fregante/" ./demo/dist
2326
# https://github.com/refined-github/github-url-detection/pull/161
2427
name: Ensure that the demo is built correctly
2528
- name: Upload artifact
26-
uses: actions/upload-pages-artifact@v3
29+
uses: actions/upload-pages-artifact@v4
2730
with:
2831
path: demo/dist/
2932

.github/workflows/esm-lint.yml

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,32 @@ jobs:
1818
Pack:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v6
2222
- run: npm install
2323
- run: npm run build --if-present
2424
- run: npm pack --dry-run
2525
- run: npm pack | tail -1 | xargs -n1 tar -xzf
26-
- uses: actions/upload-artifact@v4
26+
- uses: actions/upload-artifact@v6
2727
with:
28+
name: package
2829
path: package
2930
Publint:
3031
runs-on: ubuntu-latest
3132
needs: Pack
3233
steps:
33-
- uses: actions/download-artifact@v4
34+
- uses: actions/download-artifact@v7
35+
with:
36+
name: package
37+
path: artifact
3438
- run: npx publint ./artifact
3539
Webpack:
3640
runs-on: ubuntu-latest
3741
needs: Pack
3842
steps:
39-
- uses: actions/download-artifact@v4
43+
- uses: actions/download-artifact@v7
44+
with:
45+
name: package
46+
path: artifact
4047
- run: npm install --omit=dev ./artifact
4148
- run: echo "$IMPORT_STATEMENT" > index.js
4249
- run: webpack --entry ./index.js
@@ -45,7 +52,10 @@ jobs:
4552
runs-on: ubuntu-latest
4653
needs: Pack
4754
steps:
48-
- uses: actions/download-artifact@v4
55+
- uses: actions/download-artifact@v7
56+
with:
57+
name: package
58+
path: artifact
4959
- run: npm install --omit=dev ./artifact
5060
- run: echo "$IMPORT_STATEMENT" > index.js
5161
- run: >
@@ -57,15 +67,21 @@ jobs:
5767
runs-on: ubuntu-latest
5868
needs: Pack
5969
steps:
60-
- uses: actions/download-artifact@v4
70+
- uses: actions/download-artifact@v7
71+
with:
72+
name: package
73+
path: artifact
6174
- run: npm install --omit=dev ./artifact rollup@4 @rollup/plugin-json @rollup/plugin-node-resolve
6275
- run: echo "$IMPORT_STATEMENT" > index.js
6376
- run: npx rollup -p node-resolve -p @rollup/plugin-json index.js
6477
Vite:
6578
runs-on: ubuntu-latest
6679
needs: Pack
6780
steps:
68-
- uses: actions/download-artifact@v4
81+
- uses: actions/download-artifact@v7
82+
with:
83+
name: package
84+
path: artifact
6985
- run: npm install --omit=dev ./artifact
7086
- run: echo '<script type="module">$IMPORT_STATEMENT</script>' > index.html
7187
- run: npx vite build
@@ -74,7 +90,10 @@ jobs:
7490
runs-on: ubuntu-latest
7591
needs: Pack
7692
steps:
77-
- uses: actions/download-artifact@v4
93+
- uses: actions/download-artifact@v7
94+
with:
95+
name: package
96+
path: artifact
7897
- run: echo '{}' > package.json
7998
- run: echo "$IMPORT_STATEMENT" > index.js
8099
- run: npm install --omit=dev ./artifact
@@ -83,7 +102,10 @@ jobs:
83102
runs-on: ubuntu-latest
84103
needs: Pack
85104
steps:
86-
- uses: actions/download-artifact@v4
105+
- uses: actions/download-artifact@v7
106+
with:
107+
name: package
108+
path: artifact
87109
- run: echo '{"type":"module"}' > package.json
88110
- run: npm install --omit=dev ./artifact @sindresorhus/tsconfig
89111
- run: echo "$IMPORT_STATEMENT" > index.ts
@@ -96,8 +118,11 @@ jobs:
96118
runs-on: ubuntu-latest
97119
needs: Pack
98120
steps:
99-
- uses: actions/download-artifact@v4
100-
- uses: actions/setup-node@v4
121+
- uses: actions/download-artifact@v7
122+
with:
123+
name: package
124+
path: artifact
125+
- uses: actions/setup-node@v6
101126
with:
102127
node-version-file: artifact/package.json
103128
- run: echo "$IMPORT_STATEMENT" > index.mjs

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
NPM:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
23-
- uses: actions/setup-node@v4
22+
- uses: actions/checkout@v6
23+
- uses: actions/setup-node@v6
2424
with:
2525
node-version-file: package.json
2626
registry-url: https://registry.npmjs.org

demo/Index.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494
<datalist id="url-examples">
9595
{#each [...allUrls] as url}
96-
<option value={url} />
96+
<option value={url}></option>
9797
{/each}
9898
</datalist>
9999

index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,13 +369,11 @@ TEST: addTests('hasWikiPageEditor', combinedTestOnly);
369369

370370
export const isRepo = (url: URL | HTMLAnchorElement | Location = location): boolean => {
371371
const [user, repo, extra] = getCleanPathname(url).split('/');
372-
return Boolean(
373-
user
372+
return Boolean(user
374373
&& repo
375374
&& !reservedNames.includes(user)
376375
&& !url.hostname.startsWith('gist.')
377-
&& extra !== 'generate', // Like isNewRepoTemplate but inlined for performance
378-
);
376+
&& extra !== 'generate'); // Like isNewRepoTemplate but inlined for performance
379377
};
380378

381379
TEST: addTests('isRepo', [
@@ -778,7 +776,7 @@ TEST: addTests('isRepoGitObject', [
778776
/** Covers blob, trees and blame pages */
779777
export const isRepoGitObject = (url: URL | HTMLAnchorElement | Location = location): boolean =>
780778
isRepo(url)
781-
&& [undefined, 'blob', 'tree', 'blame'].includes(getCleanPathname(url).split('/')[2]);
779+
&& [undefined, 'blob', 'tree', 'blame'].includes(getCleanPathname(url).split('/')[2]);
782780

783781
TEST: addTests('hasFiles', combinedTestOnly);
784782
/** Has a list of files */

0 commit comments

Comments
 (0)