1.18.0 upgrade notes
PROGRAMISTA §6 rows 83–87 now 1.18.0 (1.17.2 was never released alone) and new rows 88–94; iapl-upgrade blocks for speed and growth and for drafts in related documents, the 1.17.2 blocks as "→ 1.18.0 (from 1.17.2)"; every "since 1.17.2" in docs, comments and tests reads 1.18.0; reference skills, AGENTS.md and the reference index on 1.18.0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
af98cfba96
commit
9b83cc600a
@@ -159,7 +159,7 @@ describe('forms collection: public read, editor+ write, Emails hidden from plain
|
||||
})
|
||||
})
|
||||
|
||||
describe('form submissions over REST / GraphQL: staff only (1.17.2)', () => {
|
||||
describe('form submissions over REST / GraphQL: staff only (1.18.0)', () => {
|
||||
const build = async (forms: object = {}) => {
|
||||
const config = await iapl({ access: { authCollection: 'users' }, forms, i18n, twoFactor: false })(
|
||||
empty({ collections: [{ slug: 'customers', auth: true, fields: [] }] }),
|
||||
|
||||
@@ -10,7 +10,7 @@ vi.mock('next/headers.js', async () => (await import('./http/server.js')).nextHe
|
||||
const { action } = adminSite(false)
|
||||
|
||||
describe('adminSameOrigin: false', () => {
|
||||
test('a request from a sibling subdomain reaches the action, as before 1.17.2', async () => {
|
||||
test('a request from a sibling subdomain reaches the action, as before 1.18.0', async () => {
|
||||
expect((await action('/ipal/cookie-approval', SIBLING, '{"ids":[]}')).status).toBe(200)
|
||||
})
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* The plugin's panel actions only from the site's own origin (adminSameOrigin, 1.17.2). Shared by
|
||||
* The plugin's panel actions only from the site's own origin (adminSameOrigin, 1.18.0). Shared by
|
||||
* adminSameOrigin.test.ts (default) and adminSameOriginOff.test.ts (`adminSameOrigin: false`): one Payload per file.
|
||||
* A signed-in administrator's cookie rides on a `text/plain` POST (no CORS preflight) from a page on a sibling
|
||||
* subdomain. Database: SQLite in memory, or IPAL_TEST_POSTGRES_URI / IPAL_TEST_MONGO_URI (test/http/db.ts).
|
||||
|
||||
@@ -444,7 +444,7 @@ describe('tags: nothing earlier than before', () => {
|
||||
const pixels = { clarityProjectId: 'clar', consentMode: 'basic', gtmContainerId: 'GTM-TEST', metaPixelId: '123' }
|
||||
const layer = () => [...((window.dataLayer ?? []))].map((entry) => (Object.prototype.toString.call(entry) === '[object Arguments]' ? Array.from(entry as ArrayLike<unknown>) : entry))
|
||||
|
||||
test("the server HTML holds two scripts, the banner's and the cookie button's (1.17.2), and neither names a tag", () => {
|
||||
test("the server HTML holds two scripts, the banner's and the cookie button's (1.18.0), and neither names a tag", () => {
|
||||
const html = renderToString(tree({ analytics: pixels }))
|
||||
expect(html.match(/<script[^>]*data-ipal="(?:banner|cookie-button)-script"/g)).toHaveLength(2)
|
||||
expect(html.match(/<script/g)).toHaveLength(2)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// @vitest-environment happy-dom
|
||||
/**
|
||||
* Where <CookieButton> sits (1.17.2): the bottom corner of the window, always. It never moves — not above the
|
||||
* Where <CookieButton> sits (1.18.0): the bottom corner of the window, always. It never moves — not above the
|
||||
* footer, not at the end of the page. So that it covers nothing there, the footer gets room under its last row
|
||||
* while the button is shown (measured, only what is missing). The placement before 1.17.2 stays available.
|
||||
* while the button is shown (measured, only what is missing). The placement before 1.18.0 stays available.
|
||||
*/
|
||||
import { act, createElement, type ReactElement } from 'react'
|
||||
import { createRoot, hydrateRoot, type Root } from 'react-dom/client'
|
||||
@@ -277,7 +277,7 @@ describe('<CookieButton>', () => {
|
||||
expect(el.style.paddingBottom).toBe('')
|
||||
})
|
||||
|
||||
test('avoid={COOKIE_BUTTON_AVOID}: the placement before 1.17.2 — above the footer, and no room', async () => {
|
||||
test('avoid={COOKIE_BUTTON_AVOID}: the placement before 1.18.0 — above the footer, and no room', async () => {
|
||||
decide()
|
||||
const el = footer()
|
||||
await mount({ avoid: COOKIE_BUTTON_AVOID })
|
||||
|
||||
+1
-1
@@ -193,7 +193,7 @@ describe('M1 rules: access-missing, turnstile-degraded, turnstile-env-key', () =
|
||||
expect(await run(build('{ serverURL: process.env.NEXT_PUBLIC_SERVER_URL, plugins: [] }'), ['csrf-empty'])).toEqual([])
|
||||
expect(await run(build("{ csrf: ['https://site.example'], plugins: [] }"), ['csrf-empty'])).toEqual([])
|
||||
expect(await run('// not a Payload config', ['csrf-empty'])).toEqual([])
|
||||
// deep (the running config, 1.17.2): it wins over the file — serverURL may come from a spread or a helper
|
||||
// deep (the running config, 1.18.0): it wins over the file — serverURL may come from a spread or a helper
|
||||
expect(await run(build('{ ...base, plugins: [] }'), ['csrf-empty'], { originKnown: false })).toEqual(['csrf-empty:warning'])
|
||||
expect(await run(build("{ plugins: [iapl({ access: { authCollection: 'users' } })] }"), ['csrf-empty'], { originKnown: true })).toEqual([])
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Payload's job queue over HTTP (1.17.2, IAWL idea 35, owner's Q2): when the project writes no `jobs.access.run`,
|
||||
* Payload's job queue over HTTP (1.18.0, IAWL idea 35, owner's Q2): when the project writes no `jobs.access.run`,
|
||||
* only an admin signed in with the second factor, or `Authorization: Bearer <CRON_SECRET>`, may run it. Payload's
|
||||
* default let any signed-in account of any auth collection run the queue — a customer included.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* A locked staff account answers its login exactly like a wrong password (accounts.lockedAnswer, 1.17.2; IAWL
|
||||
* A locked staff account answers its login exactly like a wrong password (accounts.lockedAnswer, 1.18.0; IAWL
|
||||
* idea 6). Shared by lockedAnswer.test.ts (default, 2FA on), lockedAnswer2faOff.test.ts (2FA off) and
|
||||
* lockedAnswerPayload.test.ts (`lockedAnswer: 'payload'`): one Payload per file.
|
||||
* Database: SQLite in memory, or IPAL_TEST_POSTGRES_URI / IPAL_TEST_MONGO_URI (test/http/db.ts).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Cookie settings → Consent version only goes up (owner's decision Q2, 1.17.2). A stored consent counts only under
|
||||
* Cookie settings → Consent version only goes up (owner's decision Q2, 1.18.0). A stored consent counts only under
|
||||
* the version it was given for: a LOWER number made old consent cookies valid again. A save through access control
|
||||
* with a lower number is refused with a message; the Local API with `overrideAccess` may still lower it;
|
||||
* `cookieSettings: { allowLowerPolicyVersion: true }` keeps the old behaviour.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* IPv6 is counted per network (1.17.2, IAWL idea 9): a /64 is one client in every limiter of the plugin; a second
|
||||
* IPv6 is counted per network (1.18.0, IAWL idea 9): a /64 is one client in every limiter of the plugin; a second
|
||||
* counter per /48 when a project turns it on (`setIpv6Grouping({ wide: 48 })`).
|
||||
*/
|
||||
import { afterEach, describe, expect, test, vi } from 'vitest'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* The doctor's `visitor-writes` probe (1.17.2, the owner's Q3 answer (b)): on a site with a visitor login collection,
|
||||
* The doctor's `visitor-writes` probe (1.18.0, the owner's Q3 answer (b)): on a site with a visitor login collection,
|
||||
* every collection and global whose write rule lets such an account in — Payload's default "any signed-in account"
|
||||
* included — is listed. Asked by behaviour on the built config, never by a rule's name.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user