IAPL rename: gate checks, and two breaks they found on an unedited 1.16.7 site
- pnpm legacy:site (scripts/legacy-site-check.mjs): the reference site of v1.16.7, unedited, installed against this build — old commands, doctor without errors, import map unchanged, tsc, builds with webpack and Turbopack - test/legacyNameForms.test.ts: the remaining spellings with 'ipal' as a closed list; a new one fails - found by legacy:site and fixed: 'ipal-tokens --check' called a tokens.css written before 1.17.0 out of date (its header names the command); the doctor's env-example rule did not accept IPAL_* in .env.example - the doctor's seed rules catch IPAL_SEED_ALLOW_FULL=1 as before - PROGRAMISTA: the new release check Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
b91984fbcd
commit
926ba4a67e
@@ -199,6 +199,22 @@ describe('the doctor on a project that was not touched', () => {
|
||||
expect((await run(dir, ['legacy-names'])).findings.filter((f) => f.severity === 'warning')).toEqual([])
|
||||
})
|
||||
|
||||
test('IPAL_* names in .env.example satisfy env-example; IPAL_SEED_ALLOW_FULL=1 is still caught', async () => {
|
||||
const example = 'DATABASE_URI=\nPAYLOAD_SECRET=\nNEXT_PUBLIC_SERVER_URL=\nIPAL_IP_HEADER=\nIPAL_COOKIE_SCAN_URL=\nIPAL_COOKIE_SCAN_TOKEN=\n'
|
||||
const config = "export default { plugins: [ipalKit({ cookieScanner: { crawl: true } })] }\n"
|
||||
const ok = site({ '.env.example': example, 'src/payload.config.ts': config })
|
||||
expect((await run(ok, ['env-example'])).findings.filter((f) => f.rule === 'env-example')).toEqual([])
|
||||
const bad = site({
|
||||
'.env.example': `${example}IPAL_SEED_ALLOW_FULL=1\nIPAL_DOCTOR_TOKEN=0123456789abcdef0123456789abcdef\n`,
|
||||
'package.json': { name: 'x', scripts: { 'seed:all': 'IPAL_SEED_ALLOW_FULL=1 payload run src/seed/index.ts' } },
|
||||
'src/payload.config.ts': config,
|
||||
})
|
||||
const messages = (await run(bad, ['env-example', 'seed-named'])).findings.map((f) => f.message).join('\n')
|
||||
expect(messages).toMatch(/IPAL_DOCTOR_TOKEN in \.env\.example has a value/)
|
||||
expect(messages).toMatch(/\.env\.example sets IAPL_SEED_ALLOW_FULL=1/)
|
||||
expect(messages).toMatch(/script "seed:all" switc/)
|
||||
})
|
||||
|
||||
test('storage-names: the cookie the page sets must be the one the scanner declares', async () => {
|
||||
const layout = (props: string) => `import { PageStats } from '@intecion/ipal-kit/client'\nexport default function L() { return <PageStats ${props} /> }\n`
|
||||
const config = (names: string) => `import { iapl } from '@intecion/ipal-kit'\nexport default { plugins: [iapl({ ${names} })] }\n`
|
||||
|
||||
Reference in New Issue
Block a user