mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-02-18 02:55:48 +00:00
Upgrade typescript version
This commit is contained in:
parent
e86db55357
commit
41807a7b43
90
package-lock.json
generated
90
package-lock.json
generated
@ -72,7 +72,7 @@
|
||||
"run-script-os": "^1.1.6",
|
||||
"start-server-and-test": "^2.0.9",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "^4.2.3"
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@alloc/quick-lru": {
|
||||
@ -2763,28 +2763,6 @@
|
||||
"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": {
|
||||
"version": "5.4.3",
|
||||
"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": {
|
||||
"version": "17.0.2",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
|
||||
@ -21327,16 +21327,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.9.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
||||
"version": "5.7.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
|
||||
"integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
|
||||
"devOptional": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/uc.micro": {
|
||||
@ -24538,20 +24538,6 @@
|
||||
"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": {
|
||||
"version": "5.4.3",
|
||||
"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",
|
||||
"intl-messageformat": "9.13.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": {
|
||||
@ -38218,9 +38220,9 @@
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.9.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
||||
"version": "5.7.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
|
||||
"integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
|
||||
"devOptional": true
|
||||
},
|
||||
"uc.micro": {
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
"run-script-os": "^1.1.6",
|
||||
"start-server-and-test": "^2.0.9",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "^4.2.3"
|
||||
"typescript": "^5.7.3"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "run-script-os",
|
||||
|
||||
@ -15,7 +15,7 @@ import './index.css';
|
||||
import 'semantic-ui-css/semantic.min.css';
|
||||
import 'canvas-toBlob';
|
||||
|
||||
const messages = {
|
||||
const messages: {[language: string]: {[message_id: string]: string}} = {
|
||||
cs: messages_cs,
|
||||
de: messages_de,
|
||||
fr: messages_fr,
|
||||
|
||||
@ -106,19 +106,21 @@ class LunrSearchIndex implements SearchIndex {
|
||||
const pipelineFunctions: PipelineFunction[] = [];
|
||||
const searchPipelineFunctions: PipelineFunction[] = [];
|
||||
languages.forEach((language) => {
|
||||
// @ts-ignore
|
||||
const lunrLanguage = lunr[language];
|
||||
if (language === 'en') {
|
||||
wordCharacters += '\\w';
|
||||
pipelineFunctions.unshift(lunr.stopWordFilter);
|
||||
pipelineFunctions.push(lunr.stemmer);
|
||||
searchPipelineFunctions.push(lunr.stemmer);
|
||||
} else {
|
||||
wordCharacters += lunr[language].wordCharacters;
|
||||
if (lunr[language].stopWordFilter) {
|
||||
pipelineFunctions.unshift(lunr[language].stopWordFilter);
|
||||
wordCharacters += lunrLanguage.wordCharacters;
|
||||
if (lunrLanguage.stopWordFilter) {
|
||||
pipelineFunctions.unshift(lunrLanguage.stopWordFilter);
|
||||
}
|
||||
if (lunr[language].stemmer) {
|
||||
pipelineFunctions.push(lunr[language].stemmer);
|
||||
searchPipelineFunctions.push(lunr[language].stemmer);
|
||||
if (lunrLanguage.stemmer) {
|
||||
pipelineFunctions.push(lunrLanguage.stemmer);
|
||||
searchPipelineFunctions.push(lunrLanguage.stemmer);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"suppressImplicitAnyIndexErrors": true,
|
||||
"sourceMap": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user