Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta: run prettier on existing files #4712

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/ISSUE_TEMPLATE/1-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ body:
attributes:
label: Initial checklist
options:
- label: I understand this is a bug report and questions should be posted in the [Community Forum](https://community.transloadit.com/)
- label:
I understand this is a bug report and questions should be posted in
the [Community Forum](https://community.transloadit.com/)
required: true
- label: I searched [issues](https://github.com/transloadit/uppy/issues?q=is%3Aissue) and couldn’t find anything (or linked relevant results below)
- label:
I searched
[issues](https://github.com/transloadit/uppy/issues?q=is%3Aissue)
and couldn’t find anything (or linked relevant results below)
required: true
- type: input
id: runnable-example
Expand All @@ -28,7 +33,9 @@ body:
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: How did this happen? Please provide a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example).
description:
How did this happen? Please provide a [minimal, reproducible
example](https://stackoverflow.com/help/minimal-reproducible-example).
validations:
required: true
- type: textarea
Expand Down
13 changes: 10 additions & 3 deletions .github/ISSUE_TEMPLATE/2-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ body:
attributes:
label: Initial checklist
options:
- label: I understand this is a feature request and questions should be posted in the [Community Forum](https://community.transloadit.com/)
- label:
I understand this is a feature request and questions should be
posted in the [Community Forum](https://community.transloadit.com/)
required: true
- label: I searched [issues](https://github.com/transloadit/uppy/issues?q=is%3Aissue) and couldn’t find anything (or linked relevant results below)
- label:
I searched
[issues](https://github.com/transloadit/uppy/issues?q=is%3Aissue)
and couldn’t find anything (or linked relevant results below)
required: true
- type: textarea
id: problem
Expand All @@ -29,6 +34,8 @@ body:
id: alternatives
attributes:
label: Alternatives
description: What are the alternative solutions? Can this be solved in a different way?
description:
What are the alternative solutions? Can this be solved in a different
way?
validations:
required: true
4 changes: 2 additions & 2 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ staleLabel: Stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. If the issue is still relevant, please upvote or leave a comment.
Thank you for your contribution!
recent activity. If the issue is still relevant, please upvote or leave a
comment. Thank you for your contribution!
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
50 changes: 32 additions & 18 deletions .github/workflows/bundlers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Test different bundlers with Uppy

on:
push:
branches: [ main ]
branches: [main]
pull_request:
# We want all branches so we configure types to be the GH default again
types: [ opened, synchronize, reopened ]
types: [opened, synchronize, reopened]
paths-ignore:
- '**.md'
- '**.d.ts'
Expand All @@ -27,7 +27,8 @@ jobs:
uses: actions/checkout@v3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
run:
echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
Expand All @@ -40,7 +41,10 @@ jobs:
with:
node-version: lts/*
- name: Install dependencies
run: corepack yarn workspaces focus $(corepack yarn workspaces list --json | jq -r .name | awk '/^@uppy-example/{ next } { if ($0!="uppy.io") print $0 }')
run:
corepack yarn workspaces focus $(corepack yarn workspaces list --json
| jq -r .name | awk '/^@uppy-example/{ next } { if ($0!="uppy.io")
print $0 }')
env:
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
CYPRESS_INSTALL_BINARY: 0
Expand All @@ -64,7 +68,9 @@ jobs:
})();
EOF
- name: Eject public packages from repo
run: mkdir /tmp/artifacts && corepack yarn workspaces foreach --no-private pack --install-if-needed -o /tmp/artifacts/%s-${{ github.sha }}.tgz
run:
mkdir /tmp/artifacts && corepack yarn workspaces foreach --no-private
pack --install-if-needed -o /tmp/artifacts/%s-${{ github.sha }}.tgz
- name: Upload artifact
if: success()
uses: actions/upload-artifact@v3
Expand All @@ -85,18 +91,17 @@ jobs:
with:
path: /tmp/
- name: Extract tarball
run: tar -xzf /tmp/packages/uppy-${{ github.sha }}.tgz --strip-components 1
run:
tar -xzf /tmp/packages/uppy-${{ github.sha }}.tgz --strip-components 1
- name: Add Rollup as a dev dependency
run: >-
npm i --save-dev
@rollup/plugin-commonjs @rollup/plugin-node-resolve
npm i --save-dev @rollup/plugin-commonjs @rollup/plugin-node-resolve
rollup@${{matrix.bundler-version}}
- run: npx rollup --version
- name: Create Rollup config file
run: >-
echo '
import cjs from "@rollup/plugin-commonjs";
import { nodeResolve } from "@rollup/plugin-node-resolve";
echo ' import cjs from "@rollup/plugin-commonjs"; import { nodeResolve
} from "@rollup/plugin-node-resolve";

export default {
input: "./index.mjs",
Expand Down Expand Up @@ -124,12 +129,16 @@ jobs:
with:
path: /tmp/
- name: Extract tarball
run: tar -xzf /tmp/packages/uppy-${{ github.sha }}.tgz --strip-components 1
run:
tar -xzf /tmp/packages/uppy-${{ github.sha }}.tgz --strip-components 1
- name: Add Webpack as a dev dependency
run: npm i --save-dev webpack-cli webpack@${{matrix.bundler-version}}
- run: npx webpack --version
- name: Create Webpack config file
run: echo 'module.exports={mode:"production",target:"web",entry:"./index.mjs"}' > webpack.config.js
run:
echo
'module.exports={mode:"production",target:"web",entry:"./index.mjs"}'
> webpack.config.js
- name: Bundle
run: npx webpack

Expand All @@ -146,7 +155,8 @@ jobs:
with:
path: /tmp/
- name: Extract tarball
run: tar -xzf /tmp/packages/uppy-${{ github.sha }}.tgz --strip-components 1
run:
tar -xzf /tmp/packages/uppy-${{ github.sha }}.tgz --strip-components 1
- name: Fix package.json to work with Parcel
run: |
node <<'EOF'
Expand Down Expand Up @@ -175,12 +185,15 @@ jobs:
with:
path: /tmp/
- name: Extract tarball
run: tar -xzf /tmp/packages/uppy-${{ github.sha }}.tgz --strip-components 1
run:
tar -xzf /tmp/packages/uppy-${{ github.sha }}.tgz --strip-components 1
- name: Add Vite as a dev dependency
run: npm i --save-dev vite@${{matrix.bundler-version}}
- run: npx vite --version
- name: Create index.html
run: echo '<!doctype html><html><head><script type="module" src="./index.mjs"></script></head></html>' > index.html
run:
echo '<!doctype html><html><head><script type="module"
src="./index.mjs"></script></head></html>' > index.html
- name: Bundle
run: npx vite build

Expand All @@ -197,11 +210,12 @@ jobs:
with:
path: /tmp/
- name: Extract tarball
run: tar -xzf /tmp/packages/uppy-${{ github.sha }}.tgz --strip-components 1
run:
tar -xzf /tmp/packages/uppy-${{ github.sha }}.tgz --strip-components 1
- name: Add ESBuild as a dev dependency
run: npm i --save-dev esbuild@${{matrix.bundler-version}}
- run: npx esbuild --version
- name: Bundle
run: npx esbuild index.mjs --bundle --outfile=/dev/null

# Browserify: doesn't support ESM.
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [ main ]
branches: [main]
paths-ignore:
- '**.md'
- 'assets/**'
Expand All @@ -14,7 +14,7 @@ on:
- '!.github/workflows/ci.yml'
pull_request:
# We want all branches so we configure types to be the GH default again
types: [ opened, synchronize, reopened ]
types: [opened, synchronize, reopened]
paths-ignore:
- '**.md'
- 'assets/**'
Expand All @@ -41,7 +41,8 @@ jobs:
uses: actions/checkout@v3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
run:
echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand All @@ -55,7 +56,10 @@ jobs:
with:
node-version: ${{matrix.node-version}}
- name: Install dependencies
run: corepack yarn workspaces focus $(corepack yarn workspaces list --json | jq -r .name | awk '/^@uppy-example/{ next } { if ($0!="uppy.io") print $0 }')
run:
corepack yarn workspaces focus $(corepack yarn workspaces list --json
| jq -r .name | awk '/^@uppy-example/{ next } { if ($0!="uppy.io")
print $0 }')
env:
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
CYPRESS_INSTALL_BINARY: 0
Expand All @@ -70,7 +74,8 @@ jobs:
uses: actions/checkout@v3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
run:
echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand All @@ -84,7 +89,10 @@ jobs:
with:
node-version: lts/*
- name: Install dependencies
run: corepack yarn workspaces focus $(corepack yarn workspaces list --json | jq -r .name | awk '/^@uppy-example/{ next } { if ($0!="uppy.io") print $0 }')
run:
corepack yarn workspaces focus $(corepack yarn workspaces list --json
| jq -r .name | awk '/^@uppy-example/{ next } { if ($0!="uppy.io")
print $0 }')
env:
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
CYPRESS_INSTALL_BINARY: 0
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/companion-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Companion Edge Deploy

on:
push:
branches: [ 'main' ]
branches: ['main']
paths:
- yarn.lock
- 'packages/@uppy/companion/**'
Expand All @@ -22,9 +22,15 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3
- name: Set SHA commit in version
run: (cd packages/@uppy/companion && node -e 'const pkg=require("./package.json");pkg.version+="+${{ github.sha }}";fs.writeFileSync("package.json",JSON.stringify(pkg, undefined, 2)+"\n")')
run:
(cd packages/@uppy/companion && node -e 'const
pkg=require("./package.json");pkg.version+="+${{ github.sha
}}";fs.writeFileSync("package.json",JSON.stringify(pkg, undefined,
2)+"\n")')
- name: Create Companion tarball
run: corepack yarn workspace @uppy/companion pack --install-if-needed -o /tmp/companion-${{ github.sha }}.tar.gz
run:
corepack yarn workspace @uppy/companion pack --install-if-needed -o
/tmp/companion-${{ github.sha }}.tar.gz
- name: Upload artifact
if: success()
uses: actions/upload-artifact@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/companion.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Companion
on:
push:
branches: [ main ]
branches: [main]
paths:
- yarn.lock
- 'packages/@uppy/companion/**'
- '.github/workflows/companion.yml'
pull_request:
# We want all branches so we configure types to be the GH default again
types: [ opened, synchronize, reopened ]
types: [opened, synchronize, reopened]
paths:
- yarn.lock
- 'packages/@uppy/companion/**'
Expand All @@ -29,7 +29,8 @@ jobs:
uses: actions/checkout@v3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
run:
echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand All @@ -48,4 +49,3 @@ jobs:
run: corepack yarn run test:companion
- name: Run type checks in focused workspace
run: corepack yarn run build:companion

Loading