mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 03:02:14 +01:00 
			
		
		
		
	Clean up npm dependencies (#35484)
- `type-fest` is replaced by our own types - `@stylistic/eslint-plugin-js` is no longer in use, it was replaced with `@stylistic/eslint-plugin` - `@types/license-checker-webpack-plugin` does not apply to our forked version and has a type stub
This commit is contained in:
		
							parent
							
								
									69e595cdd8
								
							
						
					
					
						commit
						8c8eb4b6f9
					
				| @ -75,7 +75,6 @@ | ||||
|     "@types/dropzone": "5.7.9", | ||||
|     "@types/jquery": "3.5.33", | ||||
|     "@types/katex": "0.16.7", | ||||
|     "@types/license-checker-webpack-plugin": "0.2.5", | ||||
|     "@types/pdfobject": "2.2.5", | ||||
|     "@types/sortablejs": "1.15.8", | ||||
|     "@types/swagger-ui-dist": "3.30.6", | ||||
| @ -111,7 +110,6 @@ | ||||
|     "stylelint-declaration-strict-value": "1.10.11", | ||||
|     "stylelint-value-no-unknown-custom-properties": "6.0.1", | ||||
|     "svgo": "4.0.0", | ||||
|     "type-fest": "4.41.0", | ||||
|     "typescript-eslint": "8.43.0", | ||||
|     "updates": "16.7.0", | ||||
|     "vite-string-plugin": "1.4.6", | ||||
|  | ||||
							
								
								
									
										57
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										57
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							| @ -228,9 +228,6 @@ importers: | ||||
|       '@types/katex': | ||||
|         specifier: 0.16.7 | ||||
|         version: 0.16.7 | ||||
|       '@types/license-checker-webpack-plugin': | ||||
|         specifier: 0.2.5 | ||||
|         version: 0.2.5 | ||||
|       '@types/pdfobject': | ||||
|         specifier: 2.2.5 | ||||
|         version: 2.2.5 | ||||
| @ -336,9 +333,6 @@ importers: | ||||
|       svgo: | ||||
|         specifier: 4.0.0 | ||||
|         version: 4.0.0 | ||||
|       type-fest: | ||||
|         specifier: 4.41.0 | ||||
|         version: 4.41.0 | ||||
|       typescript-eslint: | ||||
|         specifier: 8.43.0 | ||||
|         version: 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) | ||||
| @ -1315,9 +1309,6 @@ packages: | ||||
|   '@types/katex@0.16.7': | ||||
|     resolution: {integrity: sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==} | ||||
| 
 | ||||
|   '@types/license-checker-webpack-plugin@0.2.5': | ||||
|     resolution: {integrity: sha512-raj3YPZxjkDlRrJJUq6So+C9i/fqYxUtVZzlXxm6bwwXONOnTHvGCfYmbQhzsHJneiJdlR6mMH76/bvWbZZN8Q==} | ||||
| 
 | ||||
|   '@types/markdown-escape@1.1.3': | ||||
|     resolution: {integrity: sha512-JIc1+s3y5ujKnt/+N+wq6s/QdL2qZ11fP79MijrVXsAAnzSxCbT2j/3prHRouJdZ2yFLN3vkP0HytfnoCczjOw==} | ||||
| 
 | ||||
| @ -1345,15 +1336,9 @@ packages: | ||||
|   '@types/sortablejs@1.15.8': | ||||
|     resolution: {integrity: sha512-b79830lW+RZfwaztgs1aVPgbasJ8e7AXtZYHTELNXZPsERt4ymJdjV4OccDbHQAvHrCcFpbF78jkm0R6h/pZVg==} | ||||
| 
 | ||||
|   '@types/source-list-map@0.1.6': | ||||
|     resolution: {integrity: sha512-5JcVt1u5HDmlXkwOD2nslZVllBBc7HDuOICfiZah2Z0is8M8g+ddAEawbmd3VjedfDHBzxCaXLs07QEmb7y54g==} | ||||
| 
 | ||||
|   '@types/swagger-ui-dist@3.30.6': | ||||
|     resolution: {integrity: sha512-FVxN7wjLYRtJsZBscOcOcf8oR++m38vbUFjT33Mr9HBuasX9bRDrJsp7iwixcOtKSHEEa2B7o2+4wEiXqC+Ebw==} | ||||
| 
 | ||||
|   '@types/tapable@1.0.12': | ||||
|     resolution: {integrity: sha512-bTHG8fcxEqv1M9+TD14P8ok8hjxoOCkfKc8XXLaaD05kI7ohpeI956jtDOD3XHKBQrlyPughUtzm1jtVhHpA5Q==} | ||||
| 
 | ||||
|   '@types/tern@0.23.9': | ||||
|     resolution: {integrity: sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw==} | ||||
| 
 | ||||
| @ -1372,21 +1357,12 @@ packages: | ||||
|   '@types/trusted-types@2.0.7': | ||||
|     resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} | ||||
| 
 | ||||
|   '@types/uglify-js@3.17.5': | ||||
|     resolution: {integrity: sha512-TU+fZFBTBcXj/GpDpDaBmgWk/gn96kMZ+uocaFUlV2f8a6WdMzzI44QBCmGcCiYR0Y6ZlNRiyUyKKt5nl/lbzQ==} | ||||
| 
 | ||||
|   '@types/unist@2.0.11': | ||||
|     resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} | ||||
| 
 | ||||
|   '@types/urijs@1.19.25': | ||||
|     resolution: {integrity: sha512-XOfUup9r3Y06nFAZh3WvO0rBU4OtlfPB/vgxpjg+NRdGU6CN6djdc6OEiH+PcqHCY6eFLo9Ista73uarf4gnBg==} | ||||
| 
 | ||||
|   '@types/webpack-sources@3.2.3': | ||||
|     resolution: {integrity: sha512-4nZOdMwSPHZ4pTEZzSp0AsTM4K7Qmu40UKW4tJDiOVs20UzYF9l+qUe4s0ftfN0pin06n+5cWWDJXH+sbhAiDw==} | ||||
| 
 | ||||
|   '@types/webpack@4.41.40': | ||||
|     resolution: {integrity: sha512-u6kMFSBM9HcoTpUXnL6mt2HSzftqb3JgYV6oxIgL2dl6sX6aCa5k6SOkzv5DuZjBTPUE/dJltKtwwuqrkZHpfw==} | ||||
| 
 | ||||
|   '@types/whatwg-mimetype@3.0.2': | ||||
|     resolution: {integrity: sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA==} | ||||
| 
 | ||||
| @ -4423,10 +4399,6 @@ packages: | ||||
|     resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} | ||||
|     engines: {node: '>=10'} | ||||
| 
 | ||||
|   type-fest@4.41.0: | ||||
|     resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} | ||||
|     engines: {node: '>=16'} | ||||
| 
 | ||||
|   typescript-eslint@8.43.0: | ||||
|     resolution: {integrity: sha512-FyRGJKUGvcFekRRcBKFBlAhnp4Ng8rhe8tuvvkR9OiU0gfd4vyvTRQHEckO6VDlH57jbeUQem2IpqPq9kLJH+w==} | ||||
|     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} | ||||
| @ -5796,10 +5768,6 @@ snapshots: | ||||
| 
 | ||||
|   '@types/katex@0.16.7': {} | ||||
| 
 | ||||
|   '@types/license-checker-webpack-plugin@0.2.5': | ||||
|     dependencies: | ||||
|       '@types/webpack': 4.41.40 | ||||
| 
 | ||||
|   '@types/markdown-escape@1.1.3': {} | ||||
| 
 | ||||
|   '@types/marked@4.3.2': {} | ||||
| @ -5822,12 +5790,8 @@ snapshots: | ||||
| 
 | ||||
|   '@types/sortablejs@1.15.8': {} | ||||
| 
 | ||||
|   '@types/source-list-map@0.1.6': {} | ||||
| 
 | ||||
|   '@types/swagger-ui-dist@3.30.6': {} | ||||
| 
 | ||||
|   '@types/tapable@1.0.12': {} | ||||
| 
 | ||||
|   '@types/tern@0.23.9': | ||||
|     dependencies: | ||||
|       '@types/estree': 1.0.8 | ||||
| @ -5843,29 +5807,10 @@ snapshots: | ||||
|   '@types/trusted-types@2.0.7': | ||||
|     optional: true | ||||
| 
 | ||||
|   '@types/uglify-js@3.17.5': | ||||
|     dependencies: | ||||
|       source-map: 0.6.1 | ||||
| 
 | ||||
|   '@types/unist@2.0.11': {} | ||||
| 
 | ||||
|   '@types/urijs@1.19.25': {} | ||||
| 
 | ||||
|   '@types/webpack-sources@3.2.3': | ||||
|     dependencies: | ||||
|       '@types/node': 24.3.1 | ||||
|       '@types/source-list-map': 0.1.6 | ||||
|       source-map: 0.7.6 | ||||
| 
 | ||||
|   '@types/webpack@4.41.40': | ||||
|     dependencies: | ||||
|       '@types/node': 24.3.1 | ||||
|       '@types/tapable': 1.0.12 | ||||
|       '@types/uglify-js': 3.17.5 | ||||
|       '@types/webpack-sources': 3.2.3 | ||||
|       anymatch: 3.1.3 | ||||
|       source-map: 0.6.1 | ||||
| 
 | ||||
|   '@types/whatwg-mimetype@3.0.2': {} | ||||
| 
 | ||||
|   '@typescript-eslint/eslint-plugin@8.43.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2)': | ||||
| @ -9104,8 +9049,6 @@ snapshots: | ||||
| 
 | ||||
|   type-fest@0.20.2: {} | ||||
| 
 | ||||
|   type-fest@4.41.0: {} | ||||
| 
 | ||||
|   typescript-eslint@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2): | ||||
|     dependencies: | ||||
|       '@typescript-eslint/eslint-plugin': 8.43.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) | ||||
|  | ||||
| @ -3,7 +3,6 @@ import type {Config} from 'updates'; | ||||
| export default { | ||||
|   exclude: [ | ||||
|     '@mcaptcha/vanilla-glue', // breaking changes in rc versions need to be handled
 | ||||
|     '@stylistic/eslint-plugin-js', // need to migrate to eslint 9
 | ||||
|     'cropperjs', // need to migrate to v2 but v2 is not compatible with v1
 | ||||
|     'tailwindcss', // need to migrate
 | ||||
|   ], | ||||
|  | ||||
| @ -27,7 +27,6 @@ import {chartJsColors} from '../utils/color.ts'; | ||||
| import {sleep} from '../utils.ts'; | ||||
| import 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm'; | ||||
| import {fomanticQuery} from '../modules/fomantic/base.ts'; | ||||
| import type {Entries} from 'type-fest'; | ||||
| import {pathEscapeSegments} from '../utils/url.ts'; | ||||
| 
 | ||||
| const customEventListener: Plugin = { | ||||
| @ -57,6 +56,13 @@ Chart.register( | ||||
|   customEventListener, | ||||
| ); | ||||
| 
 | ||||
| type ContributorsData = { | ||||
|   total: { | ||||
|     weeks: Record<string, any>, | ||||
|   }, | ||||
|   [other: string]: Record<string, Record<string, any>>, | ||||
| } | ||||
| 
 | ||||
| export default defineComponent({ | ||||
|   components: {ChartLine, SvgIcon}, | ||||
|   props: { | ||||
| @ -127,12 +133,12 @@ export default defineComponent({ | ||||
|           } | ||||
|         } while (response.status === 202); | ||||
|         if (response.ok) { | ||||
|           const data = await response.json(); | ||||
|           const {total, ...rest} = data; | ||||
|           const data = await response.json() as ContributorsData; | ||||
|           const {total, ...other} = data; | ||||
|           // below line might be deleted if we are sure go produces map always sorted by keys | ||||
|           total.weeks = Object.fromEntries(Object.entries(total.weeks).sort()); | ||||
| 
 | ||||
|           const weekValues = Object.values(total.weeks) as any; | ||||
|           const weekValues = Object.values(total.weeks); | ||||
|           this.xAxisStart = weekValues[0].week; | ||||
|           this.xAxisEnd = firstStartDateAfterDate(new Date()); | ||||
|           const startDays = startDaysBetween(this.xAxisStart, this.xAxisEnd); | ||||
| @ -140,7 +146,7 @@ export default defineComponent({ | ||||
|           this.xAxisMin = this.xAxisStart; | ||||
|           this.xAxisMax = this.xAxisEnd; | ||||
|           this.contributorsStats = {}; | ||||
|           for (const [email, user] of Object.entries(rest) as Entries<Record<string, Record<string, any>>>) { | ||||
|           for (const [email, user] of Object.entries(other)) { | ||||
|             user.weeks = fillEmptyStartDaysWithZeroes(startDays, user.weeks); | ||||
|             this.contributorsStats[email] = user; | ||||
|           } | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| import {isDocumentFragmentOrElementNode} from '../utils/dom.ts'; | ||||
| import type {Promisable} from 'type-fest'; | ||||
| import type {Promisable} from '../types.ts'; | ||||
| import type {InitPerformanceTracer} from './init.ts'; | ||||
| 
 | ||||
| let globalSelectorObserverInited = false; | ||||
|  | ||||
| @ -68,3 +68,5 @@ export type FomanticInitFunction = { | ||||
| }; | ||||
| 
 | ||||
| export type GitRefType = 'branch' | 'tag'; | ||||
| 
 | ||||
| export type Promisable<T> = T | Promise<T>; // stricter than type-fest which uses PromiseLike
 | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| import {debounce} from 'throttle-debounce'; | ||||
| import type {Promisable} from 'type-fest'; | ||||
| import type {Promisable} from '../types.ts'; | ||||
| import type $ from 'jquery'; | ||||
| import {isInFrontendUnitTest} from './testhelper.ts'; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user