mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 11:21:20 -08:00
build(site): [SITE-07] retain shallowequal upstream attribution
This commit is contained in:
1 parent
0503fe8aa8
commit
4bef084328
23 files changed
+1518
-19
No files matched your search
@@ -21,6 +21,13 @@ test('mobile vConsole shows logs and upstream site notice texts are served uncha
|
||||
notices.push({ component: group.name, version: group.version, url: response.url(), sha256: notice.sha256 })
|
||||
}
|
||||
}
|
||||
const attributionPath = '/licenses/console/react-pure-render/ATTRIBUTION.md'
|
||||
const attribution = await request.get(attributionPath)
|
||||
expect(attribution.status()).toBe(200)
|
||||
const localLinks = [...(await attribution.text()).matchAll(/\]\((\.\.?\/[^)]+)\)/g)]
|
||||
expect(localLinks).toHaveLength(2)
|
||||
for (const [, target] of localLinks)
|
||||
expect(notices.map(notice => notice.url)).toContain(new URL(target, attribution.url()).href)
|
||||
await testInfo.attach('verified-vendor-notices', { contentType: 'application/json', body: JSON.stringify(notices) })
|
||||
const provenance = JSON.parse(fs.readFileSync('refactor/baselines/site-codicons-provenance.json', 'utf8'))
|
||||
const font = await request.get(`/${provenance.fontPath.slice('docs/'.length)}`)
|
||||
@@ -30,6 +37,7 @@ test('mobile vConsole shows logs and upstream site notice texts are served uncha
|
||||
expect(index.status()).toBe(200)
|
||||
expect(await index.text()).toContain('Included component: @vscode/codicons 0.0.26')
|
||||
expect(await index.text()).toContain('Included component: console-feed 3.2.2')
|
||||
expect(await index.text()).toContain('Included component: react-pure-render (shallowequal origin) source commit 729cdbd')
|
||||
expect(await index.text()).toContain('Included component: chromium-string-utils')
|
||||
expect(await index.text()).toContain('Included component: @babel/runtime (react-inspector embedded) 7.13.10')
|
||||
expect(await index.text()).toContain('Included component: regenerator-runtime 0.13.7')
|
||||
|
||||
@@ -111,7 +111,7 @@ test('Console notice CLI rejects omitted package or embedded attribution before
|
||||
const manifestPath = path.join(root, 'scripts/site-vendor/manifest.json')
|
||||
fs.mkdirSync(path.dirname(manifestPath), { recursive: true })
|
||||
const original = JSON.parse(fs.readFileSync('scripts/site-vendor/manifest.json', 'utf8'))
|
||||
for (const name of ['console-feed', 'parcel-bundler', 'styled-components', 'chromium-string-utils', 'stylis-rule-sheet', '@babel/runtime (react-inspector embedded)', 'regenerator-runtime', 'simple-html-tokenizer', 'replicator (console-feed fork)', 'stylis (Emotion fork)', 'murmurhash-js (Gary Court)', 'murmurhash2 (Austin Appleby)', 'stackoverflow-custom-stringify']) {
|
||||
for (const name of ['console-feed', 'parcel-bundler', 'styled-components', 'chromium-string-utils', 'stylis-rule-sheet', '@babel/runtime (react-inspector embedded)', 'regenerator-runtime', 'simple-html-tokenizer', 'replicator (console-feed fork)', 'stylis (Emotion fork)', 'murmurhash-js (Gary Court)', 'murmurhash2 (Austin Appleby)', 'stackoverflow-custom-stringify', 'react-pure-render (shallowequal origin)']) {
|
||||
for (const field of ['components', 'notices']) {
|
||||
const manifest = structuredClone(original)
|
||||
const group = manifest.groups.find(group => group.name === 'console')
|
||||
|
||||
Reference in new issue
Block a user