Skip to content

Typescript 5.8 #8112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8,692 changes: 4,231 additions & 4,461 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion common/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"format": "echo \"No format specified\""
},
"devDependencies": {
"esbuild": "^0.24.2",
"esbuild": "^0.25.1",
"sharp": "~0.32.0"
},
"private": true
Expand Down
8 changes: 4 additions & 4 deletions desktop-package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "desktop",
"version": "0.6.435",
"version": "0.7.75",
"main": "dist/main/electron.js",
"author": "Hardcore Engineering <hey@huly.io>",
"template": "@hcengineering/default-package",
Expand All @@ -16,13 +16,13 @@
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@hcengineering/desktop": "^0.6.0",
"@hcengineering/desktop": "^0.7.0",
"@vercel/webpack-asset-relocator-loader": "^1.7.3",
"node-loader": "~2.0.0",
"cross-env": "~7.0.3",
"typescript": "^5.3.3",
"typescript": "^5.8.2",
"electron": "^35.0.3",
"@types/node": "~20.11.16",
"@types/node": "^22.13.5",
"electron-builder": "^25.1.8",
"@electron/notarize": "^2.3.2"
},
Expand Down
10 changes: 5 additions & 5 deletions desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/desktop",
"version": "0.6.465",
"version": "0.7.75",
"main": "dist/main/electron.js",
"template": "@hcengineering/webpack-package",
"scripts": {
Expand All @@ -23,7 +23,7 @@
"node-loader": "~2.0.0",
"cross-env": "~7.0.3",
"webpack-cli": "^5.1.4",
"webpack": "^5.97.1",
"webpack": "^5.98.0",
"mini-css-extract-plugin": "^2.2.0",
"dotenv-webpack": "^8.0.1",
"ts-loader": "^9.2.5",
Expand All @@ -44,11 +44,11 @@
"fork-ts-checker-webpack-plugin": "^9.0.2",
"update-browserslist-db": "^1.1.2",
"browserslist": "^4.24.4",
"typescript": "^5.3.3",
"typescript": "^5.8.2",
"ts-node": "^10.8.0",
"ts-node-dev": "^2.0.0",
"electron": "^35.0.3",
"@types/node": "~20.11.16",
"@types/node": "^22.13.5",
"copy-webpack-plugin": "^11.0.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
Expand All @@ -58,7 +58,7 @@
"eslint-plugin-promise": "^6.1.1",
"eslint": "^8.54.0",
"prettier": "^3.1.0",
"esbuild": "^0.24.2",
"esbuild": "^0.25.1",
"esbuild-loader": "^4.0.3",
"svelte-preprocess": "^5.1.3",
"@types/ws": "^8.5.11"
Expand Down
2 changes: 1 addition & 1 deletion desktop/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"outDir": "dist",
"noImplicitAny": true,
"module": "esnext",
"target": "es2021",
"target": "es2024",
"allowJs": true,
"declaration": true,
"strictNullChecks": true,
Expand Down
2 changes: 1 addition & 1 deletion dev/doc-import-tool/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
extends: ['./node_modules/@hcengineering/platform-rig/profiles/default/eslint.config.json'],
extends: ['./node_modules/@hcengineering/platform-rig/profiles/node/eslint.config.json'],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
Expand Down
3 changes: 2 additions & 1 deletion dev/doc-import-tool/config/rig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@hcengineering/platform-rig"
"rigPackageName": "@hcengineering/platform-rig",
"rigProfile": "node"
}
16 changes: 6 additions & 10 deletions dev/doc-import-tool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
"files": [
"lib/**/*",
"types/**/*",
"tsconfig.json"
],
"author": "Anticrm Platform Contributors",
"template": "@hcengineering/node-package",
"scripts": {
"build": "compile",
"build:watch": "compile",
Expand All @@ -18,9 +14,9 @@
"run-local": "cross-env SERVER_SECRET=secret MONGO_URL=mongodb://localhost:27017 COLLABORATOR_URL=ws://localhost:3078 STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin node --nolazy -r ts-node/register ./src/__start.ts",
"run": "cross-env node -r ts-node/register --max-old-space-size=8000 ./src/__start.ts",
"format": "format src",
"test": "jest --passWithNoTests --silent",
"test": "jest --passWithNoTests --silent --forceExit",
"_phase:build": "compile transpile src",
"_phase:test": "jest --passWithNoTests --silent",
"_phase:test": "jest --passWithNoTests --silent --forceExit",
"_phase:format": "format src",
"_phase:validate": "compile validate"
},
Expand All @@ -33,13 +29,13 @@
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"ts-node": "^10.8.0",
"esbuild": "^0.24.2",
"esbuild": "^0.25.1",
"@types/minio": "~7.0.11",
"@types/node": "~20.11.16",
"@types/node": "^22.13.5",
"@typescript-eslint/parser": "^6.11.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.3.3",
"typescript": "^5.8.2",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"@types/jest": "^29.5.5",
Expand Down
6 changes: 3 additions & 3 deletions dev/doc-import-tool/src/commands.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { MeasureContext } from '@hcengineering/core'
import { type MeasureContext } from '@hcengineering/core'
import docx4js from 'docx4js'
import { AnyNode } from 'domhandler'
import { type AnyNode } from 'domhandler'

import extract from './extract/extract'
import { MetadataContainer, read } from './extract/types'
import importExtractedFile from './import'
import convert from './convert/convert'
import { Config } from './config'
import { type Config } from './config'

export async function importDoc (ctx: MeasureContext, config: Config): Promise<void> {
const { specFile, doc, backend } = config
Expand Down
10 changes: 5 additions & 5 deletions dev/doc-import-tool/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Employee } from '@hcengineering/contact'
import { Ref, WorkspaceDataId, WorkspaceUuid } from '@hcengineering/core'
import { DocumentSpace } from '@hcengineering/controlled-documents'
import { StorageAdapter } from '@hcengineering/server-core'
import { type Employee } from '@hcengineering/contact'
import { type Ref, type WorkspaceDataId, type WorkspaceUuid } from '@hcengineering/core'
import { type DocumentSpace } from '@hcengineering/controlled-documents'
import { type StorageAdapter } from '@hcengineering/server-core'

import { HtmlConversionBackend } from './convert/convert'
import { type HtmlConversionBackend } from './convert/convert'

export interface Config {
doc: string
Expand Down
2 changes: 1 addition & 1 deletion dev/doc-import-tool/src/extract/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { parseDocument } from 'htmlparser2'

import { NodeType } from './types'
import { clean } from '../helpers'
import { Cell } from './common'
import { type Cell } from './common'

export abstract class Container {
constructor (
Expand Down
6 changes: 3 additions & 3 deletions dev/doc-import-tool/src/extract/extract.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { parseDocument } from 'htmlparser2'
import { AnyNode, Document } from 'domhandler'
import { type AnyNode, type Document } from 'domhandler'
import { findAll } from 'domutils'

import { FileSpec, FileSpecType, TocFileSpec } from './types'
import { type FileSpec, FileSpecType, type TocFileSpec } from './types'
import { createMetadataExtractor } from './meta'
import { ExtractedSection, TocSectionExtractor, extractSections } from './sections'
import { type ExtractedSection, TocSectionExtractor, extractSections } from './sections'

/**
* @public
Expand Down
14 changes: 7 additions & 7 deletions dev/doc-import-tool/src/extract/meta.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { AnyNode, Document, Element, Text } from 'domhandler'
import { type AnyNode, type Document, type Element, type Text } from 'domhandler'
import { find } from 'domutils'
import { ElementType } from 'htmlparser2'

import {
DocMetadataSpec,
type DocMetadataSpec,
MetadataContainer,
DocTableRowMetadata,
DocMetaTagsMetadata,
PageHeaderTableRowMetadata,
MetadataTableCell
type DocTableRowMetadata,
type DocMetaTagsMetadata,
type PageHeaderTableRowMetadata,
type MetadataTableCell
} from './types'
import { ELEMENT_LIMIT } from './common'
import { TableNodeExtractor } from './nodes'
import { TableContainer } from './container'
import { type TableContainer } from './container'

interface DocMetadataExtractor {
extractName: (doc: Document) => string
Expand Down
6 changes: 3 additions & 3 deletions dev/doc-import-tool/src/extract/nodes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Document, Element, AnyNode as AnyDomNode, AnyNode } from 'domhandler'
import { type Document, type Element, type AnyNode as AnyDomNode, type AnyNode } from 'domhandler'
import { ElementType } from 'htmlparser2'
import {
compareDocumentPosition,
Expand All @@ -10,9 +10,9 @@ import {
removeSubsets
} from 'domutils'

import { NodeType, ListParams, TableParams, GenericParams, TocParaSeqParams, TagsWithTextSpec, TagsSpec } from './types'
import { NodeType, type ListParams, type TableParams, type GenericParams, type TocParaSeqParams, type TagsWithTextSpec, type TagsSpec } from './types'
import { clean, compareStrExact } from '../helpers'
import { Container, GenericContainer, ListContainer, TableContainer } from './container'
import { type Container, GenericContainer, ListContainer, TableContainer } from './container'

// Copied from domutils ambient const enums to solve 'isolatedModules' is enabled
const enum DocumentPosition {
Expand Down
8 changes: 4 additions & 4 deletions dev/doc-import-tool/src/extract/sections.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Document } from 'domhandler'
import { Markup } from '@hcengineering/core'
import { type Document } from 'domhandler'
import { type Markup } from '@hcengineering/core'

import { GenericNodeSpec, NodeType, SectionSpec, SectionType, TocSectionSpec } from './types'
import { AnyContainer, createNodeExtractor } from './nodes'
import { type GenericNodeSpec, NodeType, type SectionSpec, SectionType, type TocSectionSpec } from './types'
import { type AnyContainer, createNodeExtractor } from './nodes'

/**
* @public
Expand Down
30 changes: 15 additions & 15 deletions dev/doc-import-tool/src/import.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import attachment, { Attachment } from '@hcengineering/attachment'
import attachment, { type Attachment } from '@hcengineering/attachment'
import { getClient as getCollaboratorClient } from '@hcengineering/collaborator-client'
import documents, {
ChangeControl,
ControlledDocument,
type ChangeControl,
type ControlledDocument,
DEFAULT_PERIODIC_REVIEW_INTERVAL,
Document,
DocumentCategory,
type Document,
type DocumentCategory,
DocumentState,
DocumentTemplate,
type DocumentTemplate,
createChangeControl,
createControlledDocFromTemplate,
createDocumentTemplate
} from '@hcengineering/controlled-documents'
import core, {
AttachedData,
BackupClient,
Client as CoreClient,
Data,
MeasureContext,
Ref,
type AttachedData,
type BackupClient,
type Client as CoreClient,
type Data,
type MeasureContext,
type Ref,
TxOperations,
generateId,
makeDocCollabId,
Expand All @@ -30,9 +30,9 @@ import { generateToken } from '@hcengineering/server-token'
import { findAll, getOuterHTML } from 'domutils'
import { parseDocument } from 'htmlparser2'

import { Config } from './config'
import { ExtractedFile } from './extract/extract'
import { ExtractedSection } from './extract/sections'
import { type Config } from './config'
import { type ExtractedFile } from './extract/extract'
import { type ExtractedSection } from './extract/sections'

export default async function importExtractedFile (
ctx: MeasureContext,
Expand Down
8 changes: 4 additions & 4 deletions dev/doc-import-tool/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { Employee } from '@hcengineering/contact'
import documents, { DocumentSpace } from '@hcengineering/controlled-documents'
import { MeasureMetricsContext, Ref, systemAccountUuid, WorkspaceUuid, type WorkspaceDataId } from '@hcengineering/core'
import { type Employee } from '@hcengineering/contact'
import documents, { type DocumentSpace } from '@hcengineering/controlled-documents'
import { MeasureMetricsContext, type Ref, systemAccountUuid, type WorkspaceUuid, type WorkspaceDataId } from '@hcengineering/core'
import { setMetadata } from '@hcengineering/platform'
import serverClientPlugin from '@hcengineering/server-client'
import { type StorageAdapter } from '@hcengineering/server-core'
Expand All @@ -23,7 +23,7 @@ import serverToken, { generateToken } from '@hcengineering/server-token'
import { program } from 'commander'

import { importDoc } from './commands'
import { Config } from './config'
import { type Config } from './config'
import { getBackend } from './convert/convert'

/**
Expand Down
2 changes: 1 addition & 1 deletion dev/doc-import-tool/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./node_modules/@hcengineering/platform-rig/profiles/default/tsconfig.json",
"extends": "./node_modules/@hcengineering/platform-rig/profiles/node/tsconfig.json",

"compilerOptions": {
"rootDir": "./src",
Expand Down
6 changes: 3 additions & 3 deletions dev/import-tool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"@typescript-eslint/eslint-plugin": "^6.11.0",
"eslint": "^8.54.0",
"ts-node": "^10.8.0",
"esbuild": "^0.24.2",
"@types/node": "~20.11.16",
"esbuild": "^0.25.1",
"@types/node": "^22.13.5",
"@typescript-eslint/parser": "^6.11.0",
"typescript": "^5.3.3",
"typescript": "^5.8.2",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"@types/jest": "^29.5.5",
Expand Down
8 changes: 4 additions & 4 deletions dev/prod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@types/node": "~20.11.16",
"@types/node": "^22.13.5",
"autoprefixer": "^10.4.14",
"browserslist": "^4.24.4",
"compression-webpack-plugin": "^10.0.0",
"cross-env": "~7.0.3",
"css-loader": "^5.2.1",
"dotenv-webpack": "^8.0.1",
"esbuild": "^0.24.2",
"esbuild": "^0.25.1",
"esbuild-loader": "^4.0.3",
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
Expand All @@ -46,9 +46,9 @@
"svelte-preprocess": "^5.1.3",
"svgo-loader": "^3.0.0",
"ts-loader": "^9.2.5",
"typescript": "^5.3.3",
"typescript": "^5.8.2",
"update-browserslist-db": "^1.1.2",
"webpack": "^5.97.1",
"webpack": "^5.98.0",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.11.1"
Expand Down
2 changes: 1 addition & 1 deletion dev/prod/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"outDir": "./dist/",
"noImplicitAny": true,
"module": "esnext",
"target": "es2021",
"target": "es2024",
"allowJs": true,
"declaration": true,
"sourceMap": true,
Expand Down
Loading
Loading