Migrate excerpt/feed/headings/icons/images/prism/pwa + iles node type emission from tsc to tsdown dts with default .d.mts outputs#339
Conversation
Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/fa271805-854d-48e3-92f6-dc936a87f21c Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com>
Deploying iles with
|
| Latest commit: |
93b62a3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8f656b48.iles.pages.dev |
| Branch Preview URL: | https://copilot-migrate-away-from-ts.iles.pages.dev |
tsc to tsdown dts
|
@copilot Use the default |
Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/09a276ea-1d81-4b51-8159-b5da49e6a427 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com>
Updated in commit 54433ab. Removed the Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
tsc to tsdown dtstsc to tsdown dts with default .d.mts outputs
|
View your CI Pipeline Execution ↗ for commit 93b62a3
☁️ Nx Cloud last updated this comment at |
|
@copilot remove the typescript dev dependency from sub packages that don't need it. |
Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/7bdca0c4-6073-4609-a3fe-266b33931b5a Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com>
Done in 65383c0. Removed unnecessary Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot attempt to replace tsc in |
Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/7b458719-9ff3-40f8-87ff-ff350f0729f2 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com>
Done in 5452cb1. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
tsc to tsdown dts with default .d.mts outputstsc to tsdown dts with default .d.mts outputs
….mjs` (#340) * Initial plan * chore: enable type-aware linting in tsdown configs Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/8d2d6c99-a9d1-4c3a-aadf-fe6c70c7d37c Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * chore: add root lint script using nx run-many Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/e4ed89d0-8715-4493-8e4d-e08a6123d9a2 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * chore: fix lint issue * fix: remove tsdown.config.ts, use `vite.config.ts` instead `typeAware` and `typeCheck` should be in `lint.options`, not `lint`. * fix: linting, avoid using tsdown.config.ts, use vite.config.ts instead * chore: remove unused vite config * fix: load package lint configs as mjs in CI Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/031c0250-2bd3-434c-a3ae-9a8c59646e62 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> Co-authored-by: Maximo Mussini <maximomussini@gmail.com>
…-plus (#335) * Migrate project to Vite+ unified toolchain - Replace vite imports with vite-plus across 20 source files - Replace vitest imports with vite-plus/test across 12 test files - Add vite-plus as dependency, remove standalone vite/vitest deps - Remove Nx task orchestration (nx.json, @nrwl/* deps) - Remove ESLint and related plugins, migrate to oxlint via @oxlint/migrate - Create root vite.config.ts for Vite+ configuration - Create .oxlintrc.json with migrated lint rules - Update root scripts: lint/fmt/check now use vp commands - Update per-package lint scripts to use vp lint - Update iles CLI test command to use vp test - Fix type-only import in shared.d.ts for oxfmt compatibility - Apply oxfmt formatting across entire codebase - Retain tsup for package builds (vp pack incompatible with workspace type resolution for DTS generation) https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit * chore: update local claude settings https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit * Replace tsup with vp pack, restore Nx, make packages ESM-only - Replace tsup with `vp pack` for all 12 packages - Restore nx.json for build orchestration with cloud caching - Remove CJS builds and exports (ESM-only) - Update package exports from .js/.d.ts to .mjs/.d.mts - Remove all tsup.config.ts files (13 files) - Add tsc --emitDeclarationOnly for DTS generation where rolldown DTS plugin cannot handle postcss type syntax - Update bin/iles.js and config.js to reference .mjs output https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit * Configure formatter to omit semicolons Add .oxfmtrc.json with semi: false and reformat all source files. https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit * Configure formatter to use single quotes https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit * Revert formatting changes to keep PR focused on migration Reverts the semicolon removal and single-quote formatting commits. The .oxfmtrc.json config is preserved for future application. https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit * Revert all formatting-only changes from PR Restore original formatting for files that only had oxfmt reformatting (semicolons, quotes, whitespace) without any migration-related changes. Keeps only files with actual vite-plus migration work. https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit * fix: build `hydration` as a browser library * fix: externalize framework deps in hydration and prerender packages The vp pack migration bundled framework dependencies (preact, vue, svelte, solid-js) into the hydration and prerender outputs, causing duplicate instances at runtime. For preact, this meant hooks state (__H) lived on the wrong instance, breaking component mounting. Add peerDependencies so vp pack's DepPlugin externalizes them, and add per-package vite.config.ts files with deps configuration. Also fix the headings package build by disabling auto-DTS in vp pack (it uses tsc separately) and configuring deps.onlyBundle for slugo. https://claude.ai/code/session_01UKpPTEVDMf22aaUSsUhrfD * chore: add svelte.md for claude * fix: add browser resolve condition to prevent Svelte server module loading When vite-plugin-solid sets resolve.conditions to ['solid', 'development'], it replaces Vite's defaults (module, browser). The Svelte plugin then appends 'svelte' but 'browser' is missing, causing Svelte's export map to resolve to index-server.js instead of the browser bundle. This resulted in mount() being unavailable at runtime. Setting conditions explicitly in iles's Vite config defaults ensures browser is always present regardless of framework plugin ordering. https://claude.ai/code/session_01YNwMyHwufBk4A4mLukiHom * Update Svelte to 5.46.4 and add module resolution conditions (#337) * fix: prevent client:none islands from hydrating in dev mode The Island component's `client:none` strategy only skipped hydration during SSR but not in the browser. In dev mode (SPA), this caused a script to be generated that imported `mount` from svelte's server entry, triggering the "mount(...) is not available on the server" error. Also bumps svelte from ^5.1.13 to ^5.46.4 in hydration and prerender packages to satisfy @sveltejs/vite-plugin-svelte@7's peer dependency. https://claude.ai/code/session_01DyKgnqFPLT1z1z4ewaEtMT * fix: add default resolve conditions to prevent server-side Svelte resolution The `vite-plugin-solid` config hook sets `resolve.conditions` to `['solid', 'development']`, replacing Vite's defaults which include `browser` and `module`. Without `browser`, Svelte's package exports resolve to `index-server.js` instead of `index-client.js`, causing `mount(...)` to throw "not available on the server" in the browser. Add `['module', 'browser', 'development']` to the base Vite config so framework plugins append to these defaults rather than replacing them. https://claude.ai/code/session_01DyKgnqFPLT1z1z4ewaEtMT * chore: revert changes and update solid plugin instead --------- Co-authored-by: Claude <noreply@anthropic.com> * chore: avoid importing vite-plus when we intend vite * chore: fix lint issues * Move package `vp pack` CLI flags into per-package `tsdown.config.ts` and add `pnpm pkg-size` utility (#338) Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Maximo Mussini <maximomussini@gmail.com> * Migrate excerpt/feed/headings/icons/images/prism/pwa + iles node type emission from `tsc` to tsdown `dts` with default `.d.mts` outputs (#339) * Initial plan * refactor: migrate package type generation from tsc to tsdown dts Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/fa271805-854d-48e3-92f6-dc936a87f21c Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * refactor: use default d.mts type outputs and export type entries Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/09a276ea-1d81-4b51-8159-b5da49e6a427 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * chore: remove unnecessary typescript devDependencies Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/7bdca0c4-6073-4609-a3fe-266b33931b5a Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * refactor: use tsdown dts for iles build:node Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/7b458719-9ff3-40f8-87ff-ff350f0729f2 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * Fix CI lint config loading by switching package Vite configs to ESM `.mjs` (#340) * Initial plan * chore: enable type-aware linting in tsdown configs Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/8d2d6c99-a9d1-4c3a-aadf-fe6c70c7d37c Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * chore: add root lint script using nx run-many Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/e4ed89d0-8715-4493-8e4d-e08a6123d9a2 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * chore: fix lint issue * fix: remove tsdown.config.ts, use `vite.config.ts` instead `typeAware` and `typeCheck` should be in `lint.options`, not `lint`. * fix: linting, avoid using tsdown.config.ts, use vite.config.ts instead * chore: remove unused vite config * fix: load package lint configs as mjs in CI Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/031c0250-2bd3-434c-a3ae-9a8c59646e62 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> Co-authored-by: Maximo Mussini <maximomussini@gmail.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> Co-authored-by: Maximo Mussini <maximomussini@gmail.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com>
Seven packages (
excerpt,feed,headings,icons,images,prism,pwa) were still generating declarations via explicittsc --emitDeclarationOnlycalls. This change moves type generation into tsdown (dts: true) and uses tsdown’s default declaration output (.d.mts), updating package metadata/exports accordingly.Build pipeline migration (targeted packages)
tsdown.config.tswith:dts: true.d.mtsfiles.tscfor declarations in these modules.Script simplification
buildscript from:vp pack --clean && tsc --emitDeclarationOnly ...vp pack --cleanPackage type/export alignment
typesfield to point to.d.mtsoutputs.exportsto includetypesentries for exported paths (includingfeedsubpath exports), aligning runtime and type resolution.Sub-package dependency cleanup
typescriptdevDependenciesfrom migrated packages that no longer run localtscin their package scripts:@islands/excerpt@islands/headings@islands/images@islands/prismpnpm-lock.yamlaccordingly.ilespackage follow-up migrationpackages/ilesbuild:nodescript:vp pack --clean && tsc --emitDeclarationOnly ...vp pack --cleanpackages/iles/src/node/index.ts:export type { UserConfig } from '../../types/shared'packages/iles/types/index.d.tsto re-export node types from:../dist/node/index.d.mtsilesnode type surface with tsdown.d.mtsoutputs while preserving downstream type-check compatibility.Type checking coverage verification
build:clientrunsvue-tsc --noEmit -p src/client && tsc -p src/clientpnpm blog:checkandpnpm docs:check(vue-tsc --noEmit).Type output consistency guard
packages/iles/tests/package-types.spec.ts) that builds the migrated packages and asserts:.d.mtsfiles are present per package.d.tsfiles are not produced for these packagesExample of the config pattern applied:
> [!WARNING]
>
>
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.