mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-05-27 07:36:18 +00:00
Upgrade typescript version
This commit is contained in:
90
package-lock.json
generated
90
package-lock.json
generated
@@ -72,7 +72,7 @@
|
|||||||
"run-script-os": "^1.1.6",
|
"run-script-os": "^1.1.6",
|
||||||
"start-server-and-test": "^2.0.9",
|
"start-server-and-test": "^2.0.9",
|
||||||
"tslint-config-prettier": "^1.18.0",
|
"tslint-config-prettier": "^1.18.0",
|
||||||
"typescript": "^4.2.3"
|
"typescript": "^5.7.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@alloc/quick-lru": {
|
"node_modules/@alloc/quick-lru": {
|
||||||
@@ -2763,28 +2763,6 @@
|
|||||||
"tslib": "^2.1.0"
|
"tslib": "^2.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@formatjs/intl": {
|
|
||||||
"version": "2.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@formatjs/intl/-/intl-2.2.1.tgz",
|
|
||||||
"integrity": "sha512-vgvyUOOrzqVaOFYzTf2d3+ToSkH2JpR7x/4U1RyoHQLmvEaTQvXJ7A2qm1Iy3brGNXC/+/7bUlc3lpH+h/LOJA==",
|
|
||||||
"dependencies": {
|
|
||||||
"@formatjs/ecma402-abstract": "1.11.4",
|
|
||||||
"@formatjs/fast-memoize": "1.2.1",
|
|
||||||
"@formatjs/icu-messageformat-parser": "2.1.0",
|
|
||||||
"@formatjs/intl-displaynames": "5.4.3",
|
|
||||||
"@formatjs/intl-listformat": "6.5.3",
|
|
||||||
"intl-messageformat": "9.13.0",
|
|
||||||
"tslib": "^2.1.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"typescript": "^4.5"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"typescript": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@formatjs/intl-displaynames": {
|
"node_modules/@formatjs/intl-displaynames": {
|
||||||
"version": "5.4.3",
|
"version": "5.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/@formatjs/intl-displaynames/-/intl-displaynames-5.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/@formatjs/intl-displaynames/-/intl-displaynames-5.4.3.tgz",
|
||||||
@@ -17768,6 +17746,28 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/react-intl/node_modules/@formatjs/intl": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@formatjs/intl/-/intl-2.2.1.tgz",
|
||||||
|
"integrity": "sha512-vgvyUOOrzqVaOFYzTf2d3+ToSkH2JpR7x/4U1RyoHQLmvEaTQvXJ7A2qm1Iy3brGNXC/+/7bUlc3lpH+h/LOJA==",
|
||||||
|
"dependencies": {
|
||||||
|
"@formatjs/ecma402-abstract": "1.11.4",
|
||||||
|
"@formatjs/fast-memoize": "1.2.1",
|
||||||
|
"@formatjs/icu-messageformat-parser": "2.1.0",
|
||||||
|
"@formatjs/intl-displaynames": "5.4.3",
|
||||||
|
"@formatjs/intl-listformat": "6.5.3",
|
||||||
|
"intl-messageformat": "9.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"typescript": "^4.5"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"typescript": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/react-is": {
|
"node_modules/react-is": {
|
||||||
"version": "17.0.2",
|
"version": "17.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
|
||||||
@@ -21327,16 +21327,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "4.9.5",
|
"version": "5.7.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
|
||||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
"integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
"tsserver": "bin/tsserver"
|
"tsserver": "bin/tsserver"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=4.2.0"
|
"node": ">=14.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/uc.micro": {
|
"node_modules/uc.micro": {
|
||||||
@@ -24538,20 +24538,6 @@
|
|||||||
"tslib": "^2.1.0"
|
"tslib": "^2.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@formatjs/intl": {
|
|
||||||
"version": "2.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@formatjs/intl/-/intl-2.2.1.tgz",
|
|
||||||
"integrity": "sha512-vgvyUOOrzqVaOFYzTf2d3+ToSkH2JpR7x/4U1RyoHQLmvEaTQvXJ7A2qm1Iy3brGNXC/+/7bUlc3lpH+h/LOJA==",
|
|
||||||
"requires": {
|
|
||||||
"@formatjs/ecma402-abstract": "1.11.4",
|
|
||||||
"@formatjs/fast-memoize": "1.2.1",
|
|
||||||
"@formatjs/icu-messageformat-parser": "2.1.0",
|
|
||||||
"@formatjs/intl-displaynames": "5.4.3",
|
|
||||||
"@formatjs/intl-listformat": "6.5.3",
|
|
||||||
"intl-messageformat": "9.13.0",
|
|
||||||
"tslib": "^2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@formatjs/intl-displaynames": {
|
"@formatjs/intl-displaynames": {
|
||||||
"version": "5.4.3",
|
"version": "5.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/@formatjs/intl-displaynames/-/intl-displaynames-5.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/@formatjs/intl-displaynames/-/intl-displaynames-5.4.3.tgz",
|
||||||
@@ -35559,6 +35545,22 @@
|
|||||||
"hoist-non-react-statics": "^3.3.2",
|
"hoist-non-react-statics": "^3.3.2",
|
||||||
"intl-messageformat": "9.13.0",
|
"intl-messageformat": "9.13.0",
|
||||||
"tslib": "^2.1.0"
|
"tslib": "^2.1.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@formatjs/intl": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@formatjs/intl/-/intl-2.2.1.tgz",
|
||||||
|
"integrity": "sha512-vgvyUOOrzqVaOFYzTf2d3+ToSkH2JpR7x/4U1RyoHQLmvEaTQvXJ7A2qm1Iy3brGNXC/+/7bUlc3lpH+h/LOJA==",
|
||||||
|
"requires": {
|
||||||
|
"@formatjs/ecma402-abstract": "1.11.4",
|
||||||
|
"@formatjs/fast-memoize": "1.2.1",
|
||||||
|
"@formatjs/icu-messageformat-parser": "2.1.0",
|
||||||
|
"@formatjs/intl-displaynames": "5.4.3",
|
||||||
|
"@formatjs/intl-listformat": "6.5.3",
|
||||||
|
"intl-messageformat": "9.13.0",
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-is": {
|
"react-is": {
|
||||||
@@ -38218,9 +38220,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "4.9.5",
|
"version": "5.7.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
|
||||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
"integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
|
||||||
"devOptional": true
|
"devOptional": true
|
||||||
},
|
},
|
||||||
"uc.micro": {
|
"uc.micro": {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
"run-script-os": "^1.1.6",
|
"run-script-os": "^1.1.6",
|
||||||
"start-server-and-test": "^2.0.9",
|
"start-server-and-test": "^2.0.9",
|
||||||
"tslint-config-prettier": "^1.18.0",
|
"tslint-config-prettier": "^1.18.0",
|
||||||
"typescript": "^4.2.3"
|
"typescript": "^5.7.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "run-script-os",
|
"start": "run-script-os",
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import './index.css';
|
|||||||
import 'semantic-ui-css/semantic.min.css';
|
import 'semantic-ui-css/semantic.min.css';
|
||||||
import 'canvas-toBlob';
|
import 'canvas-toBlob';
|
||||||
|
|
||||||
const messages = {
|
const messages: {[language: string]: {[message_id: string]: string}} = {
|
||||||
cs: messages_cs,
|
cs: messages_cs,
|
||||||
de: messages_de,
|
de: messages_de,
|
||||||
fr: messages_fr,
|
fr: messages_fr,
|
||||||
|
|||||||
@@ -106,19 +106,21 @@ class LunrSearchIndex implements SearchIndex {
|
|||||||
const pipelineFunctions: PipelineFunction[] = [];
|
const pipelineFunctions: PipelineFunction[] = [];
|
||||||
const searchPipelineFunctions: PipelineFunction[] = [];
|
const searchPipelineFunctions: PipelineFunction[] = [];
|
||||||
languages.forEach((language) => {
|
languages.forEach((language) => {
|
||||||
|
// @ts-ignore
|
||||||
|
const lunrLanguage = lunr[language];
|
||||||
if (language === 'en') {
|
if (language === 'en') {
|
||||||
wordCharacters += '\\w';
|
wordCharacters += '\\w';
|
||||||
pipelineFunctions.unshift(lunr.stopWordFilter);
|
pipelineFunctions.unshift(lunr.stopWordFilter);
|
||||||
pipelineFunctions.push(lunr.stemmer);
|
pipelineFunctions.push(lunr.stemmer);
|
||||||
searchPipelineFunctions.push(lunr.stemmer);
|
searchPipelineFunctions.push(lunr.stemmer);
|
||||||
} else {
|
} else {
|
||||||
wordCharacters += lunr[language].wordCharacters;
|
wordCharacters += lunrLanguage.wordCharacters;
|
||||||
if (lunr[language].stopWordFilter) {
|
if (lunrLanguage.stopWordFilter) {
|
||||||
pipelineFunctions.unshift(lunr[language].stopWordFilter);
|
pipelineFunctions.unshift(lunrLanguage.stopWordFilter);
|
||||||
}
|
}
|
||||||
if (lunr[language].stemmer) {
|
if (lunrLanguage.stemmer) {
|
||||||
pipelineFunctions.push(lunr[language].stemmer);
|
pipelineFunctions.push(lunrLanguage.stemmer);
|
||||||
searchPipelineFunctions.push(lunr[language].stemmer);
|
searchPipelineFunctions.push(lunrLanguage.stemmer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"suppressImplicitAnyIndexErrors": true,
|
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user