Skip to content

Commit

Permalink
Merge branch 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 4, 2022
2 parents 65f2551 + 1a32764 commit 4996f44
Show file tree
Hide file tree
Showing 271 changed files with 4,238 additions and 5,368 deletions.
22 changes: 20 additions & 2 deletions .eslintrc.js
Expand Up @@ -32,6 +32,7 @@ module.exports = {
// extra:
'compat',
'jsdoc',
'unicorn',
],
parser: '@babel/eslint-parser',
parserOptions: {
Expand Down Expand Up @@ -73,6 +74,7 @@ module.exports = {
'node/handle-callback-err': 'error',
'prefer-destructuring': 'error',
'prefer-spread': 'error',
'unicorn/prefer-node-protocol': 'error',

// transloadit rules we would like to enforce in the future
// but will require separate PRs to gradually get there
Expand Down Expand Up @@ -122,7 +124,7 @@ module.exports = {
'jsdoc/check-examples': 'off', // cannot yet be supported for ESLint 8, see https://github.com/eslint/eslint/issues/14745
'jsdoc/check-param-names': ['warn'],
'jsdoc/check-syntax': ['warn'],
'jsdoc/check-tag-names': 'error',
'jsdoc/check-tag-names': ['error', { jsxTags: true }],
'jsdoc/check-types': 'error',
'jsdoc/newline-after-description': 'error',
'jsdoc/valid-types': 'error',
Expand Down Expand Up @@ -189,8 +191,10 @@ module.exports = {
files: [
'*.mjs',
'e2e/clients/**/*.js',
'examples/aws-companion/*.js',
'examples/aws-presigned-url/*.js',
'examples/bundled/*.js',
'examples/custom-provider/client/*.js',
'private/dev/*.js',
'private/release/*.js',
'private/remark-lint-uppy/*.js',
Expand Down Expand Up @@ -220,6 +224,7 @@ module.exports = {
'packages/@uppy/onedrive/src/**/*.js',
'packages/@uppy/progress-bar/src/**/*.js',
'packages/@uppy/provider-views/src/**/*.js',
'packages/@uppy/react/src/**/*.js',
'packages/@uppy/redux-dev-tools/src/**/*.js',
'packages/@uppy/remote-sources/src/**/*.js',
'packages/@uppy/screen-capture/src/**/*.js',
Expand Down Expand Up @@ -248,6 +253,8 @@ module.exports = {
},
rules: {
'import/named': 'off', // Disabled because that rule tries and fails to parse JSX dependencies.
'import/no-named-as-default': 'off', // Disabled because that rule tries and fails to parse JSX dependencies.
'import/no-named-as-default-member': 'off', // Disabled because that rule tries and fails to parse JSX dependencies.
'no-restricted-globals': [
'error',
{
Expand All @@ -274,6 +281,16 @@ module.exports = {
'import/extensions': ['error', 'ignorePackages'],
},
},
{
files: ['packages/uppy/*.mjs'],
rules: {
'import/first': 'off',
'import/newline-after-import': 'off',
'import/no-extraneous-dependencies': ['error', {
devDependencies: true,
}],
},
},
{
files: [
'packages/@uppy/*/types/*.d.ts',
Expand Down Expand Up @@ -347,7 +364,8 @@ module.exports = {
files: [
'bin/**.js',
'bin/**.mjs',
'examples/**/*.js',
'examples/**/*.config.js',
'examples/**/*.cjs',
'packages/@uppy/companion/test/**/*.js',
'test/**/*.js',
'test/**/*.ts',
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Expand Up @@ -13,12 +13,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x, 17.x]
node-version: [14.x, 16.x, 18.x]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install Corepack if needed
run: corepack -v || npm install -g corepack
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(corepack yarn config get cacheFolder)"
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/companion.yml
Expand Up @@ -7,44 +7,6 @@ on:
types: [ opened, synchronize, reopened ]

jobs:
test-legacy:
name: Unit tests (legacy)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.20.1, 12.x, 17.x]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(corepack yarn config get cacheFolder)"

- uses: actions/cache@v3
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
with:
node-version: ${{matrix.node-version}}
- name: Install Corepack if needed
run: corepack -v || npm install -g corepack
- name: Install dependencies
run: corepack yarn@3.1.1 install --no-immutable
env:
# Necessary for Node.js v10.x
NODE_OPTIONS: --experimental-worker
YARN_IGNORE_NODE: 1
- name: Run tests
run: corepack yarn run test:companion
env:
# Necessary for Node.js v10.x
NODE_OPTIONS: --experimental-worker
YARN_IGNORE_NODE: 1
test:
name: Unit tests
runs-on: ubuntu-latest
Expand Down
76 changes: 0 additions & 76 deletions .github/workflows/release-beta-candidate.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/release-candidate.yml
Expand Up @@ -39,8 +39,6 @@ jobs:
run: corepack yarn version apply --all --json | jq -s > releases.json
- name: Prepare changelog
run: corepack yarn workspace @uppy-dev/release update-changelogs releases.json | xargs git add
- name: Update contributors table
run: corepack yarn contributors:save && corepack yarn remark -foq README.md && git add README.md
- name: Update CDN URLs
run: corepack yarn workspace @uppy-dev/release update-version-URLs | xargs git add
- name: Stage changes and remove temp files
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Login to NPM
run: corepack yarn config set npmAuthToken ${{ toJSON(secrets.NPM_TOKEN) }}
- name: Publish to NPM
run: corepack yarn workspaces foreach --no-private npm publish --access public --tolerate-republish
run: corepack yarn workspaces foreach --no-private npm publish --access public --tag next --tolerate-republish
- name: Merge PR
id: merge
run: |
Expand All @@ -62,7 +62,7 @@ jobs:
id: uppyVersion
run: jq -r '"##[set-output name=version;]"+.version' < packages/uppy/package.json
- name: Create GitHub release
run: gh release create uppy@${{ steps.uppyVersion.outputs.version }} -t "Uppy ${{ steps.uppyVersion.outputs.version }}" -F CHANGELOG.diff.md
run: gh release create uppy@${{ steps.uppyVersion.outputs.version }} -t "Uppy ${{ steps.uppyVersion.outputs.version }}" -F CHANGELOG.diff.md --prerelease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload `uppy` to CDN
Expand All @@ -84,8 +84,8 @@ jobs:
run: gh api -X DELETE repos/${{ github.repository }}/git/refs/heads/release-candidate || echo "Already deleted"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Remove release branch
run: gh api -X DELETE repos/${{ github.repository }}/git/refs/heads/release
- name: Remove release-beta branch
run: gh api -X DELETE repos/${{ github.repository }}/git/refs/heads/release-beta
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Disable Release workflow
Expand Down
13 changes: 13 additions & 0 deletions .yarn/patches/@types-connect-redis-npm-0.0.18-4fd2b614d3
@@ -0,0 +1,13 @@
diff --git a/index.d.ts b/index.d.ts
index 413b15edf95c12b1b176279c82b3a9c3f06ade20..0158f6f7a95935acbb67aeea00cb94c241475565 100755
--- a/index.d.ts
+++ b/index.d.ts
@@ -19,7 +19,7 @@ declare module 'connect-redis' {
function s(options: (options?: session.SessionOptions) => express.RequestHandler): s.RedisStore;

namespace s {
- type Client = redis.RedisClient | ioRedis.Redis | ioRedis.Cluster;
+ type Client = redis.RedisClientType | ioRedis.Redis | ioRedis.Cluster;
interface RedisStore extends session.Store {
new (options: RedisStoreOptions): RedisStore;
client: Client;
2 changes: 1 addition & 1 deletion BUNDLE-README.md
@@ -1,7 +1,7 @@
# Uppy

Hi, thanks for trying out the bundled version of the Uppy File Uploader. You can use
this from a CDN (`<script src="https://releases.transloadit.com/uppy/v2.13.2/uppy.min.js"></script>`) or bundle it with your webapp.
this from a CDN (`<script src="https://releases.transloadit.com/uppy/v3.0.0-beta.4/uppy.min.js"></script>`) or bundle it with your webapp.

Note that the recommended way to use Uppy is to install it with yarn/npm and use a
bundler like Webpack so that you can create a smaller custom build with only the
Expand Down

0 comments on commit 4996f44

Please sign in to comment.