Skip to content

Commit

Permalink
Merge branch 'main' into aws-node-example-readme
Browse files Browse the repository at this point in the history
* main: (262 commits)
  Release: uppy@3.26.0 (#5223)
  meta: remove Companion's `prepublishOnly` (#5220)
  docs: document clearUploadedFiles (#5204)
  @uppy/webcam: add missing types for `recordedVideo` (#5208)
  @uppy/core: check capabilities in clearUploadedFiles (#5201)
  PartialTree - change the `maxTotalFileSize` error (#5203)
  @uppy/transloadit: remove `updateNumberOfFilesInAssembly` (#5202)
  @uppy/aws-s3: resolve all headers on response (#5195)
  Improve provider docs: OneDrive (#5196)
  Release: uppy@3.25.5 (#5193)
  @uppy/transloadit: do not cancel assembly when removing all files (#5191)
  @uppy/xhr-upload: fix regression for lowercase HTTP methods (#5179)
  meta: improve changelog generator (#5190)
  Release: uppy@3.25.4 (#5188)
  @uppy/svelte: do not attempt removing plugin before it's created (#5186)
  Update facebook.mdx
  fixup! @uppy/tus: fix no headers passed to companion if argument is a function (#5182)
  @uppy/tus: fix no headers passed to companion if argument is a function (#5182)
  @uppy/companion: fix google drive gsuite export large size (#5144)
  Improve provider docs: Box & Zoom (#5166)
  ...
  • Loading branch information
Murderlon committed Jun 10, 2024
2 parents dd4f8bf + 9816fd7 commit 9539e64
Show file tree
Hide file tree
Showing 850 changed files with 38,563 additions and 14,193 deletions.
27 changes: 23 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ module.exports = {
'react/prefer-stateless-function': 'error',
'react/sort-comp': 'error',
'react/style-prop-object': 'error',
'react/static-property-placement': 'off',

// accessibility
'jsx-a11y/alt-text': 'error',
Expand Down Expand Up @@ -174,6 +175,10 @@ module.exports = {
name: 'require',
message: 'Use import instead',
},
{
name: 'JSX',
message: 'Use h.JSX.Element, ComponentChild, or ComponentChildren from Preact',
},
],
'import/extensions': ['error', 'ignorePackages'],
},
Expand Down Expand Up @@ -340,6 +345,7 @@ module.exports = {
{
files: [
'*.test.js',
'*.test.ts',
'test/endtoend/*.js',
'bin/**.js',
],
Expand Down Expand Up @@ -411,8 +417,15 @@ module.exports = {
files: ['**/*.md', '*.md'],
processor: 'markdown/markdown',
},
{
files: ['docs/**/*.md/*.js'],
parserOptions: {
sourceType: 'module',
},
},
{
files: ['**/*.md/*.js', '**/*.md/*.javascript'],
excludedFiles: ["docs/**/*"],
parserOptions: {
sourceType: 'module',
},
Expand Down Expand Up @@ -444,7 +457,7 @@ module.exports = {
},
},
{
files: ['**/*.ts', '**/*.md/*.ts', '**/*.md/*.typescript'],
files: ['**/*.ts', '**/*.md/*.ts', '**/*.md/*.typescript', '**/*.tsx', '**/*.md/*.tsx'],
excludedFiles: ['examples/angular-example/**/*.ts', 'packages/@uppy/angular/**/*.ts'],
parser: '@typescript-eslint/parser',
settings: {
Expand All @@ -461,17 +474,23 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
],
rules: {
'no-restricted-syntax': ['error', {
selector: 'ImportDeclaration[importKind="type"][source.value=/^\\./]:not([source.value=/\\.js$/])',
message: 'Use ".js" file extension for import type declarations',
}],
'import/prefer-default-export': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
{
files: ['packages/@uppy/*/src/**/*.ts', 'packages/@uppy/*/src/**/*.tsx'],
excludedFiles: ['packages/@uppy/**/*.test.ts'],
files: ['packages/@uppy/*/src/**/*.ts'],
excludedFiles: ['packages/@uppy/**/*.test.ts', 'packages/@uppy/core/src/mocks/*.ts'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
},
},
{
Expand Down
314 changes: 217 additions & 97 deletions .github/CONTRIBUTING.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/1-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ body:
Starters:
- [Uppy Dashboard](https://codesandbox.io/s/uppy-dashboard-xpxuhd?file=/src/index.js)
- [Uppy Dashboard](https://stackblitz.com/edit/vitejs-vite-zaqyaf?file=main.js)
- [Uppy React](https://stackblitz.com/edit/vitejs-vite-vehvbq?file=src%2FApp.tsx)
- [Uppy Vue](https://stackblitz.com/edit/vitejs-vite-ubjwys?file=src%2FApp.vue)
validations:
required: false
- type: textarea
Expand Down
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Basic set up for three package managers

version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
18 changes: 9 additions & 9 deletions .github/workflows/bundlers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run:
echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
pack --install-if-needed -o /tmp/artifacts/%s-${{ github.sha }}.tgz
- name: Upload artifact
if: success()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: packages
path: /tmp/artifacts/
Expand All @@ -87,7 +87,7 @@ jobs:
bundler-version: [latest]
steps:
- name: Download uppy tarball
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: /tmp/
- name: Extract tarball
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
bundler-version: [latest]
steps:
- name: Download uppy tarball
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: /tmp/
- name: Extract tarball
Expand All @@ -151,7 +151,7 @@ jobs:
bundler-version: [latest]
steps:
- name: Download uppy tarball
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: /tmp/
- name: Extract tarball
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
bundler-version: [latest]
steps:
- name: Download uppy tarball
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: /tmp/
- name: Extract tarball
Expand All @@ -206,7 +206,7 @@ jobs:
bundler-version: [latest]
steps:
- name: Download uppy tarball
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: /tmp/
- name: Extract tarball
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ jobs:
node-version: [18.x, 20.x]
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run:
echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{matrix.node-version}}
- name: Install dependencies
Expand All @@ -70,21 +70,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run:
echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
Expand All @@ -101,13 +101,15 @@ jobs:
corepack yarn run build:lib
corepack yarn run build:companion
corepack yarn run build:locale-pack
find packages/@uppy -name 'tsconfig.json' -delete
- 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: |
git checkout -- packages/@uppy
node --input-type=module <<'EOF'
import { existsSync } from 'node:fs';
import { opendir, readFile, writeFile } from 'node:fs/promises';
Expand All @@ -119,6 +121,12 @@ jobs:
await writeFile(pjsonPath, JSON.stringify(pjson))
}
}
const pjsonPath = `./packages/uppy/package.json`
const pjson = JSON.parse(await readFile(pjsonPath));
delete pjson.types
await writeFile(pjsonPath, JSON.stringify(pjson))
EOF
echo > packages/uppy/types/index.test-d.ts
rm -r packages/@uppy/*/types
- name: Attempt building TS packages
run: corepack yarn run build:ts
20 changes: 10 additions & 10 deletions .github/workflows/companion-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set SHA commit in version
run:
(cd packages/@uppy/companion && node -e 'const
Expand All @@ -33,7 +33,7 @@ jobs:
/tmp/companion-${{ github.sha }}.tar.gz
- name: Upload artifact
if: success()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: companion-${{ github.sha }}.tar.gz
path: /tmp/companion-${{ github.sha }}.tar.gz
Expand All @@ -46,24 +46,24 @@ jobs:
COMPOSE_DOCKER_CLI_BUILD: 0
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: transloadit/companion
tags: |
type=edge
type=raw,value=latest,enable=false
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- uses: docker/setup-buildx-action@v3
- name: Log in to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_PASSWORD}}
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
push: true
context: .
Expand All @@ -77,12 +77,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Alter dockerfile
run: |
sed -i 's/^EXPOSE 3020$/EXPOSE $PORT/g' Dockerfile
- name: Deploy to heroku
uses: akhileshns/heroku-deploy@v3.12.12
uses: akhileshns/heroku-deploy@581dd286c962b6972d427fcf8980f60755c15520 # v3.13.15
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: companion-demo
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/companion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ jobs:
node-version: [14.x, 16.x, 18.x]
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run:
echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{matrix.node-version}}
- name: Install dependencies
Expand Down
Loading

0 comments on commit 9539e64

Please sign in to comment.