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 all 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,51 @@ | ||
| name: Publish core package | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'core-v*' | ||
| workflow_dispatch: | ||
|
|
||
| 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: publish-core | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| # Publish to GitHub package registry | ||
| publish-github: | ||
| publish: | ||
| if: github.repository == 'todoist/ui-extensions' && github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| timeout-minutes: 15 | ||
| 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 | ||
| 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 | ||
| scope: '@todoist' | ||
| - run: npm install --global npm@11.19.0 | ||
| - run: npm ci --ignore-scripts | ||
| - run: npm run integrity-check --workspace=packages/ui-extensions-core | ||
| - name: Pack once | ||
| run: | | ||
| mkdir -p "$RUNNER_TEMP/core-release" | ||
| npm pack --workspace=packages/ui-extensions-core --ignore-scripts --pack-destination="$RUNNER_TEMP/core-release" | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: core-package | ||
| path: ${{ runner.temp }}/core-release/*.tgz | ||
| if-no-files-found: error | ||
| - name: Publish to npm | ||
|
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.
|
||
| run: npm publish "$RUNNER_TEMP/core-release/"*.tgz --ignore-scripts --provenance --access public --registry=https://registry.npmjs.org/ | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| registry-url: https://npm.pkg.github.com/ | ||
| scope: '@todoist' | ||
| - name: Publish to GitHub Packages | ||
| run: npm publish "$RUNNER_TEMP/core-release/"*.tgz --ignore-scripts --access public --registry=https://npm.pkg.github.com/ | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ github.token }} | ||
| 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.
core-packageartifact for the retry path the README describes ("Keep the original tarball if either registry needs a retry"). Either restore the described publisher and its tests or correct the PR description and README so operators know the retained artifact is currently download-only and retries are manual.