|
3 | 3 | "version": "9.3.22", |
4 | 4 | "description": "HTML5 2d canvas library.", |
5 | 5 | "author": "Anton Lavrenov", |
| 6 | + "type": "module", |
6 | 7 | "files": [ |
7 | 8 | "README.md", |
8 | 9 | "konva.js", |
9 | 10 | "konva.min.js", |
10 | | - "lib", |
11 | | - "cmj" |
| 11 | + "lib" |
12 | 12 | ], |
13 | | - "main": "./lib/index-node.js", |
14 | | - "browser": "./lib/index.js", |
15 | | - "typings": "./lib/index-types.d.ts", |
| 13 | + "exports": { |
| 14 | + ".": { |
| 15 | + "default": "./lib/index.js" |
| 16 | + }, |
| 17 | + "./setup-node-canvas": { |
| 18 | + "default": "./lib/setup-node-canvas.js" |
| 19 | + } |
| 20 | + }, |
| 21 | + "main": "./lib/index.js", |
| 22 | + "types": "./lib/index-types.d.ts", |
16 | 23 | "scripts": { |
17 | 24 | "start": "npm run test:watch", |
18 | 25 | "compile": "npm run clean && npm run tsc && cp ./src/index-types.d.ts ./lib/index-types.d.ts && npm run rollup", |
|
22 | 29 | "test:build": "PARCEL_WORKER_BACKEND=process parcel build ./test/unit-tests.html --dist-dir ./test-build --target none --public-url ./ --no-source-maps", |
23 | 30 | "test:browser": "npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security -a no-sandbox -a disable-setuid-sandbox", |
24 | 31 | "test:watch": "rm -rf ./.parcel-cache && PARCEL_WORKERS=0 parcel serve ./test/unit-tests.html ./test/manual-tests.html ./test/sandbox.html ./test/text-paths.html ./test/bunnies.html", |
25 | | - "test:node:compiled": "rm -rf ./.test-temp && mkdir ./.test-temp && (tsc -p ./test/tsconfig.json --outDir ./.test-temp || true) && mocha './.test-temp/test/unit/**/*.js' -r ./test/node-global-setup.mjs --exit && rm -rf ./.test-temp && npm run test:import", |
26 | | - "test:node": "npm run test:node:compiled", |
| 32 | + |
| 33 | + "test:node:canvas": "rm -rf ./.test-temp && mkdir ./.test-temp && (tsc -p ./test/tsconfig.json --outDir ./.test-temp || true) && node ./rename-imports-test.mjs && mocha './.test-temp/test/unit/**/*.js' -r ./test/node-canvas-global-setup.mjs --exit && rm -rf ./.test-temp && npm run test:import", |
| 34 | + "test:node:skia": "rm -rf ./.test-temp && mkdir ./.test-temp && (tsc -p ./test/tsconfig.json --outDir ./.test-temp || true) && node ./rename-imports-test.mjs && mocha './.test-temp/test/unit/**/*.js' -r ./test/node-skia-global-setup.mjs --exit && rm -rf ./.test-temp && npm run test:import", |
| 35 | + "test:node": "npm run test:node:canvas && npm run test:node:skia", |
27 | 36 | "tsc": "tsc --removeComments", |
28 | | - "rollup": "rollup -c --bundleConfigAsCjs", |
| 37 | + "rollup": "rollup -c", |
29 | 38 | "clean": "rm -rf ./lib && rm -rf ./types && rm -rf ./cmj && rm -rf ./test-build", |
30 | 39 | "watch": "rollup -c -w", |
31 | 40 | "size": "size-limit" |
|
61 | 70 | } |
62 | 71 | ], |
63 | 72 | "devDependencies": { |
64 | | - "@parcel/transformer-image": "2.13.2", |
65 | | - "@size-limit/preset-big-lib": "^11.1.6", |
| 73 | + "@parcel/transformer-image": "2.15.4", |
| 74 | + "@size-limit/preset-big-lib": "^11.2.0", |
66 | 75 | "@types/mocha": "^10.0.10", |
67 | | - "canvas": "^3.1.0", |
68 | | - "chai": "5.1.2", |
| 76 | + "canvas": "^3.1.2", |
| 77 | + "chai": "5.2.1", |
69 | 78 | "filehound": "^1.17.6", |
70 | | - "gulp": "^5.0.0", |
| 79 | + "gulp": "^5.0.1", |
71 | 80 | "gulp-concat": "^2.6.1", |
72 | 81 | "gulp-connect": "^5.7.0", |
73 | 82 | "gulp-exec": "^5.0.0", |
74 | 83 | "gulp-jsdoc3": "^3.0.0", |
75 | | - "gulp-rename": "^2.0.0", |
| 84 | + "gulp-rename": "^2.1.0", |
76 | 85 | "gulp-replace": "^1.1.4", |
77 | 86 | "gulp-typescript": "^5.0.1", |
78 | 87 | "gulp-uglify": "^3.0.2", |
|
82 | 91 | "mocha-headless-chrome": "^4.0.0", |
83 | 92 | "parcel": "2.13.3", |
84 | 93 | "process": "^0.11.10", |
85 | | - "rollup": "^4.31.0", |
| 94 | + "rollup": "^4.46.2", |
86 | 95 | "rollup-plugin-typescript2": "^0.36.0", |
87 | | - "size-limit": "^11.1.6", |
88 | | - "ts-mocha": "^10.0.0", |
| 96 | + "size-limit": "^11.2.0", |
| 97 | + "skia-canvas": "^2.0.2", |
| 98 | + "ts-mocha": "^11.1.0", |
89 | 99 | "ts-node": "^10.9.2", |
90 | | - "typescript": "^5.7.3" |
| 100 | + "typescript": "^5.9.2" |
91 | 101 | }, |
92 | 102 | "keywords": [ |
93 | 103 | "canvas", |
|
0 commit comments