* test(core): move the fig round-trip suite into the package test home
The reader change added `verifier-contracts.test.ts` under
`tests/engine` and grew the migration baseline to admit it, which the
testing architecture forbids: new tests go to the canonical home and
the baseline only shrinks. It also started
`packages/core/tests/io/formats/fig/roundtrip/`, leaving two homes for
one domain.
These tests drive Core's exporter, so Core's home is the canonical one.
The directory moves whole — eleven files, its helpers and raw verifiers
with it — and picks up the local `assert`, `traversal`, `test-utils`
and fixture helpers already there. The baseline loses nine entries.
* refactor(core): address test helpers by alias instead of drilling
`open-pencil/no-deep-parent-relative-imports` already forbids `../../`
drilling, but `lint:structure` names the directories it checks and
`packages/{core,scene-graph,vue}/tests` were never added — so the 72
drilled imports in Core's tests, including the ones the round-trip move
just wrote, were never seen.
Core gains `#core-tests/*` beside fig's `#fig-tests/*`, registered with
the architecture rules, and its tests reach their helpers through it
and their source through `#core/*`. The three test directories join
`lint:structure`, which also surfaced six errors they had never been
checked for: four duplicated imports, an empty `noop`, and a
self-assignment the test meant, now written through a named binding.
Both guides state the rule, since a lint nobody can find in prose is
how this went unnoticed.
* fix(tools): point the heavy unit patterns at the relocated round-trip tests
`HEAVY_UNIT_TEST_PATTERNS` still listed the three heavy round-trip
tests under `tests/engine`. `test:unit` discovers them by directory so
the move looked clean, but `--heavy-only` selects by path and silently
stopped choosing them: 8 files, 52 tests, where it now runs 11 and 80.
216 lines
6.1 KiB
JSON
216 lines
6.1 KiB
JSON
{
|
|
"name": "@open-pencil/core",
|
|
"version": "0.15.1",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/open-pencil/open-pencil.git",
|
|
"directory": "packages/core"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"src",
|
|
"assets"
|
|
],
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"imports": {
|
|
"#core/*": "./src/*.ts",
|
|
"#core-tests/*": "./tests/*.ts"
|
|
},
|
|
"exports": {
|
|
"./package.json": "./package.json",
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./geometry": {
|
|
"types": "./dist/geometry/index.d.ts",
|
|
"import": "./dist/geometry/index.js",
|
|
"default": "./dist/geometry/index.js"
|
|
},
|
|
"./text": {
|
|
"types": "./dist/text/index.d.ts",
|
|
"import": "./dist/text/index.js",
|
|
"default": "./dist/text/index.js"
|
|
},
|
|
"./text/web-font/assets": {
|
|
"types": "./dist/text/web-font/assets.d.ts",
|
|
"import": "./dist/text/web-font/assets.js",
|
|
"default": "./dist/text/web-font/assets.js"
|
|
},
|
|
"./vector": {
|
|
"types": "./dist/vector/index.d.ts",
|
|
"import": "./dist/vector/index.js",
|
|
"default": "./dist/vector/index.js"
|
|
},
|
|
"./figma-api": {
|
|
"types": "./dist/figma-api/index.d.ts",
|
|
"import": "./dist/figma-api/index.js",
|
|
"default": "./dist/figma-api/index.js"
|
|
},
|
|
"./icons": {
|
|
"types": "./dist/icons/index.d.ts",
|
|
"import": "./dist/icons/index.js",
|
|
"default": "./dist/icons/index.js"
|
|
},
|
|
"./canvas": {
|
|
"types": "./dist/canvas/index.d.ts",
|
|
"import": "./dist/canvas/index.js",
|
|
"default": "./dist/canvas/index.js"
|
|
},
|
|
"./design-jsx": {
|
|
"types": "./dist/design-jsx/index.d.ts",
|
|
"import": "./dist/design-jsx/index.js",
|
|
"default": "./dist/design-jsx/index.js"
|
|
},
|
|
"./editor": {
|
|
"types": "./dist/editor/index.d.ts",
|
|
"import": "./dist/editor/index.js",
|
|
"default": "./dist/editor/index.js"
|
|
},
|
|
"./tools": {
|
|
"types": "./dist/tools/index.d.ts",
|
|
"import": "./dist/tools/index.js",
|
|
"default": "./dist/tools/index.js"
|
|
},
|
|
"./profiler": {
|
|
"types": "./dist/profiler/index.d.ts",
|
|
"import": "./dist/profiler/index.js",
|
|
"default": "./dist/profiler/index.js"
|
|
},
|
|
"./rpc": {
|
|
"types": "./dist/rpc/index.d.ts",
|
|
"import": "./dist/rpc/index.js",
|
|
"default": "./dist/rpc/index.js"
|
|
},
|
|
"./library": {
|
|
"bun": "./src/library/index.ts",
|
|
"types": "./dist/library/index.d.ts",
|
|
"import": "./dist/library/index.js",
|
|
"default": "./dist/library/index.js"
|
|
},
|
|
"./lint": {
|
|
"types": "./dist/lint/index.d.ts",
|
|
"import": "./dist/lint/index.js",
|
|
"default": "./dist/lint/index.js"
|
|
},
|
|
"./io": {
|
|
"types": "./dist/io/index.d.ts",
|
|
"import": "./dist/io/index.js",
|
|
"default": "./dist/io/index.js"
|
|
},
|
|
"./io/formats/fig": {
|
|
"types": "./dist/io/formats/fig/index.d.ts",
|
|
"import": "./dist/io/formats/fig/index.js",
|
|
"default": "./dist/io/formats/fig/index.js"
|
|
},
|
|
"./io/formats/raster": {
|
|
"types": "./dist/io/formats/raster/index.d.ts",
|
|
"import": "./dist/io/formats/raster/index.js",
|
|
"default": "./dist/io/formats/raster/index.js"
|
|
},
|
|
"./io/formats/svg": {
|
|
"types": "./dist/io/formats/svg/index.d.ts",
|
|
"import": "./dist/io/formats/svg/index.js",
|
|
"default": "./dist/io/formats/svg/index.js"
|
|
},
|
|
"./kiwi": {
|
|
"types": "./dist/kiwi/index.d.ts",
|
|
"import": "./dist/kiwi/index.js",
|
|
"default": "./dist/kiwi/index.js"
|
|
},
|
|
"./clipboard": {
|
|
"types": "./dist/clipboard.d.ts",
|
|
"import": "./dist/clipboard.js",
|
|
"default": "./dist/clipboard.js"
|
|
},
|
|
"./constants": {
|
|
"types": "./dist/constants.d.ts",
|
|
"import": "./dist/constants.js",
|
|
"default": "./dist/constants.js"
|
|
},
|
|
"./random": {
|
|
"types": "./dist/random.d.ts",
|
|
"import": "./dist/random.js",
|
|
"default": "./dist/random.js"
|
|
},
|
|
"./xpath": {
|
|
"types": "./dist/xpath.d.ts",
|
|
"import": "./dist/xpath.js",
|
|
"default": "./dist/xpath.js"
|
|
},
|
|
"./canvaskit": {
|
|
"types": "./dist/canvaskit.d.ts",
|
|
"import": "./dist/canvaskit.js",
|
|
"default": "./dist/canvaskit.js"
|
|
},
|
|
"./layout": {
|
|
"types": "./dist/layout.d.ts",
|
|
"import": "./dist/layout.js",
|
|
"default": "./dist/layout.js"
|
|
}
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"provenance": true
|
|
},
|
|
"scripts": {
|
|
"build": "bunx tsdown --config tsdown.config.ts",
|
|
"prepublishOnly": "bun run build",
|
|
"test": "bun test tests",
|
|
"typecheck": "bunx tsgo --noEmit -p tsconfig.test.json"
|
|
},
|
|
"dependencies": {
|
|
"@chenglou/pretext": "^0.0.7",
|
|
"@iconify/utils": "^3.1.4",
|
|
"@open-pencil/design-jsx": "workspace:*",
|
|
"@open-pencil/dom-css": "workspace:*",
|
|
"@open-pencil/fig": "workspace:*",
|
|
"@open-pencil/kiwi": "workspace:*",
|
|
"@open-pencil/pen": "workspace:*",
|
|
"@open-pencil/scene-graph": "workspace:*",
|
|
"@tauri-apps/api": "^2.11.1",
|
|
"@valibot/to-json-schema": "^1.8.0",
|
|
"@xmldom/xmldom": "^0.9.11",
|
|
"acorn": "^8.18.0",
|
|
"canvaskit-wasm": "^0.41.1",
|
|
"culori": "^4.0.2",
|
|
"dedent": "^1.7.2",
|
|
"destr": "^2.0.5",
|
|
"diff": "^8.0.4",
|
|
"es-toolkit": "^1.51.0",
|
|
"fflate": "^0.8.3",
|
|
"fontoxpath": "^3.34.0",
|
|
"fzstd": "^0.1.1",
|
|
"js-base64": "^3.9.3",
|
|
"jsep": "^1.4.0",
|
|
"jspdf": "^4.2.1",
|
|
"nanoevents": "^9.1.0",
|
|
"ofetch": "^1.5.1",
|
|
"opentype.js": "^2.0.0",
|
|
"pptxgenjs": "^4.0.1",
|
|
"rbush": "^4.0.1",
|
|
"sucrase": "^3.35.1",
|
|
"svg-path-properties": "^2.0.2",
|
|
"svg2pdf.js": "^2.7.0",
|
|
"svgpath": "^2.6.0",
|
|
"twirlwind": "^0.3.0",
|
|
"unifont": "0.7.4",
|
|
"valibot": "^1.4.2",
|
|
"yoga-layout": "npm:@open-pencil/yoga-layout@3.3.0-grid.3"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "^1.3.14",
|
|
"@types/culori": "^4.0.1",
|
|
"@types/diff": "^8.0.0",
|
|
"@types/opentype.js": "^1.3.10",
|
|
"@types/rbush": "^4.0.0",
|
|
"typescript": "~5.8.3",
|
|
"unplugin-raw": "^0.7.0"
|
|
}
|
|
}
|