Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .changeset/phase-0-3-rename-and-publish-workflow.md

This file was deleted.

17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,55 @@
# 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/).

## [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.
- **Package template** (`defaults/package/`) no longer ships a `Gruntfile.js`. New packages use `rimraf + tsc + tsconfig-to-dual-package` for dual ESM/CJS output.
- **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 <filepath>` — 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 <args>` — 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 <cmd>` → `yarn linked <cmd>`. The legacy alias still works but emits a deprecation warning.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down