diff --git a/.changeset/phase-0-3-rename-and-publish-workflow.md b/.changeset/phase-0-3-rename-and-publish-workflow.md deleted file mode 100644 index df54065..0000000 --- a/.changeset/phase-0-3-rename-and-publish-workflow.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@_linked/cli': minor ---- - -Phase 0.3 accumulated changes: - -- **New `linked setup-publish` command**: scaffolds a changesets-based publish workflow in any package repo. Supports single-branch (default) and `--dual-branch` (main + dev with `@next` prereleases). Patches package.json (publishConfig + changesets devDeps), generates package-lock.json in an isolated tmpdir, writes `.github/workflows/{ci,publish,changeset-check}.yml`, and optionally configures GitHub branch protection via `--configure-github` (uses `gh` CLI). -- **`linked build-workspace` now invokes each package's own `yarn build` script** instead of the internal buildPackage pipeline. Lets @_linked/core use pure tsc, pure-CSS packages use no-ops, and lincd-style packages use `yarn linked build`. -- **`linked yarn` (safeYarn) gains `LINKED_YARN_DRY_RUN` env** for testing arg forwarding without executing. -- **Import checker is warn-only** (was fatal): emits yellow warnings listing missing `.js` extensions but doesn't abort the build. -- **compilePackageESM/CJS** skip gracefully when tsconfig-{esm,cjs}.json is absent (pure-CSS packages). -- **Dual-package step** uses `npx tsconfig-to-dual-package` so the binary resolves from nearest node_modules. -- **runOnPackagesGroupedByDependencies**: tolerate packages without `dependencies` field. -- **Package template modernized**: uses `yarn linked build` pattern (matches foundational packages), Gruntfile removed. -- **App template**: adds `mrgit-template.json`, `yarn setup` script, `linkedApp: true` flag, `mrgit` devDep. -- **`linkedPackage: true` / `linkedApp: true`** flags added to cli-methods readers (alongside legacy `lincd` / `lincdApp` for transition period). -- **Bug fix**: lingering `lincd-server/*` imports in LincdServer.tsx migrated to `@_linked/server/*`. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99a122b..9ed78bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,23 +8,36 @@ on: jobs: build-and-test: name: Build & Test - # Skip CI on the automated Release PR created by changesets/action. - if: ${{ !(github.event.pull_request.base.ref == 'main' && github.head_ref == 'changeset-release/main') }} runs-on: ubuntu-latest steps: + - name: Detect Release PR + id: rpr + run: | + if [[ "${{ github.event.pull_request.head.ref }}" == "changeset-release/main" ]]; then + echo "is_release_pr=true" >> $GITHUB_OUTPUT + echo "Release PR from changesets/action detected — skipping build/test (auto-generated version+CHANGELOG only)." + else + echo "is_release_pr=false" >> $GITHUB_OUTPUT + fi + - name: Checkout + if: steps.rpr.outputs.is_release_pr == 'false' uses: actions/checkout@v4 - name: Setup Node.js + if: steps.rpr.outputs.is_release_pr == 'false' uses: actions/setup-node@v4 with: node-version: 22.16.0 - name: Install dependencies + if: steps.rpr.outputs.is_release_pr == 'false' run: npm ci --legacy-peer-deps - name: Build + if: steps.rpr.outputs.is_release_pr == 'false' run: npm run build - name: Test + if: steps.rpr.outputs.is_release_pr == 'false' run: npm test --if-present diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f408f5..5521e10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## 1.3.0 + +### Minor Changes + +- [#17](https://github.com/linked-cm/cli/pull/17) [`3c81281`](https://github.com/linked-cm/cli/commit/3c81281ce9ef4b16c08f341923f6920b9b9c7f6b) Thanks [@flyon](https://github.com/flyon)! - Phase 0.3 accumulated changes: + - **New `linked setup-publish` command**: scaffolds a changesets-based publish workflow in any package repo. Supports single-branch (default) and `--dual-branch` (main + dev with `@next` prereleases). Patches package.json (publishConfig + changesets devDeps), generates package-lock.json in an isolated tmpdir, writes `.github/workflows/{ci,publish,changeset-check}.yml`, and optionally configures GitHub branch protection via `--configure-github` (uses `gh` CLI). + - **`linked build-workspace` now invokes each package's own `yarn build` script** instead of the internal buildPackage pipeline. Lets @\_linked/core use pure tsc, pure-CSS packages use no-ops, and lincd-style packages use `yarn linked build`. + - **`linked yarn` (safeYarn) gains `LINKED_YARN_DRY_RUN` env** for testing arg forwarding without executing. + - **Import checker is warn-only** (was fatal): emits yellow warnings listing missing `.js` extensions but doesn't abort the build. + - **compilePackageESM/CJS** skip gracefully when tsconfig-{esm,cjs}.json is absent (pure-CSS packages). + - **Dual-package step** uses `npx tsconfig-to-dual-package` so the binary resolves from nearest node_modules. + - **runOnPackagesGroupedByDependencies**: tolerate packages without `dependencies` field. + - **Package template modernized**: uses `yarn linked build` pattern (matches foundational packages), Gruntfile removed. + - **App template**: adds `mrgit-template.json`, `yarn setup` script, `linkedApp: true` flag, `mrgit` devDep. + - **`linkedPackage: true` / `linkedApp: true`** flags added to cli-methods readers (alongside legacy `lincd` / `lincdApp` for transition period). + - **Bug fix**: lingering `lincd-server/*` imports in LincdServer.tsx migrated to `@_linked/server/*`. + All notable changes to `@_linked/cli` (formerly `lincd-cli`) are documented here. This project follows [Keep a Changelog](https://keepachangelog.com/) and [Semantic Versioning](https://semver.org/). @@ -7,6 +24,7 @@ This project follows [Keep a Changelog](https://keepachangelog.com/) and [Semant ## [1.2.11] - 2026-04-22 ### Changed + - **Renamed package**: `lincd-cli` → `@_linked/cli`. Repo moved from `semantu/lincd-cli` → `linked-cm/cli`. - **Primary binary** is now `linked` (with `lnk` as a short alias). - **Flag in package.json** is now `linkedPackage: true` (packages) / `linkedApp: true` (apps). The legacy flags `lincd: true` / `lincdApp: true` are still read for a transition period. @@ -14,20 +32,24 @@ This project follows [Keep a Changelog](https://keepachangelog.com/) and [Semant - **App template** (`defaults/app-with-backend/`) now includes `mrgit-template.json`, a `yarn setup` script, and `mrgit` as a devDep. Run `yarn setup` after `linked create-app` to optionally clone sibling `@_linked/*` repos for local development. ### Added + - `linked build-workspace` — builds all linked packages in the current workspace in dependency order. Supports `-u` (updated only) and `--use-git` (git-based change detection). Migrated from `@semantu/cli`. - `linked build-package ` — given a file path, walks up to the nearest `package.json` and rebuilds that package. Designed for editor save hooks. Migrated from `@semantu/cli`. - `linked yarn ` — safe-yarn wrapper that preserves nested repo yarn.lock files during root-level yarn commands (for mrgit workflows). Migrated from `@semantu/cli`. ### Deprecated + - The `lincd` binary is retained as a deprecated alias that prints a warning to stderr on invocation. It will be removed in a future major release; migrate scripts to `linked`. - `generateGruntConfig` export has been removed; it had no active callers. If you still reference it, migrate your package build to `tsc + tsconfig-to-dual-package` (see the package template). ### Removed + - Grunt bin entry (`grunt`) removed from package.json bins. - Internal `config-grunt.cts` and `getGruntConfig` helper removed. - Grunt-related devDependencies (`grunt`, `grunt-cli`, `grunt-*`, `@lodder/grunt-postcss`, `load-grunt-tasks`) removed. ### Migration notes + - Update `package.json` deps: `lincd-cli` → `@_linked/cli`. - Update `package.json` flag: `lincd: true` → `linkedPackage: true` (and `lincdApp: true` → `linkedApp: true` for apps). Legacy flags still read for now. - Update scripts: `yarn lincd ` → `yarn linked `. The legacy alias still works but emits a deprecation warning. diff --git a/package.json b/package.json index 3fe4d2d..1ae4e77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@_linked/cli", - "version": "1.2.11", + "version": "1.3.0", "description": "Command line tools for the @_linked/* packages and apps", "main": "lib/cjs/index.js", "module": "lib/esm/index.js",