Skip to content

DF-1509: Add a v5 to v6 migration guide - #512

Open
alexluckett wants to merge 3 commits into
chore/df-1509-componentsfrom
docs/df-1509-v5-to-v6-guide
Open

alexluckett wants to merge 3 commits into
chore/df-1509-componentsfrom
docs/df-1509-v5-to-v6-guide

Conversation

@alexluckett

@alexluckett alexluckett commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Proposed change

The last PR of the TypeScript to JavaScript migration (v6), stacked on the components PR, adds docs/migration-v5-to-v6.md in the same form as the v4 to v5 guide and links to it from docs/reference.md.

The guide covers the six changes that applications may need to make, each with who it applies to and why it was needed:

  • optional class fields are now T | undefined, with the full list of classes and fields;
  • interfaces are now type aliases, including every type from @defra/forms-engine-plugin/types, with a before-and-after example for code that used module augmentation;
  • LocationFieldBase is no longer abstract in the types;
  • SchemaValidationError.cause is enumerable;
  • FileUploadFieldDetailitem has been renamed FileUploadFieldDetailItem, with a before-and-after import;
  • ADDITIONAL_IDENTIFIER is no longer an enum, with a before-and-after example for code that used one of its members as a type.

It also lists the changes to the type declarations that need no action.

Jira ticket: DF-1509

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

@alexluckett
alexluckett added this pull request to stack #513 November 24, 2026 21:27
A JSDoc type can still mark a property optional, as in a parameter's
object type. Only a class field declared in JavaScript is always present.
@alexluckett
alexluckett force-pushed the docs/df-1509-v5-to-v6-guide branch from 0476ec6 to 66d9e11 Compare November 25, 2026 09:03
@sonarqubecloud

Copy link
Copy Markdown

@jbarnsley10 jbarnsley10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants