From 927cafb46199d952270236d44a2abf1ff162314c Mon Sep 17 00:00:00 2001 From: Nikita Melnikov Date: Wed, 28 Aug 2024 17:53:34 +0300 Subject: [PATCH] basic implementation of the Operation and CollaborationManager (#76) * basic implementation of the Operation and CollaborationManager * use switch/case and upgrade ts * use index builder + format fixes * Apply suggestions from code review Co-authored-by: Peter * fix ci --------- Co-authored-by: Peter --- packages/collaboration-manager/.eslintrc.yml | 27 ++ packages/collaboration-manager/.gitignore | 24 ++ packages/collaboration-manager/jest.config.ts | 15 + packages/collaboration-manager/package.json | 38 ++ .../src/CollaborationManager.spec.ts | 87 +++++ .../src/CollaborationManager.ts | 78 ++++ .../collaboration-manager/src/Operation.ts | 59 +++ packages/collaboration-manager/src/index.ts | 2 + .../collaboration-manager/stryker.conf.mjs | 34 ++ .../collaboration-manager/tsconfig.build.json | 13 + packages/collaboration-manager/tsconfig.json | 20 + packages/dom-adapters/package.json | 6 +- packages/model/package.json | 6 +- packages/playground/package.json | 6 +- yarn.lock | 359 +++++++++++++----- 15 files changed, 671 insertions(+), 103 deletions(-) create mode 100644 packages/collaboration-manager/.eslintrc.yml create mode 100644 packages/collaboration-manager/.gitignore create mode 100644 packages/collaboration-manager/jest.config.ts create mode 100644 packages/collaboration-manager/package.json create mode 100644 packages/collaboration-manager/src/CollaborationManager.spec.ts create mode 100644 packages/collaboration-manager/src/CollaborationManager.ts create mode 100644 packages/collaboration-manager/src/Operation.ts create mode 100644 packages/collaboration-manager/src/index.ts create mode 100644 packages/collaboration-manager/stryker.conf.mjs create mode 100644 packages/collaboration-manager/tsconfig.build.json create mode 100644 packages/collaboration-manager/tsconfig.json diff --git a/packages/collaboration-manager/.eslintrc.yml b/packages/collaboration-manager/.eslintrc.yml new file mode 100644 index 00000000..0b55b726 --- /dev/null +++ b/packages/collaboration-manager/.eslintrc.yml @@ -0,0 +1,27 @@ +extends: + - codex/ts + +ignorePatterns: + - node_modules + - dist + +# Eslint seems to not recognize WeakMap as a global +globals: + WeakMap: readonly + +plugins: + - import + +rules: + import/extensions: + - error + - always + '@typescript-eslint/no-unsafe-declaration-merging': + - 0 + +overrides: + - files: + - '**/*.test.ts' + - '**/*.spec.ts' + env: + jest: true diff --git a/packages/collaboration-manager/.gitignore b/packages/collaboration-manager/.gitignore new file mode 100644 index 00000000..854a697d --- /dev/null +++ b/packages/collaboration-manager/.gitignore @@ -0,0 +1,24 @@ +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions + +# Swap the comments on the following lines if you don't wish to use zero-installs +# Documentation here: https://yarnpkg.com/features/zero-installs +#!.yarn/cache +#.pnp.* + +# IDE +.idea/* + +node_modules/* +dist/* + +# tests +coverage/ +reports/ + +# stryker temp files +.stryker-tmp diff --git a/packages/collaboration-manager/jest.config.ts b/packages/collaboration-manager/jest.config.ts new file mode 100644 index 00000000..e80b93d1 --- /dev/null +++ b/packages/collaboration-manager/jest.config.ts @@ -0,0 +1,15 @@ +import { type JestConfigWithTsJest, createDefaultEsmPreset } from 'ts-jest'; + +export default { + preset: 'ts-jest', + testEnvironment: 'node', + testMatch: [ '/src/**/*.spec.ts' ], + modulePathIgnorePatterns: [ '/.*/__mocks__', '/.*/mocks' ], + extensionsToTreatAsEsm: ['.ts'], + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, + transform: { + ...createDefaultEsmPreset().transform, + }, +} as JestConfigWithTsJest; diff --git a/packages/collaboration-manager/package.json b/packages/collaboration-manager/package.json new file mode 100644 index 00000000..e974fcc6 --- /dev/null +++ b/packages/collaboration-manager/package.json @@ -0,0 +1,38 @@ +{ + "name": "@editorjs/collaboration-manager", + "version": "0.0.0", + "packageManager": "yarn@4.0.1", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "type": "module", + "scripts": { + "build": "tsc --project tsconfig.build.json", + "dev": "tsc --project tsconfig.build.json --watch", + "lint": "eslint ./src", + "lint:ci": "yarn lint --max-warnings 0", + "lint:fix": "yarn lint --fix", + "test": "node --experimental-vm-modules $(yarn bin jest)", + "test:coverage": "yarn test --coverage=true", + "test:mutations": "stryker run", + "clear": "rm -rf ./dist && rm -rf ./tsconfig.build.tsbuildinfo" + }, + "dependencies": { + "@editorjs/model": "workspace:^" + }, + "devDependencies": { + "@jest/globals": "^29.7.0", + "@stryker-mutator/core": "^7.0.2", + "@stryker-mutator/jest-runner": "^7.0.2", + "@stryker-mutator/typescript-checker": "^7.0.2", + "@types/eslint": "^8", + "@types/jest": "^29.5.12", + "eslint": "^8.38.0", + "eslint-config-codex": "^1.7.2", + "eslint-plugin-import": "^2.29.0", + "jest": "^29.7.0", + "stryker-cli": "^1.0.2", + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", + "typescript": "^5.5.4" + } +} diff --git a/packages/collaboration-manager/src/CollaborationManager.spec.ts b/packages/collaboration-manager/src/CollaborationManager.spec.ts new file mode 100644 index 00000000..2926f886 --- /dev/null +++ b/packages/collaboration-manager/src/CollaborationManager.spec.ts @@ -0,0 +1,87 @@ +/* eslint-disable @typescript-eslint/no-magic-numbers */ +import { createDataKey, IndexBuilder } from '@editorjs/model'; +import { EditorJSModel } from '@editorjs/model'; +import { CollaborationManager } from './CollaborationManager.js'; +import { Operation, OperationType } from './Operation.js'; + +describe('CollaborationManager', () => { + it('should add text on apply Insert Operation', () => { + const model = new EditorJSModel({ + blocks: [ { + name: 'paragraph', + data: { + text: { + value: '', + $t: 't', + }, + }, + } ], + }); + const collaborationManager = new CollaborationManager(model); + const index = new IndexBuilder().addBlockIndex(0) + .addDataKey(createDataKey('text')) + .addTextRange([0, 4]) + .build(); + const operation = new Operation(OperationType.Insert, index, { + prevValue: '', + newValue: 'test', + }); + + collaborationManager.applyOperation(operation); + expect(model.serialized).toStrictEqual({ + blocks: [ { + name: 'paragraph', + tunes: {}, + data: { + text: { + $t: 't', + value: 'test', + fragments: [], + }, + }, + } ], + properties: {}, + }); + }); + + + it('should remove text on apply Remove Operation', () => { + const model = new EditorJSModel({ + blocks: [ { + name: 'paragraph', + data: { + text: { + value: 'hel11lo', + $t: 't', + }, + }, + } ], + }); + const collaborationManager = new CollaborationManager(model); + const index = new IndexBuilder().addBlockIndex(0) + .addDataKey(createDataKey('text')) + .addTextRange([ + 3, 5]) + .build(); + const operation = new Operation(OperationType.Delete, index, { + prevValue: '11', + newValue: '', + }); + + collaborationManager.applyOperation(operation); + expect(model.serialized).toStrictEqual({ + blocks: [ { + name: 'paragraph', + tunes: {}, + data: { + text: { + $t: 't', + value: 'hello', + fragments: [], + }, + }, + } ], + properties: {}, + }); + }); +}); diff --git a/packages/collaboration-manager/src/CollaborationManager.ts b/packages/collaboration-manager/src/CollaborationManager.ts new file mode 100644 index 00000000..6b26f840 --- /dev/null +++ b/packages/collaboration-manager/src/CollaborationManager.ts @@ -0,0 +1,78 @@ +import type { EditorJSModel, ModelEvents } from '@editorjs/model'; +import { EventType, TextAddedEvent, TextRemovedEvent } from '@editorjs/model'; +import { Operation, OperationType } from './Operation.js'; + +/** + * CollaborationManager listens to EditorJSModel events and applies operations + */ +export class CollaborationManager { + /** + * EditorJSModel instance to listen to and apply operations + */ + #model: EditorJSModel; + + /** + * Creates an instance of CollaborationManager + * + * @param model - EditorJSModel instance to listen to and apply operations + */ + constructor(model: EditorJSModel) { + this.#model = model; + model.addEventListener(EventType.Changed, this.#handleEvent.bind(this)); + } + + /** + * Applies operation to the model + * + * @param operation - operation to apply + */ + public applyOperation(operation: Operation): void { + const { blockIndex, dataKey, textRange } = operation.index; + + if (blockIndex == undefined || dataKey == undefined || textRange == undefined) { + throw new Error('Unsupported index'); + } + + switch (operation.type) { + case OperationType.Insert: + this.#model.insertText(blockIndex, dataKey, operation.data.newValue); + break; + case OperationType.Delete: + this.#model.removeText(blockIndex, dataKey, textRange[0], textRange[1]); + break; + case OperationType.Modify: + console.log('modify operation is not implemented yet'); + // this.#model.insertText(blockIndex, dataKey, operation.data.newValue); + break; + default: + throw new Error('Unknown operation type'); + } + } + + /** + * Handles EditorJSModel events + * + * @param e - event to handle + */ + #handleEvent(e: ModelEvents): void { + let operation: Operation | null = null; + + switch (true) { + case (e instanceof TextAddedEvent): + operation = new Operation(OperationType.Insert, e.detail.index, { + prevValue: '', + newValue: e.detail.data, + }); + break; + case (e instanceof TextRemovedEvent): + operation = new Operation(OperationType.Delete, e.detail.index, { + prevValue: e.detail.data, + newValue: '', + }); + break; + default: + console.error('Unknown event type', e); + } + console.log('operation', operation); + } +} diff --git a/packages/collaboration-manager/src/Operation.ts b/packages/collaboration-manager/src/Operation.ts new file mode 100644 index 00000000..79ea904b --- /dev/null +++ b/packages/collaboration-manager/src/Operation.ts @@ -0,0 +1,59 @@ +import type { Index } from '@editorjs/model'; + +/** + * Type of the operation + */ +export enum OperationType { + Insert = 'insert', + Delete = 'delete', + Modify = 'modify' +} + +/** + * Data for the operation + */ +export interface OperationData { + /** + * Value before the operation + */ + prevValue: string; + + /** + * Value after the operation + */ + newValue: string; +} + + +/** + * Class representing operation on the document model tree + */ +export class Operation { + /** + * Operation type + */ + public type: OperationType; + + /** + * Index in the document model tree + */ + public index: Index; + + /** + * Operation data + */ + public data: OperationData; + + /** + * Creates an instance of Operation + * + * @param type - operation type + * @param index - index in the document model tree + * @param data - operation data + */ + constructor(type: OperationType, index: Index, data: OperationData) { + this.type = type; + this.index = index; + this.data = data; + } +} diff --git a/packages/collaboration-manager/src/index.ts b/packages/collaboration-manager/src/index.ts new file mode 100644 index 00000000..ade2abf0 --- /dev/null +++ b/packages/collaboration-manager/src/index.ts @@ -0,0 +1,2 @@ +export * from './CollaborationManager.js'; +export * from './Operation.js'; diff --git a/packages/collaboration-manager/stryker.conf.mjs b/packages/collaboration-manager/stryker.conf.mjs new file mode 100644 index 00000000..63c04dfb --- /dev/null +++ b/packages/collaboration-manager/stryker.conf.mjs @@ -0,0 +1,34 @@ +// @ts-check +/** @type {import('@stryker-mutator/api/core').PartialStrykerOptions} */ +const config = { + _comment: + "This config was generated using 'stryker init'. Please take a look at: https://stryker-mutator.io/docs/stryker-js/configuration/ for more information.", + packageManager: "yarn", + thresholds: { + break: 75, + }, + thresholds_comment: "Minimum required coverage. Increase once we're closer to 100%.", + clearTextReporter: { + allowEmojis: true, + }, + reporters: [ + "html", + "clear-text", + "progress", + "dashboard", + ], + testRunner: "jest", + testRunner_comment: + "Take a look at https://stryker-mutator.io/docs/stryker-js/jest-runner for information about the jest plugin.", + coverageAnalysis: "perTest", + tsconfigFile: "tsconfig.json", + checkers: ["typescript"], + timeoutMS: 10000, + mutate: ["./src/**/*.ts", "!./src/**/mocks/*.ts", "!./src/**/__mocks__/*.ts", "!./src/**/*.spec.ts"], + /* + * In some cases PRs might not have any unit-tests + */ + allowEmpty: true, +}; + +export default config; diff --git a/packages/collaboration-manager/tsconfig.build.json b/packages/collaboration-manager/tsconfig.build.json new file mode 100644 index 00000000..832aea87 --- /dev/null +++ b/packages/collaboration-manager/tsconfig.build.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "declaration": true + }, + "include": [ + "src/**/*.ts" + ], + "exclude": [ + "src/**/*.spec.ts" + ] +} diff --git a/packages/collaboration-manager/tsconfig.json b/packages/collaboration-manager/tsconfig.json new file mode 100644 index 00000000..0bba468a --- /dev/null +++ b/packages/collaboration-manager/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "esnext", + "module": "esnext", + "moduleResolution": "Node", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "experimentalDecorators": true, + "types": ["jest"], + "composite": true, + "rootDir": "src/" + }, + "include": ["src/**/*"], + "exclude": [ + "node_modules/**/*", + "dist/**/*" + ] + } diff --git a/packages/dom-adapters/package.json b/packages/dom-adapters/package.json index 9098ea07..36c029be 100644 --- a/packages/dom-adapters/package.json +++ b/packages/dom-adapters/package.json @@ -28,9 +28,9 @@ "eslint-plugin-import": "^2.29.0", "jest": "^29.7.0", "stryker-cli": "^1.0.2", - "ts-jest": "^29.1.0", - "ts-node": "^10.9.1", - "typescript": "^5.2.2" + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", + "typescript": "^5.5.4" }, "dependencies": { "@editorjs/dom": "^1.0.0", diff --git a/packages/model/package.json b/packages/model/package.json index 0084879c..559ab89c 100644 --- a/packages/model/package.json +++ b/packages/model/package.json @@ -28,8 +28,8 @@ "eslint-plugin-import": "^2.29.0", "jest": "^29.7.0", "stryker-cli": "^1.0.2", - "ts-jest": "^29.1.0", - "ts-node": "^10.9.1", - "typescript": "^5.2.2" + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", + "typescript": "^5.5.4" } } diff --git a/packages/playground/package.json b/packages/playground/package.json index d154b9af..ad1fc207 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -25,8 +25,8 @@ "eslint": "^8.53.0", "eslint-config-codex": "^1.9.1", "eslint-plugin-vue": "^9.18.1", - "typescript": "^5.0.2", - "vite": "^4.4.5", - "vue-tsc": "^1.8.5" + "typescript": "^5.5.4", + "vite": "^4.5.3", + "vue-tsc": "^2.0.29" } } diff --git a/yarn.lock b/yarn.lock index 663b40c5..056c162b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -237,6 +237,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-string-parser@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-string-parser@npm:7.24.8" + checksum: 6d1bf8f27dd725ce02bdc6dffca3c95fb9ab8a06adc2edbd9c1c9d68500274230d1a609025833ed81981eff560045b6b38f7b4c6fb1ab19fc90e5004e3932535 + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.22.20": version: 7.22.20 resolution: "@babel/helper-validator-identifier@npm:7.22.20" @@ -244,6 +251,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 86875063f57361471b531dbc2ea10bbf5406e12b06d249b03827d361db4cad2388c6f00936bcd9dc86479f7e2c69ea21412c2228d4b3672588b754b70a449d4b + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.22.15": version: 7.22.15 resolution: "@babel/helper-validator-option@npm:7.22.15" @@ -282,6 +296,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.24.7": + version: 7.25.4 + resolution: "@babel/parser@npm:7.25.4" + dependencies: + "@babel/types": "npm:^7.25.4" + bin: + parser: ./bin/babel-parser.js + checksum: 343b8a76c43549e370fe96f4f6d564382a6cdff60e9c3b8a594c51e4cefd58ec9945e82e8c4dfbf15ac865a04e4b29806531440760748e28568e6aec21bc9cb5 + languageName: node + linkType: hard + "@babel/plugin-proposal-decorators@npm:~7.23.0": version: 7.23.3 resolution: "@babel/plugin-proposal-decorators@npm:7.23.3" @@ -553,6 +578,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.25.4": + version: 7.25.4 + resolution: "@babel/types@npm:7.25.4" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.8" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: d4a1194612d0a2a6ce9a0be325578b43d74e5f5278c67409468ba0a924341f0ad349ef0245ee8a36da3766efe5cc59cd6bb52547674150f97d8dc4c8cfa5d6b8 + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -569,6 +605,28 @@ __metadata: languageName: node linkType: hard +"@editorjs/collaboration-manager@workspace:packages/collaboration-manager": + version: 0.0.0-use.local + resolution: "@editorjs/collaboration-manager@workspace:packages/collaboration-manager" + dependencies: + "@editorjs/model": "workspace:^" + "@jest/globals": "npm:^29.7.0" + "@stryker-mutator/core": "npm:^7.0.2" + "@stryker-mutator/jest-runner": "npm:^7.0.2" + "@stryker-mutator/typescript-checker": "npm:^7.0.2" + "@types/eslint": "npm:^8" + "@types/jest": "npm:^29.5.12" + eslint: "npm:^8.38.0" + eslint-config-codex: "npm:^1.7.2" + eslint-plugin-import: "npm:^2.29.0" + jest: "npm:^29.7.0" + stryker-cli: "npm:^1.0.2" + ts-jest: "npm:^29.2.5" + ts-node: "npm:^10.9.2" + typescript: "npm:^5.5.4" + languageName: unknown + linkType: soft + "@editorjs/document-playground@workspace:packages/playground": version: 0.0.0-use.local resolution: "@editorjs/document-playground@workspace:packages/playground" @@ -581,10 +639,10 @@ __metadata: eslint: "npm:^8.53.0" eslint-config-codex: "npm:^1.9.1" eslint-plugin-vue: "npm:^9.18.1" - typescript: "npm:^5.0.2" - vite: "npm:^4.4.5" + typescript: "npm:^5.5.4" + vite: "npm:^4.5.3" vue: "npm:^3.3.4" - vue-tsc: "npm:^1.8.5" + vue-tsc: "npm:^2.0.29" languageName: unknown linkType: soft @@ -611,9 +669,9 @@ __metadata: eslint-plugin-import: "npm:^2.29.0" jest: "npm:^29.7.0" stryker-cli: "npm:^1.0.2" - ts-jest: "npm:^29.1.0" - ts-node: "npm:^10.9.1" - typescript: "npm:^5.2.2" + ts-jest: "npm:^29.2.5" + ts-node: "npm:^10.9.2" + typescript: "npm:^5.5.4" languageName: unknown linkType: soft @@ -648,9 +706,9 @@ __metadata: eslint-plugin-import: "npm:^2.29.0" jest: "npm:^29.7.0" stryker-cli: "npm:^1.0.2" - ts-jest: "npm:^29.1.0" - ts-node: "npm:^10.9.1" - typescript: "npm:^5.2.2" + ts-jest: "npm:^29.2.5" + ts-node: "npm:^10.9.2" + typescript: "npm:^5.5.4" languageName: unknown linkType: soft @@ -1514,13 +1572,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:^29.5.1": - version: 29.5.8 - resolution: "@types/jest@npm:29.5.8" +"@types/jest@npm:^29.5.1, @types/jest@npm:^29.5.12": + version: 29.5.12 + resolution: "@types/jest@npm:29.5.12" dependencies: expect: "npm:^29.0.0" pretty-format: "npm:^29.0.0" - checksum: a8194e26c642780d5b2e22170ac538f7975e04aeaa76d87f8e5ac921f7a8fffc5252029a9e6efacdb0ec4b45320322c8e1f27a5338083f49efbd3c6021314f7e + checksum: 312e8dcf92cdd5a5847d6426f0940829bca6fe6b5a917248f3d7f7ef5d85c9ce78ef05e47d2bbabc40d41a930e0e36db2d443d2610a9e3db9062da2d5c904211 languageName: node linkType: hard @@ -1716,31 +1774,30 @@ __metadata: languageName: node linkType: hard -"@volar/language-core@npm:1.10.10, @volar/language-core@npm:~1.10.5": - version: 1.10.10 - resolution: "@volar/language-core@npm:1.10.10" +"@volar/language-core@npm:2.4.0, @volar/language-core@npm:~2.4.0-alpha.18": + version: 2.4.0 + resolution: "@volar/language-core@npm:2.4.0" dependencies: - "@volar/source-map": "npm:1.10.10" - checksum: 550ad7c527c8805b01430a2b060862553b9987f4e81dbc6b0300b1614b75b57757fc3433a61df7ba1badde1afa0213be2f1518b7ed5dc743185c4d58b2152d41 + "@volar/source-map": "npm:2.4.0" + checksum: 7ee8f7c611e84870536b2a7e0f2fcb5b1667f862abfe91158bb70fe3c5c9600db23f25df0b68239ff5cd9ff33eae87fa30abe000d1a56aaafb8b74da826b2b83 languageName: node linkType: hard -"@volar/source-map@npm:1.10.10, @volar/source-map@npm:~1.10.5": - version: 1.10.10 - resolution: "@volar/source-map@npm:1.10.10" - dependencies: - muggle-string: "npm:^0.3.1" - checksum: 33f54d289ad38934e7824e52b47f4a4e704415aba17f7500a20151e3579072deff9d6195da332b30f260a7da55fbc321867d8d6ad5482e901da7bf448a947b82 +"@volar/source-map@npm:2.4.0": + version: 2.4.0 + resolution: "@volar/source-map@npm:2.4.0" + checksum: a95bed355b193c4db7420d305c4a9e86c83a0feb46486d00e3b0c7ae92b3ea8800ea997dfa05c9df32cfeca81c104ca2383bd63efcd5990ecf811fa796208fed languageName: node linkType: hard -"@volar/typescript@npm:~1.10.5": - version: 1.10.10 - resolution: "@volar/typescript@npm:1.10.10" +"@volar/typescript@npm:~2.4.0-alpha.18": + version: 2.4.0 + resolution: "@volar/typescript@npm:2.4.0" dependencies: - "@volar/language-core": "npm:1.10.10" + "@volar/language-core": "npm:2.4.0" path-browserify: "npm:^1.0.1" - checksum: 624744abb5ca13873535833202936ac2e9ad0124b2f38762e5fae09aac32beffcc41dac3cfba4a7e3db4fbc0b7c9e416f3a11c081dd8e1a0a7f5350d9cdac376 + vscode-uri: "npm:^3.0.8" + checksum: 836f143391343f5dad34cc000c6538b2af622ca5f53e41f3d3dfb86919926c6fa7d6e562ca89d331e13ebe066c118cb4ec953756b4e3a822cc095fd15c22ddba languageName: node linkType: hard @@ -1756,7 +1813,20 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-dom@npm:3.3.8, @vue/compiler-dom@npm:^3.3.0": +"@vue/compiler-core@npm:3.4.38": + version: 3.4.38 + resolution: "@vue/compiler-core@npm:3.4.38" + dependencies: + "@babel/parser": "npm:^7.24.7" + "@vue/shared": "npm:3.4.38" + entities: "npm:^4.5.0" + estree-walker: "npm:^2.0.2" + source-map-js: "npm:^1.2.0" + checksum: 16449e9083c290e6c13e1cc0cb0a0a457817a52533d10902388c872fb1337ba0fa29fb7b8394df5a10f5ed3bad264d6c386f9eaf47c07982a543f277dbee9b8a + languageName: node + linkType: hard + +"@vue/compiler-dom@npm:3.3.8": version: 3.3.8 resolution: "@vue/compiler-dom@npm:3.3.8" dependencies: @@ -1766,6 +1836,16 @@ __metadata: languageName: node linkType: hard +"@vue/compiler-dom@npm:^3.4.0": + version: 3.4.38 + resolution: "@vue/compiler-dom@npm:3.4.38" + dependencies: + "@vue/compiler-core": "npm:3.4.38" + "@vue/shared": "npm:3.4.38" + checksum: 4012fab212dc0628ef72f5ae13aa2dd551efb8be7f2aa8abe2a1db15058ddda29912a1e3aa1fc6712e2d8efe84724f16a907ad2cda987631bfc79330afc8d451 + languageName: node + linkType: hard + "@vue/compiler-sfc@npm:3.3.8": version: 3.3.8 resolution: "@vue/compiler-sfc@npm:3.3.8" @@ -1794,24 +1874,34 @@ __metadata: languageName: node linkType: hard -"@vue/language-core@npm:1.8.22": - version: 1.8.22 - resolution: "@vue/language-core@npm:1.8.22" +"@vue/compiler-vue2@npm:^2.7.16": + version: 2.7.16 + resolution: "@vue/compiler-vue2@npm:2.7.16" dependencies: - "@volar/language-core": "npm:~1.10.5" - "@volar/source-map": "npm:~1.10.5" - "@vue/compiler-dom": "npm:^3.3.0" - "@vue/shared": "npm:^3.3.0" + de-indent: "npm:^1.0.2" + he: "npm:^1.2.0" + checksum: 739ad06be19206b2715707c226a070509bcf28c31b539a6fc932d220eb7b0c09109d71fded573ed0c4073429793a3513ca4a4e69ad4f7afc0c5bc3c28639e871 + languageName: node + linkType: hard + +"@vue/language-core@npm:2.0.29": + version: 2.0.29 + resolution: "@vue/language-core@npm:2.0.29" + dependencies: + "@volar/language-core": "npm:~2.4.0-alpha.18" + "@vue/compiler-dom": "npm:^3.4.0" + "@vue/compiler-vue2": "npm:^2.7.16" + "@vue/shared": "npm:^3.4.0" computeds: "npm:^0.0.1" minimatch: "npm:^9.0.3" - muggle-string: "npm:^0.3.1" - vue-template-compiler: "npm:^2.7.14" + muggle-string: "npm:^0.4.1" + path-browserify: "npm:^1.0.1" peerDependencies: typescript: "*" peerDependenciesMeta: typescript: optional: true - checksum: e121fd1b7e55bedb11c7114e3d430f6511ee1bc0343eec0c6c3e6964a4a1014e49550c92a9fa23d5044827cba6f6cfaf689841828f833ac405381f6b29aff64a + checksum: 60859b53f8df2f8da336c126750c4f96ffa1c3da050181dc1e8bb80b40d482fa43194e7f2d255e31f2ebd842e11b57f89789b57a8bd9cc79f3b584eb2e0fe251 languageName: node linkType: hard @@ -1870,13 +1960,20 @@ __metadata: languageName: node linkType: hard -"@vue/shared@npm:3.3.8, @vue/shared@npm:^3.3.0": +"@vue/shared@npm:3.3.8": version: 3.3.8 resolution: "@vue/shared@npm:3.3.8" checksum: 6511b05ccee9f25ad71f4c4a0984090a6aad0717a1bcc95be5df041e38fb907e9a83a029705fb9e7132f755dab9bb795294358fe3f58fdb3506a7a3ebec42445 languageName: node linkType: hard +"@vue/shared@npm:3.4.38, @vue/shared@npm:^3.4.0": + version: 3.4.38 + resolution: "@vue/shared@npm:3.4.38" + checksum: 46bfc1f3932fd154ff84dcd267cae4db730c98db433c848d40c9c0dc23dcabdb5efe96a3a378c9ed3b7e8281ca17e2753f0ce98ae43b54b315550dfaccb56868 + languageName: node + linkType: hard + "abbrev@npm:^2.0.0": version: 2.0.0 resolution: "abbrev@npm:2.0.0" @@ -2159,6 +2256,13 @@ __metadata: languageName: node linkType: hard +"async@npm:^3.2.3": + version: 3.2.6 + resolution: "async@npm:3.2.6" + checksum: cb6e0561a3c01c4b56a799cc8bab6ea5fef45f069ab32500b6e19508db270ef2dffa55e5aed5865c5526e9907b1f8be61b27530823b411ffafb5e1538c86c368 + languageName: node + linkType: hard + "available-typed-arrays@npm:^1.0.5": version: 1.0.5 resolution: "available-typed-arrays@npm:1.0.5" @@ -2316,7 +2420,7 @@ __metadata: languageName: node linkType: hard -"bs-logger@npm:0.x": +"bs-logger@npm:^0.2.6": version: 0.2.6 resolution: "bs-logger@npm:0.2.6" dependencies: @@ -2437,7 +2541,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.2": +"chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -2868,6 +2972,17 @@ __metadata: languageName: node linkType: hard +"ejs@npm:^3.1.10": + version: 3.1.10 + resolution: "ejs@npm:3.1.10" + dependencies: + jake: "npm:^10.8.5" + bin: + ejs: bin/cli.js + checksum: a9cb7d7cd13b7b1cd0be5c4788e44dd10d92f7285d2f65b942f33e127230c054f99a42db4d99f766d8dbc6c57e94799593ee66a14efd7c8dd70c4812bf6aa384 + languageName: node + linkType: hard + "electron-to-chromium@npm:^1.4.535": version: 1.4.581 resolution: "electron-to-chromium@npm:1.4.581" @@ -2912,6 +3027,13 @@ __metadata: languageName: node linkType: hard +"entities@npm:^4.5.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: ede2a35c9bce1aeccd055a1b445d41c75a14a2bb1cd22e242f20cf04d236cdcd7f9c859eb83f76885327bfae0c25bf03303665ee1ce3d47c5927b98b0e3e3d48 + languageName: node + linkType: hard + "env-paths@npm:^2.2.0": version: 2.2.1 resolution: "env-paths@npm:2.2.1" @@ -3565,6 +3687,15 @@ __metadata: languageName: node linkType: hard +"filelist@npm:^1.0.4": + version: 1.0.4 + resolution: "filelist@npm:1.0.4" + dependencies: + minimatch: "npm:^5.0.1" + checksum: 4b436fa944b1508b95cffdfc8176ae6947b92825483639ef1b9a89b27d82f3f8aa22b21eed471993f92709b431670d4e015b39c087d435a61e1bb04564cf51de + languageName: node + linkType: hard + "fill-range@npm:^7.0.1": version: 7.0.1 resolution: "fill-range@npm:7.0.1" @@ -4494,6 +4625,20 @@ __metadata: languageName: node linkType: hard +"jake@npm:^10.8.5": + version: 10.9.2 + resolution: "jake@npm:10.9.2" + dependencies: + async: "npm:^3.2.3" + chalk: "npm:^4.0.2" + filelist: "npm:^1.0.4" + minimatch: "npm:^3.1.2" + bin: + jake: bin/cli.js + checksum: 3be324708f99f031e0aec49ef8fd872eb4583cbe8a29a0c875f554f6ac638ee4ea5aa759bb63723fd54f77ca6d7db851eaa78353301734ed3700db9cb109a0cd + languageName: node + linkType: hard + "jest-changed-files@npm:^29.7.0": version: 29.7.0 resolution: "jest-changed-files@npm:29.7.0" @@ -5111,7 +5256,7 @@ __metadata: languageName: node linkType: hard -"lodash.memoize@npm:4.x": +"lodash.memoize@npm:^4.1.2": version: 4.1.2 resolution: "lodash.memoize@npm:4.1.2" checksum: 192b2168f310c86f303580b53acf81ab029761b9bd9caa9506a019ffea5f3363ea98d7e39e7e11e6b9917066c9d36a09a11f6fe16f812326390d8f3a54a1a6da @@ -5200,7 +5345,7 @@ __metadata: languageName: node linkType: hard -"make-error@npm:1.x, make-error@npm:^1.1.1": +"make-error@npm:^1.1.1, make-error@npm:^1.3.6": version: 1.3.6 resolution: "make-error@npm:1.3.6" checksum: b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 @@ -5289,6 +5434,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^5.0.1": + version: 5.1.6 + resolution: "minimatch@npm:5.1.6" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 126b36485b821daf96d33b5c821dac600cc1ab36c87e7a532594f9b1652b1fa89a1eebcaad4dff17c764dce1a7ac1531327f190fed5f97d8f6e5f889c116c429 + languageName: node + linkType: hard + "minimatch@npm:^9.0.1, minimatch@npm:^9.0.3, minimatch@npm:~9.0.1": version: 9.0.3 resolution: "minimatch@npm:9.0.3" @@ -5412,10 +5566,10 @@ __metadata: languageName: node linkType: hard -"muggle-string@npm:^0.3.1": - version: 0.3.1 - resolution: "muggle-string@npm:0.3.1" - checksum: f2357f906e0160b7df0179c77838cf859f3ca23cb74eca7c043b9fc9e1e416d91497c80fbe2f3c9aeb003c14ad15857fc4e94f1631e8a6695b07e4135626d305 +"muggle-string@npm:^0.4.1": + version: 0.4.1 + resolution: "muggle-string@npm:0.4.1" + checksum: 8fa2ea08f497c04069718bd3fd1909b382114dacbad832d10967ca72690de43f5f8492d8ccfbf827d6be63868ed5fc10395e7b7c082aa95997eea498586c6620 languageName: node linkType: hard @@ -6234,6 +6388,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.6.3": + version: 7.6.3 + resolution: "semver@npm:7.6.3" + bin: + semver: bin/semver.js + checksum: 36b1fbe1a2b6f873559cd57b238f1094a053dbfd997ceeb8757d79d1d2089c56d1321b9f1069ce263dc64cfa922fa1d2ad566b39426fe1ac6c723c1487589e10 + languageName: node + linkType: hard + "set-function-length@npm:^1.1.1": version: 1.1.1 resolution: "set-function-length@npm:1.1.1" @@ -6354,6 +6517,13 @@ __metadata: languageName: node linkType: hard +"source-map-js@npm:^1.2.0": + version: 1.2.0 + resolution: "source-map-js@npm:1.2.0" + checksum: 74f331cfd2d121c50790c8dd6d3c9de6be21926de80583b23b37029b0f37aefc3e019fa91f9a10a5e120c08135297e1ecf312d561459c45908cb1e0e365f49e5 + languageName: node + linkType: hard + "source-map-support@npm:0.5.13": version: 0.5.13 resolution: "source-map-support@npm:0.5.13" @@ -6736,20 +6906,22 @@ __metadata: languageName: node linkType: hard -"ts-jest@npm:^29.1.0": - version: 29.1.1 - resolution: "ts-jest@npm:29.1.1" +"ts-jest@npm:^29.2.5": + version: 29.2.5 + resolution: "ts-jest@npm:29.2.5" dependencies: - bs-logger: "npm:0.x" - fast-json-stable-stringify: "npm:2.x" + bs-logger: "npm:^0.2.6" + ejs: "npm:^3.1.10" + fast-json-stable-stringify: "npm:^2.1.0" jest-util: "npm:^29.0.0" json5: "npm:^2.2.3" - lodash.memoize: "npm:4.x" - make-error: "npm:1.x" - semver: "npm:^7.5.3" - yargs-parser: "npm:^21.0.1" + lodash.memoize: "npm:^4.1.2" + make-error: "npm:^1.3.6" + semver: "npm:^7.6.3" + yargs-parser: "npm:^21.1.1" peerDependencies: "@babel/core": ">=7.0.0-beta.0 <8" + "@jest/transform": ^29.0.0 "@jest/types": ^29.0.0 babel-jest: ^29.0.0 jest: ^29.0.0 @@ -6757,6 +6929,8 @@ __metadata: peerDependenciesMeta: "@babel/core": optional: true + "@jest/transform": + optional: true "@jest/types": optional: true babel-jest: @@ -6765,13 +6939,13 @@ __metadata: optional: true bin: ts-jest: cli.js - checksum: 30e8259baba95dd786e64f7c18b864e904598f3ba07911be4d9bd29ca9c3c0024bad4ccf8ec0abd2a2fa14b06622cbbadff1b3be822189c657196442d33ee6ca + checksum: f89e562816861ec4510840a6b439be6145f688b999679328de8080dc8e66481325fc5879519b662163e33b7578f35243071c38beb761af34e5fe58e3e326a958 languageName: node linkType: hard -"ts-node@npm:^10.9.1": - version: 10.9.1 - resolution: "ts-node@npm:10.9.1" +"ts-node@npm:^10.9.2": + version: 10.9.2 + resolution: "ts-node@npm:10.9.2" dependencies: "@cspotcode/source-map-support": "npm:^0.8.0" "@tsconfig/node10": "npm:^1.0.7" @@ -6803,7 +6977,7 @@ __metadata: ts-node-script: dist/bin-script.js ts-node-transpile-only: dist/bin-transpile.js ts-script: dist/bin-script-deprecated.js - checksum: bee56d4dc96ccbafc99dfab7b73fbabc62abab2562af53cdea91c874a301b9d11e42bc33c0a032a6ed6d813dbdc9295ec73dde7b73ea4ebde02b0e22006f7e04 + checksum: a91a15b3c9f76ac462f006fa88b6bfa528130dcfb849dd7ef7f9d640832ab681e235b8a2bc58ecde42f72851cc1d5d4e22c901b0c11aa51001ea1d395074b794 languageName: node linkType: hard @@ -6935,23 +7109,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.0.2, typescript@npm:^5.2.2": - version: 5.2.2 - resolution: "typescript@npm:5.2.2" +"typescript@npm:^5.5.4": + version: 5.5.4 + resolution: "typescript@npm:5.5.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: d65e50eb849bd21ff8677e5b9447f9c6e74777e346afd67754934264dcbf4bd59e7d2473f6062d9a015d66bd573311166357e3eb07fea0b52859cf9bb2b58555 + checksum: 1689ccafef894825481fc3d856b4834ba3cc185a9c2878f3c76a9a1ef81af04194849840f3c69e7961e2312771471bb3b460ca92561e1d87599b26c37d0ffb6f languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.0.2#optional!builtin, typescript@patch:typescript@npm%3A^5.2.2#optional!builtin": - version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#optional!builtin::version=5.2.2&hash=f3b441" +"typescript@patch:typescript@npm%3A^5.5.4#optional!builtin": + version: 5.5.4 + resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin::version=5.5.4&hash=29ae49" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: f79cc2ba802c94c2b78dbb00d767a10adb67368ae764709737dc277273ec148aa4558033a03ce901406b35fddf4eac46dabc94a1e1d12d2587e2b9cfe5707b4a + checksum: 2c065f0ef81855eac25c9b658a3c9da65ffc005260c12854c2286f40f3667e1b1ecf8bdbdd37b59aa0397920378ce7900bff8cb32e0f1c7af6fd86efc676718c languageName: node linkType: hard @@ -7054,9 +7228,9 @@ __metadata: languageName: node linkType: hard -"vite@npm:^4.4.5": - version: 4.5.0 - resolution: "vite@npm:4.5.0" +"vite@npm:^4.5.3": + version: 4.5.3 + resolution: "vite@npm:4.5.3" dependencies: esbuild: "npm:^0.18.10" fsevents: "npm:~2.3.2" @@ -7090,7 +7264,14 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: b262ea4880ba7de8a77b0a665c771561ae3cb7f0d6c5b90e65298039755192550bf90cb96a2910d564506e2d499aa20e9becd330b835c34d414249083ac6e40c + checksum: 82efe1bc6d6848f8c97b71f1dc5b2fba2c3f30b2207ef2451c8df1a0ed5903c55714d7cd8ecb75879b488661d97f6e01a4ad758b5ef6a50a14338f916233bfa4 + languageName: node + linkType: hard + +"vscode-uri@npm:^3.0.8": + version: 3.0.8 + resolution: "vscode-uri@npm:3.0.8" + checksum: e882d6b679e0d053cbc042893c0951a135d899a192b62cd07f0a8924f11ae722067a8d6b1b5b147034becf57faf9fff9fb543b17b749fd0f17db1f54f783f07c languageName: node linkType: hard @@ -7111,28 +7292,18 @@ __metadata: languageName: node linkType: hard -"vue-template-compiler@npm:^2.7.14": - version: 2.7.15 - resolution: "vue-template-compiler@npm:2.7.15" +"vue-tsc@npm:^2.0.29": + version: 2.0.29 + resolution: "vue-tsc@npm:2.0.29" dependencies: - de-indent: "npm:^1.0.2" - he: "npm:^1.2.0" - checksum: 450634ed5baf652b1d25f74d13b4ee061d4da83292731406bfbd8a212e286f59def3c762eac05b9fa8769df9ee42a1960ec7c2431ea30999cfc75eb314cc16b9 - languageName: node - linkType: hard - -"vue-tsc@npm:^1.8.5": - version: 1.8.22 - resolution: "vue-tsc@npm:1.8.22" - dependencies: - "@volar/typescript": "npm:~1.10.5" - "@vue/language-core": "npm:1.8.22" + "@volar/typescript": "npm:~2.4.0-alpha.18" + "@vue/language-core": "npm:2.0.29" semver: "npm:^7.5.4" peerDependencies: - typescript: "*" + typescript: ">=5.0.0" bin: - vue-tsc: bin/vue-tsc.js - checksum: 8e3ca396b9d8bce82c868569ff60433d6c02dedf7d694d37a67a35b54835aa02850d7e79fe876d37925de9adadd0bc6ae6ba4bc39ebcf9add705338615504e70 + vue-tsc: ./bin/vue-tsc.js + checksum: deabe919d3d3a9c9974791d91c32244c7e831a7d613a281e1e9a9f65bfaa917723883afda79d1d06b67f886dbd23cfdf3ec902a40674f907f0bb792e8eeab088 languageName: node linkType: hard @@ -7305,7 +7476,7 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": +"yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" checksum: 9dc2c217ea3bf8d858041252d43e074f7166b53f3d010a8c711275e09cd3d62a002969a39858b92bbda2a6a63a585c7127014534a560b9c69ed2d923d113406e