Repository navigation
chore: migrate UI Extensions Core to the todoist scope #381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,69 +1,71 @@ | ||
| name: Publish core package | ||
| name: Publish retained core artifact | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'core-v*' | ||
| workflow_dispatch: | ||
| inputs: | ||
| artifact_run_id: | ||
| description: Original successful core-pack.yml run ID (never rerun/repack on retry) | ||
| required: true | ||
| type: string | ||
| release_sha: | ||
| description: Full source SHA from that main pack run | ||
| required: true | ||
| type: string | ||
| release_version: | ||
| description: Exact manifest version, initially 6.0.1 | ||
| required: true | ||
| type: string | ||
| destination: | ||
| description: Publish both registries or complete one missing mirror | ||
| type: choice | ||
| required: true | ||
| default: both | ||
| options: [both, npmjs, github] | ||
| release_tag: | ||
| description: Use migration-recovery for an older missing mirror | ||
| type: choice | ||
| default: latest | ||
| options: [latest, migration-recovery] | ||
|
|
||
| permissions: | ||
| # Enable reading repository contents (allows checkout without token) | ||
| contents: read | ||
| # Enable the use of OIDC for trusted publishing and npm provenance | ||
| id-token: write | ||
| # Enable the use of GitHub Packages registry | ||
| packages: write | ||
|
|
||
| concurrency: | ||
| group: ui-extensions-core-release | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| # Publish to GitHub package registry | ||
| publish-github: | ||
| publish: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| if: github.repository == 'todoist/ui-extensions' && github.ref == 'refs/heads/main' | ||
| environment: npm-release | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| timeout-minutes: 15 | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| packages: write | ||
| id-token: write | ||
| env: | ||
| ARTIFACT_RUN_ID: ${{ inputs.artifact_run_id }} | ||
| RELEASE_SHA: ${{ inputs.release_sha }} | ||
| RELEASE_VERSION: ${{ inputs.release_version }} | ||
| RELEASE_TAG: ${{ inputs.release_tag }} | ||
| GH_TOKEN: ${{ github.token }} | ||
| GH_PACKAGES_TOKEN: ${{ github.token }} | ||
| steps: | ||
| - name: Git checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Configure Doist package repository | ||
| uses: actions/setup-node@v6 | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| registry-url: https://npm.pkg.github.com/ | ||
| scope: '@doist' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm run bootstrap-ci:common | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{secrets.GH_PACKAGES_TOKEN}} | ||
|
|
||
| - name: Publish package | ||
| working-directory: ./packages/ui-extensions-core | ||
| run: npm publish | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{secrets.GH_PACKAGES_TOKEN}} | ||
|
|
||
| # Publish to npm package registry | ||
| publish-npm: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - name: Git checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Configure Doist package repository | ||
| uses: actions/setup-node@v6 | ||
| ref: ${{ github.sha }} | ||
| persist-credentials: false | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| registry-url: https://registry.npmjs.org/ | ||
| scope: '@doist' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm run bootstrap-ci:common | ||
|
|
||
| # npm must be upgraded AFTER installing dependencies to avoid package-lock.json | ||
| # sync errors. Upgrading npm before running npm ci can cause lock file format | ||
| # mismatches that prevent successful dependency installation. | ||
| - name: Ensure npm 11.5.1 or later is installed | ||
| run: npm install -g npm@latest | ||
|
|
||
| - name: Publish package | ||
| working-directory: ./packages/ui-extensions-core | ||
| run: npm publish --provenance --access public | ||
| - run: npm install --global npm@11.19.0 | ||
| # No dependency install, rebuild, version bump or lifecycle invocation here. | ||
| - run: node scripts/release.mjs download release-artifact | ||
| - name: Publish npm with configured trusted publishing | ||
| if: inputs.destination == 'both' || inputs.destination == 'npmjs' | ||
| run: node scripts/release.mjs publish release-artifact npmjs | ||
| - name: Publish public GitHub mirror | ||
| if: inputs.destination == 'both' || inputs.destination == 'github' | ||
| run: node scripts/release.mjs publish release-artifact github | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Pack core release artifact | ||
| run-name: ui-extensions-core pack v1 ${{ github.sha }} | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ui-extensions-core-release | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| pack: | ||
| if: github.repository == 'todoist/ui-extensions' && github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| persist-credentials: false | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| - run: npm ci --ignore-scripts | ||
| - run: npm run test:release | ||
| - run: npm run integrity-check --workspace=packages/ui-extensions-core | ||
| - name: Pack once without lifecycle hooks | ||
| run: node scripts/release.mjs pack release-artifact | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ui-extensions-core-release | ||
| path: release-artifact/ | ||
| if-no-files-found: error | ||
| retention-days: 90 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,3 +70,6 @@ config.json | |
| **/es | ||
| **/lib | ||
| **/styles | ||
|
|
||
| # Retained release artifacts | ||
| /release-artifact/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Current core and retired React consumers | ||
|
|
||
| The supported current-forward release is `@todoist/ui-extensions-core@6.0.1`. | ||
| It preserves the v6 card construction, serialization and Todoist/Twist data-exchange | ||
| API. It does not render React components, implement renderer connection hooks or | ||
| ship a stylesheet. Its only exported package entry is `.`; output is CommonJS, | ||
| ES modules and declarations under `dist/`. | ||
|
|
||
| [Retirement PR #334](https://github.com/Doist/ui-extensions/pull/334), merged as | ||
| `21eb3de2512cf05f2c57a1a2b6c9be1c87ced732`, removed the React source, manifest, | ||
| workspace and publishing workflows. Existing historical versions remain intact. | ||
| The orphan tests under `packages/ui-extensions-react/src/types/` do not provide a | ||
| buildable producer. Rebuilding an old branch or republishing the retired package | ||
| under a new scope is not part of this migration. | ||
|
|
||
| ## Exact consumer blockers | ||
|
|
||
| Current source inspection at the following commits confirms incompatible edges: | ||
|
|
||
| | Consumer | Declared dependencies | Missing renderer API | | ||
| | ---------------------------------------------------------------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | `frontend-toolbox` `ba614970a60636e7a67e3280aa5805b8311e1dc3`, `packages/extensions-renderers` | core peer `^4.1.1`, React peer `^11.0.0` | `CanHaveAutoFocus`, `TextInputist`, `ToggleInputist`, `ClipboardAction`, `SubmitActionist` in `src/renderers/input-renderers.tsx` and `actions.tsx` | | ||
| | `twist-web` `30d98585dddc9e8fe337186acbd5fd75f4454cb6` | core `3.2.1`, React `6.0.0` | `AdaptiveCardRenderer`, `useAdaptiveCardsConnection`, `BridgeActionCallbacks`, `ExtensionError`, `ExtensionVersion`, `ExtensionContext`, `ChoiceSetInputist`, `CanHaveAutoFocus`, `AdaptiveCardistCard`, `DoistCardResult`, `DoistCardConnectionParams`, plus `styles/index.css` | | ||
|
|
||
| These symbols are absent from current core. Core's `SubmitAction`/`TextInput` | ||
| construct serialized card data; they are not substitutes for renderer subclasses | ||
| such as `SubmitActionist`/`TextInputist`. Do not replace the React package with a core | ||
| alias or claim a scope-only dependency update is compatible. Preserve each legacy | ||
| dependency until the consumer owners approve and implement a supported renderer | ||
| path in current source, or remove the feature through a separately approved product | ||
| change. Henning routes this to the existing UI Extensions/toolbox/Twist owners; | ||
| the specific D06 owner assignment is not available in this repository. | ||
|
|
||
| ## Core API migration is also required for pre-v6 clients | ||
|
|
||
| The breaking v6 API change predates this scope migration; see | ||
| [PR #342](https://github.com/Doist/ui-extensions/pull/342). Examples: | ||
|
|
||
| | Legacy API | Current core API | | ||
| | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | ||
| | `DoistCard`, `DoistCardVersion` | `TodoistCard`, `TodoistCardVersion` | | ||
| | `DoistCardAction*`, `DoistCardContext*`, `DoistCardExtensionType` | corresponding `TodoistCard*` types (check Twist-specific types below) | | ||
| | `DoistCardRequest`, `DoistCardResponse`, `DoistCardError`, `DoistCardBridge*` | corresponding `TodoistCard*` types | | ||
| | `DoistContextUser` | `BaseContextUser` | | ||
| | `card.doistCardVersion` | `card.todoistCardVersion` | | ||
| | Twist's legacy `DoistCardContextChannel`, `DoistCardContextConversation`, `DoistCardContextThread` | inspect `TwistContextChannel`, `TwistContextConversation`, `TwistContextThread` and actual shapes in `src/types/twist.ts` | | ||
|
|
||
| `ContextMenuData` still exists. Requests now require both | ||
| `maximumTodoistCardVersion` and the preserved `maximumDoistCardVersion` compatibility | ||
| field. Serialized cards preserve the existing legacy version keys. Consumers with | ||
| subclasses compiled against older core class names must recompile against v6; | ||
| serializer base-class identity means a dependency-only bump is insufficient. | ||
| These are migration starting points, not a verified compatibility assertion for | ||
| core 3/4 plus retired renderer 6/11. Consumer owners must verify type checks, | ||
| renderer/connection behavior, schema serialization and CSS in their actual current | ||
| applications after a forward renderer decision and real package publication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scripts/**and.github/workflows/**to thepull_requesttrigger expands the fork-PR surface of a job that still injectsNODE_AUTH_TOKEN: ${{secrets.GH_PACKAGES_TOKEN}}in the Bootstrap step. Doist's Secrets Management standard says not to use secrets in workflows triggered by pull requests from forks (https://handbook.doist.com/doc/standard-secrets-management-). Skip the secret-bearing Bootstrap step for fork PRs (or move it to a trusted workflow), or drop the token if the public@todoist/*packages no longer require GitHub registry auth.