2024-01-16 14:38:05 +00:00
|
|
|
{
|
2024-07-10 16:09:10 +00:00
|
|
|
"name": "@tldraw/sync-core",
|
|
|
|
"description": "A tiny little drawing app (multiplayer sync).",
|
2024-01-16 14:38:05 +00:00
|
|
|
"version": "2.0.0-alpha.11",
|
|
|
|
"private": true,
|
|
|
|
"author": {
|
|
|
|
"name": "tldraw GB Ltd.",
|
|
|
|
"email": "hello@tldraw.com"
|
|
|
|
},
|
|
|
|
"homepage": "https://tldraw.dev",
|
|
|
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
|
|
"repository": {
|
|
|
|
"type": "git",
|
|
|
|
"url": "https://github.com/tldraw/tldraw"
|
|
|
|
},
|
|
|
|
"bugs": {
|
|
|
|
"url": "https://github.com/tldraw/tldraw/issues"
|
|
|
|
},
|
|
|
|
"keywords": [
|
|
|
|
"tldraw",
|
|
|
|
"drawing",
|
|
|
|
"app",
|
|
|
|
"development",
|
|
|
|
"whiteboard",
|
|
|
|
"canvas",
|
|
|
|
"infinite"
|
|
|
|
],
|
|
|
|
"/* NOTE */": "These `main` and `types` fields are rewritten by the build script. They are not the actual values we publish",
|
|
|
|
"main": "./src/index.ts",
|
|
|
|
"types": "./.tsbuild/index.d.ts",
|
|
|
|
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
|
|
|
"files": [],
|
|
|
|
"scripts": {
|
2024-02-14 16:05:59 +00:00
|
|
|
"test-ci": "lazy inherit",
|
|
|
|
"test": "yarn run -T jest",
|
2024-01-16 14:38:05 +00:00
|
|
|
"test-coverage": "lazy inherit",
|
|
|
|
"lint": "yarn run -T tsx ../../scripts/lint.ts"
|
|
|
|
},
|
|
|
|
"devDependencies": {
|
2024-07-10 16:09:10 +00:00
|
|
|
"tldraw": "workspace:*",
|
2024-02-25 11:43:17 +00:00
|
|
|
"typescript": "^5.3.3",
|
2024-01-16 14:38:05 +00:00
|
|
|
"uuid-by-string": "^4.0.0",
|
|
|
|
"uuid-readable": "^0.0.2"
|
|
|
|
},
|
|
|
|
"jest": {
|
2024-07-10 16:09:10 +00:00
|
|
|
"resolver": "<rootDir>/jestResolver.js",
|
2024-01-16 14:38:05 +00:00
|
|
|
"preset": "config/jest/node",
|
use native structuredClone on node, cloudflare workers, and in tests (#3166)
Currently, we only use native `structuredClone` in the browser, falling
back to `JSON.parse(JSON.stringify(...))` elsewhere, despite Node
supporting `structuredClone` [since
v17](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone)
and Cloudflare Workers supporting it [since
2022](https://blog.cloudflare.com/standards-compliant-workers-api/).
This PR adjusts our shim to use the native `structuredClone` on all
platforms, if available.
Additionally, `jsdom` doesn't implement `structuredClone`, a bug [open
since 2022](https://github.com/jsdom/jsdom/issues/3363). This PR patches
`jsdom` environment in all packages/apps that use it for tests.
Also includes a driveby removal of `deepCopy`, a function that is
strictly inferior to `structuredClone`.
### Change Type
<!-- ❗ Please select a 'Scope' label ❗️ -->
- [x] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff
<!-- ❗ Please select a 'Type' label ❗️ -->
- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [x] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know
### Test Plan
1. A smoke test would be enough
- [ ] Unit Tests
- [x] End to end tests
2024-03-18 17:16:09 +00:00
|
|
|
"testEnvironment": "../../../packages/utils/patchedJestJsDom.js",
|
2024-01-16 14:38:05 +00:00
|
|
|
"moduleNameMapper": {
|
|
|
|
"^~(.*)": "<rootDir>/src/$1"
|
|
|
|
},
|
|
|
|
"transformIgnorePatterns": [
|
|
|
|
"ignore everything. swc is fast enough to transform everything"
|
|
|
|
],
|
|
|
|
"setupFiles": [
|
|
|
|
"./setupJest.js"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"dependencies": {
|
2024-07-10 16:09:10 +00:00
|
|
|
"@tldraw/state": "workspace:*",
|
|
|
|
"@tldraw/store": "workspace:*",
|
|
|
|
"@tldraw/tlschema": "workspace:*",
|
2024-01-16 14:38:05 +00:00
|
|
|
"@tldraw/utils": "workspace:*",
|
|
|
|
"lodash.isequal": "^4.5.0",
|
|
|
|
"nanoevents": "^7.0.1",
|
|
|
|
"nanoid": "4.0.2",
|
|
|
|
"ws": "^8.16.0"
|
2024-01-30 11:41:46 +00:00
|
|
|
},
|
|
|
|
"peerDependencies": {
|
|
|
|
"react": "^18",
|
|
|
|
"react-dom": "^18"
|
2024-01-16 14:38:05 +00:00
|
|
|
}
|
|
|
|
}
|