Skip to content

Commit

Permalink
remove manual types
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Nov 23, 2023
1 parent cb829d8 commit a2b3820
Show file tree
Hide file tree
Showing 129 changed files with 6 additions and 3,569 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,30 +95,5 @@ jobs:
env:
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
CYPRESS_INSTALL_BINARY: 0
# Need to do a bunch of work to generate the locale typings 🙃
- name: Prepare type declarations
run: |
corepack yarn run build:lib
corepack yarn run build:companion
corepack yarn run build:locale-pack
- name: Run type tests
run: corepack yarn run test:type
- name: Drop manual tyoes
# For backward compatiblity reasons, Uppy plugins ship a manual crafted d.ts file.
# We don't want to remove that file to not break users.
# However, we want to validate the types based on the types inferred from source.
run: |
node --input-type=module <<'EOF'
import { existsSync } from 'node:fs';
import { opendir, readFile, writeFile } from 'node:fs/promises';
for await (const dirent of await opendir('./packages/@uppy')) {
if (existsSync(`./packages/@uppy/${dirent.name}/tsconfig.build.json`)) {
const pjsonPath = `./packages/@uppy/${dirent.name}/package.json`
const pjson = JSON.parse(await readFile(pjsonPath));
delete pjson.types
await writeFile(pjsonPath, JSON.stringify(pjson))
}
}
EOF
- name: Attempt building TS packages
run: corepack yarn run build:ts
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
"stylelint-config-standard": "^34.0.0",
"stylelint-config-standard-scss": "^10.0.0",
"tar": "^6.1.0",
"tsd": "^0.28.0",
"typescript": "~5.1",
"vitest": "^0.34.5",
"vue-template-compiler": "workspace:*"
Expand Down Expand Up @@ -153,7 +152,6 @@
"test:locale-packs": "yarn locale-packs:unused && yarn locale-packs:warnings",
"test:locale-packs:unused": "yarn workspace @uppy-dev/locale-pack test unused",
"test:locale-packs:warnings": "yarn workspace @uppy-dev/locale-pack test warnings",
"test:type": "yarn workspaces foreach -piv --include '@uppy/*' --exclude '@uppy/{angular,react-native,locales,companion,provider-views,robodog,svelte}' exec tsd",
"test:unit": "yarn run build:lib && yarn test:watch",
"test:watch": "vitest --environment jsdom --dir packages/@uppy",
"test": "npm-run-all lint test:locale-packs:unused test:unit test:type test:companion",
Expand Down
1 change: 0 additions & 1 deletion packages/@uppy/audio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"license": "MIT",
"main": "lib/index.js",
"style": "dist/style.min.css",
"types": "types/index.d.ts",
"keywords": [
"file uploader",
"uppy",
Expand Down
12 changes: 0 additions & 12 deletions packages/@uppy/audio/types/index.d.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/@uppy/audio/types/index.test-d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/@uppy/aws-s3-multipart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"license": "MIT",
"main": "lib/index.js",
"type": "module",
"types": "types/index.d.ts",
"keywords": [
"file uploader",
"aws s3",
Expand Down
7 changes: 0 additions & 7 deletions packages/@uppy/aws-s3-multipart/types/chunk.d.ts

This file was deleted.

178 changes: 0 additions & 178 deletions packages/@uppy/aws-s3-multipart/types/index.d.ts

This file was deleted.

58 changes: 0 additions & 58 deletions packages/@uppy/aws-s3-multipart/types/index.test-d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/@uppy/aws-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"license": "MIT",
"main": "lib/index.js",
"type": "module",
"types": "types/index.d.ts",
"keywords": [
"file uploader",
"aws s3",
Expand Down
39 changes: 0 additions & 39 deletions packages/@uppy/aws-s3/types/index.d.ts

This file was deleted.

Loading

0 comments on commit a2b3820

Please sign in to comment.