Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"build": "yarn clear && concurrently 'yarn:build:*'",
"test": "node --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info --test '**/*.test.*'",
"lint": "concurrently 'yarn:lint:*'",
"lint:tsc": "tsc --noEmit",
"lint:tsc": "tsc -b --noEmit",
"lint:biome": "biome check",
"prepublishOnly": "yarn build",
"publish-package": "yarn install --check-files && yarn publish --non-interactive",
"swc-base": "swc src/ --config-file package.swcrc --strip-leading-paths",
"build:es6": "yarn swc-base -d lib",
"build:types": "cross-env NODE_ENV=production tsc --project tsconfig.build.json",
"build:types": "cross-env NODE_ENV=production tsc --project tsconfig.lib.json",
"size": "yarn build && size-limit",
"docs": "typedoc"
},
Expand Down Expand Up @@ -91,7 +91,7 @@
"ts-node": "^10.9.2",
"typedoc": "^0.28.18",
"typedoc-plugin-mdn-links": "^5.1.1",
"typescript": "^5.8.3"
"typescript": "^6.0.2"
},
"dependencies": {
"@swc/helpers": "^0.5.20",
Expand Down
3 changes: 2 additions & 1 deletion src/array/arrays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ export function omitFromArray<T>(array: T[] = [], value: T): T[] {
*/
export function difference<T>(array1: readonly T[] = [], array2: readonly T[] = []): T[] {
return array1.reduce<T[]>((res, item) => {
if (!array2.includes(item)) {
// TODO: после поднятия таргета es, необходимо заменить на includes
if (!array2.some((value) => (Number.isNaN(value) && Number.isNaN(item)) || value === item)) {
res.push(item);
}
return res;
Expand Down
2 changes: 1 addition & 1 deletion src/other/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const noop = (): void => {
export function once<T extends (...args: unknown[]) => unknown>(fn: T) {
// TODO: once должна кэшировать данные, но она это не делает
let called = false;
return function (...args) {
return function (this: unknown, ...args) {
if (called) {
return;
}
Expand Down
8 changes: 0 additions & 8 deletions tsconfig.build.json

This file was deleted.

44 changes: 2 additions & 42 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,4 @@
{
"compilerOptions": {
"module": "nodenext",
"target": "es5",
"lib": ["es5", "es2015", "dom"],
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"noEmit": true,
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"strictNullChecks": true,
"declaration": true,
"declarationMap": true,
"declarationDir": "lib",
"sourceMap": false,
"baseUrl": "src",
"esModuleInterop": true,
"emitDeclarationOnly": true,
"isolatedDeclarations": true,
"skipLibCheck": true,
"rewriteRelativeImportExtensions": true,
"erasableSyntaxOnly": true,
"verbatimModuleSyntax": true
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules"],
"typedocOptions": {
"readme": "README.md",
"plugin": ["typedoc-plugin-mdn-links"],
"entryPoints": [
"src/animation/index.ts",
"src/array/index.ts",
"src/async/index.ts",
"src/datetime/index.ts",
"src/device/index.ts",
"src/html/index.ts",
"src/other/index.ts",
"src/text/index.ts",
"src/typecheck/index.ts"
],
"out": "docs"
}
"files": [],
"references": [{ "path": "./tsconfig.lib.json" }, { "path": "./tsconfig.node.json" }]
}
44 changes: 44 additions & 0 deletions tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.lib.tsbuildinfo",
"module": "nodenext",
"target": "es2015",
"lib": ["es2015", "dom"],
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"noEmit": true,
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"strictNullChecks": true,
"declaration": true,
"declarationMap": true,
"declarationDir": "lib",
"sourceMap": false,
"esModuleInterop": true,
"emitDeclarationOnly": true,
"isolatedDeclarations": true,
"skipLibCheck": true,
"rewriteRelativeImportExtensions": true,
"erasableSyntaxOnly": true,
"verbatimModuleSyntax": true
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "src/**/*test.ts"],
"typedocOptions": {
"readme": "README.md",
"plugin": ["typedoc-plugin-mdn-links"],
"entryPoints": [
"src/animation/index.ts",
"src/array/index.ts",
"src/async/index.ts",
"src/datetime/index.ts",
"src/device/index.ts",
"src/html/index.ts",
"src/other/index.ts",
"src/text/index.ts",
"src/typecheck/index.ts"
],
"out": "docs"
}
}
30 changes: 30 additions & 0 deletions tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ESNext",
"lib": ["ESNext", "dom"],
"module": "nodenext",
"types": ["node"],
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
"rewriteRelativeImportExtensions": true,

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"noImplicitAny": true,
"preserveConstEnums": true,
"strictNullChecks": true
},
"include": ["src/**/*test.ts"]
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2465,10 +2465,10 @@ typedoc@^0.28.18:
minimatch "^10.2.4"
yaml "^2.8.2"

typescript@^5.8.3:
version "5.9.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
typescript@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.2.tgz#0b1bfb15f68c64b97032f3d78abbf98bdbba501f"
integrity sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==

uc.micro@^2.0.0, uc.micro@^2.1.0:
version "2.1.0"
Expand Down
Loading