Repository navigation
chore(migrate): add the migrate package to the deploy orchestrator #31350
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 |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: 'Release @ionic/migrate' | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| tag: | ||
| description: 'Which npm tag should this be published to?' | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| release-migrate: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: ./packages/migrate | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| - name: 🟢 Configure Node for Publish | ||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version: 24.x | ||
| registry-url: 'https://registry.npmjs.org' | ||
| scope: '@ionic' | ||
| cache: 'npm' | ||
| cache-dependency-path: packages/migrate/package-lock.json | ||
| - name: 📦 Install latest npm | ||
| run: npm install -g npm@latest | ||
| shell: bash | ||
| - name: 🕸️ Install Dependencies | ||
| run: npm ci | ||
| shell: bash | ||
| - name: 🔎 Resolve Version | ||
| id: resolve-version | ||
| run: | | ||
| set -euo pipefail | ||
| version="$(node -p "require('./package.json').version")" | ||
| echo "version=$version" >> "$GITHUB_OUTPUT" | ||
| echo "Releasing @ionic/migrate@$version to the '${{ inputs.tag }}' tag" | ||
| shell: bash | ||
| - name: 🚧 Ensure Version Is Unpublished | ||
| run: | | ||
| set -euo pipefail | ||
| version="${{ steps.resolve-version.outputs.version }}" | ||
| # `npm view` exits non-zero both for an unpublished version and for a | ||
| # package that does not exist yet, and the latter is the expected state | ||
| # on the very first release. So inspect stdout rather than the exit | ||
| # code: empty output means the version is free to publish. | ||
| if [ -n "$(npm view "@ionic/migrate@$version" version 2>/dev/null || true)" ]; then | ||
| echo "::error::@ionic/migrate@$version is already published. Bump the version in packages/migrate/package.json." | ||
| exit 1 | ||
| fi | ||
| shell: bash | ||
| - name: 🔍 Lint | ||
| run: npm run lint | ||
| shell: bash | ||
| - name: 🧪 Test | ||
| run: npm test | ||
| shell: bash | ||
| - name: 🏗️ Run Build | ||
| run: npm run build | ||
| shell: bash | ||
| # `--access public` is not passed here because publishConfig.access in | ||
| # package.json already sets it; a scoped package would otherwise default to | ||
| # restricted on its first publish. | ||
| - name: 🚀 Publish to NPM | ||
| run: npm publish --tag ${{ inputs.tag }} --provenance | ||
| shell: bash |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,14 @@ | ||
| { | ||
| "//": "packages/migrate is deliberately omitted: @ionic/migrate is versioned independently of the framework and is published by .github/workflows/release-migrate.yml, so `lerna version` must not rewrite it. Listing the packages explicitly is what keeps it out -- lerna 5 ignores negated globs like \"!packages/migrate\". Add new publishable packages here.", | ||
| "packages": [ | ||
| "core", | ||
| "packages/*" | ||
| "packages/angular", | ||
| "packages/angular-server", | ||
| "packages/docs", | ||
| "packages/react", | ||
| "packages/react-router", | ||
| "packages/vue", | ||
| "packages/vue-router" | ||
| ], | ||
| "version": "8.8.17" | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,41 @@ | ||
| { | ||
| "name": "@ionic/migrate", | ||
| "version": "0.0.0", | ||
| "private": true, | ||
| "version": "0.1.0", | ||
| "description": "Migration tool to automate and report on breaking changes across Ionic Framework major versions.", | ||
| "keywords": [ | ||
| "ionic", | ||
| "framework", | ||
| "migrate", | ||
| "migration", | ||
| "codemod", | ||
| "upgrade", | ||
| "angular", | ||
| "react", | ||
| "vue", | ||
| "cli" | ||
| ], | ||
| "license": "MIT", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/ionic-team/ionic-framework.git", | ||
| "directory": "packages/migrate" | ||
| }, | ||
| "engines": { | ||
| "node": ">=20.0.0" | ||
|
Contributor
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. The workflow is using 24, we should consider syncing the minimum version to be used in the workflow. This can be a follow up if we decided to go down that route.
Member
Author
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. Putting it at 24 would be higher than necessary and higher than v9 even requires, so maybe if we go update everything else we do it then? In reality though, we should maybe even consider dropping this to >= 16 for this specific package if that's possible, since that's what v8 - what we're migrating from right now - requires (and presumably some people will be using it because of that version setting the floor). But I think >= 20 is fine for now
Contributor
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. I created a node sync ticket last sprint so we can look into it then. |
||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "type": "module", | ||
| "bin": { | ||
| "ionic-migrate": "./dist/cli.js" | ||
| "ionic-migrate": "dist/cli.js" | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "scripts": { | ||
| "build": "tsc -p tsconfig.build.json", | ||
| "prepack": "npm run build", | ||
| "test": "vitest run", | ||
| "test.watch": "vitest", | ||
| "lint": "tsc --noEmit" | ||
|
|
||
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.
woot!