Skip to content

Commit 415fa0d

Browse files
petera2ccursoragent
andcommitted
fix(angular,svelte): ship APF metadata and published types for 4.1.2
Build @simple-table/angular with ng-packagr so Angular 19+ standalone imports get Ivy ɵcmp metadata, fix @simple-table/svelte dist types and Svelte 5 peers, and release all packages as 4.1.2. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 7a6331c commit 415fa0d

28 files changed

Lines changed: 1661 additions & 371 deletions

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,20 @@ jobs:
3232
# *source*, so no build step is required.
3333
- name: Run React adapter tests
3434
run: pnpm --filter @simple-table/react run test
35+
36+
- name: Run Angular adapter unit tests
37+
run: pnpm --filter @simple-table/angular run test
38+
39+
# Consumer compile test imports the built package (not source). Requires
40+
# Angular Package Format Ivy metadata in dist .d.ts files.
41+
- name: Build Angular adapter
42+
run: pnpm run build:angular
43+
44+
- name: Run Angular consumer standalone-import test
45+
run: pnpm --filter @simple-table/angular run test:consumer
46+
47+
- name: Build Svelte adapter
48+
run: pnpm run build:svelte
49+
50+
- name: Run Svelte consumer types test
51+
run: pnpm --filter @simple-table/svelte run test:consumer

apps/marketing/src/constants/changelog.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,31 @@ export interface ChangelogEntry {
1111
}[];
1212
}
1313

14+
export const v4_1_2: ChangelogEntry = {
15+
version: "4.1.2",
16+
date: "2026-08-01",
17+
title: "Angular Package Format and Svelte published types",
18+
description:
19+
"Ship @simple-table/angular with Ivy partial-compilation metadata so Angular 19+ standalone imports work, and fix @simple-table/svelte published TypeScript declarations plus the Svelte 5 peer range.",
20+
changes: [
21+
{
22+
type: "bugfix",
23+
description:
24+
"@simple-table/angular now builds with ng-packagr (Angular Package Format / partial Ivy). Standalone apps can import SimpleTableComponent without TS-992012 (“Component imports must be standalone…”).",
25+
},
26+
{
27+
type: "bugfix",
28+
description:
29+
"@simple-table/svelte ships SimpleTable.svelte.d.ts in the published package so TypeScript can resolve the SimpleTable export from dist types.",
30+
},
31+
{
32+
type: "breaking",
33+
description:
34+
"@simple-table/svelte peer dependency is now svelte >=5.0.0 (the adapter already used Svelte 5 mount/unmount APIs).",
35+
},
36+
],
37+
};
38+
1439
export const v4_1_1: ChangelogEntry = {
1540
version: "4.1.1",
1641
date: "2026-07-29",
@@ -2502,6 +2527,7 @@ export const v1_4_4: ChangelogEntry = {
25022527

25032528
// Array of all changelog entries (newest first)
25042529
export const CHANGELOG_ENTRIES: ChangelogEntry[] = [
2530+
v4_1_2,
25052531
v4_1_1,
25062532
v4_1_0,
25072533
v4_0_9,

packages/angular/ng-package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "dist",
34
"lib": {
45
"entryFile": "src/index.ts"
56
},
6-
"dest": "dist"
7+
"allowedNonPeerDependencies": ["simple-table-core"]
78
}

packages/angular/package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
22
"name": "@simple-table/angular",
3-
"version": "4.1.1",
4-
"main": "dist/cjs/index.js",
5-
"module": "dist/index.es.js",
6-
"types": "dist/types/index.d.ts",
3+
"version": "4.1.2",
4+
"type": "module",
5+
"main": "./dist/fesm2022/simple-table-angular.mjs",
6+
"module": "./dist/fesm2022/simple-table-angular.mjs",
7+
"types": "./dist/index.d.ts",
78
"scripts": {
8-
"build": "rollup -c",
9-
"preview": "rollup -c -w",
9+
"build": "ng-packagr -p ng-package.json -c tsconfig.lib.json && node scripts/copy-styles.mjs",
10+
"preview": "node scripts/copy-styles.mjs && ng-packagr -p ng-package.json -c tsconfig.lib.json --watch",
1011
"typecheck": "tsc -p tsconfig.json --noEmit",
11-
"test": "vitest run",
12+
"test": "vitest run --exclude src/__tests__/consumerStandaloneImport.compiler.test.ts",
13+
"test:consumer": "vitest run src/__tests__/consumerStandaloneImport.compiler.test.ts",
1214
"version:patch": "npm version patch && git push && git push --tags",
1315
"version:minor": "npm version minor && git push && git push --tags",
1416
"version:major": "npm version major && git push && git push --tags"
@@ -19,9 +21,9 @@
1921
],
2022
"exports": {
2123
".": {
22-
"import": "./dist/index.es.js",
23-
"require": "./dist/cjs/index.js",
24-
"types": "./dist/types/index.d.ts"
24+
"types": "./dist/index.d.ts",
25+
"import": "./dist/fesm2022/simple-table-angular.mjs",
26+
"default": "./dist/fesm2022/simple-table-angular.mjs"
2527
},
2628
"./styles.css": {
2729
"types": "./styles.css.d.ts",
@@ -33,32 +35,30 @@
3335
"access": "public"
3436
},
3537
"files": [
36-
"dist",
38+
"dist/fesm2022",
39+
"dist/index.d.ts",
40+
"dist/index.d.ts.map",
41+
"dist/styles.css",
3742
"LICENSE",
43+
"README.md",
3844
"styles.css.d.ts"
3945
],
4046
"peerDependencies": {
4147
"@angular/common": ">=17.0.0 <22.0.0",
4248
"@angular/core": ">=17.0.0 <22.0.0"
4349
},
4450
"dependencies": {
45-
"simple-table-core": "workspace:*"
51+
"simple-table-core": "workspace:*",
52+
"tslib": "^2.8.1"
4653
},
4754
"devDependencies": {
48-
"@angular/common": "^20.0.0",
49-
"@angular/compiler": "^20.0.0",
50-
"@angular/compiler-cli": "^20.0.0",
51-
"@angular/core": "^20.0.0",
52-
"@rollup/plugin-alias": "4.0.0",
53-
"@rollup/plugin-node-resolve": "^15.3.0",
55+
"@angular/common": "^20.3.27",
56+
"@angular/compiler": "^20.3.27",
57+
"@angular/compiler-cli": "^20.3.27",
58+
"@angular/core": "^20.3.27",
5459
"@types/node": "^16.18.126",
5560
"jsdom": "^24.1.3",
56-
"rollup": "^2.79.2",
57-
"rollup-plugin-delete": "^2.1.0",
58-
"rollup-plugin-peer-deps-external": "^2.2.4",
59-
"rollup-plugin-terser": "^7.0.2",
60-
"rollup-plugin-typescript2": "^0.37.0",
61-
"tslib": "^2.8.1",
61+
"ng-packagr": "^20.3.2",
6262
"typescript": "^5.9.0",
6363
"vitest": "^2.1.9",
6464
"zone.js": "^0.15.0"

packages/angular/rollup.config.js

Lines changed: 0 additions & 115 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import fs from "node:fs";
2+
import path from "node:path";
3+
import { fileURLToPath } from "node:url";
4+
5+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
6+
const pkgRoot = path.resolve(__dirname, "..");
7+
const src = path.resolve(pkgRoot, "../core/dist/styles.css");
8+
const dest = path.join(pkgRoot, "dist/styles.css");
9+
10+
if (!fs.existsSync(src)) {
11+
console.error(
12+
`[copy-styles] Missing ${src}. Build simple-table-core first.`,
13+
);
14+
process.exit(1);
15+
}
16+
17+
fs.mkdirSync(path.dirname(dest), { recursive: true });
18+
fs.copyFileSync(src, dest);
19+
console.log(`[copy-styles] Copied styles.css → ${path.relative(pkgRoot, dest)}`);

0 commit comments

Comments
 (0)