Skip to content

Commit

Permalink
Merge branch 'main' into status-error-state
Browse files Browse the repository at this point in the history
* main:
  Refactor locale scripts & generate types and docs (#3276)
  Remove references of incorrect `options` argument for `companion.socket` (#3307)
  Upgrade linting to 2.0.0-0 (#3280)
  Release uppy@2.1.2, @uppy/robodog@2.1.3
  @uppy/core@2.1.2
  meta: update version references in docs
  Release @uppy/robodog@2.1.2
  @uppy/unsplash@2.0.3
  • Loading branch information
Murderlon committed Nov 11, 2021
2 parents c1e2296 + 00094af commit 697171b
Show file tree
Hide file tree
Showing 153 changed files with 1,385 additions and 1,097 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Expand Up @@ -19,3 +19,4 @@ website/src/_posts/2021-03-*.md
website/src/_posts/2021-04-*.md
website/src/_posts/2021-05-*.md
website/src/_posts/2021-06-*.md
website/src/docs/react-dashboard.md
2 changes: 1 addition & 1 deletion .eslintrc.js
Expand Up @@ -43,7 +43,6 @@ module.exports = {
rules: {
// transloadit rules we are actually ok with in the uppy repo
'import/extensions': 'off',
'no-await-in-loop': 'off',
'object-shorthand': ['error', 'always'],
'strict': 'off',
'key-spacing': 'off',
Expand Down Expand Up @@ -79,6 +78,7 @@ module.exports = {
'global-require': ['warn'],
'import/no-unresolved': ['warn'],
'import/order': ['warn'],
'max-classes-per-file': ['warn'],
'no-mixed-operators': ['warn'],
'no-param-reassign': ['warn'],
'no-redeclare': ['warn'],
Expand Down
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.2.1/uppy.min.js"></script>`) or bundle it with your webapp.
this from a CDN (`<script src="https://releases.transloadit.com/uppy/v2.2.3/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
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -69,18 +69,18 @@ $ npm install @uppy/core @uppy/dashboard @uppy/tus

We recommend installing from npm and then using a module bundler such as [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/) or [Rollup.js](http://rollupjs.org/).

Add CSS [uppy.min.css](https://releases.transloadit.com/uppy/v2.2.1/uppy.min.css), either to your HTML page’s `<head>` or include in JS, if your bundler of choice supports it — transforms and plugins are available for Browserify and Webpack.
Add CSS [uppy.min.css](https://releases.transloadit.com/uppy/v2.2.3/uppy.min.css), either to your HTML page’s `<head>` or include in JS, if your bundler of choice supports it — transforms and plugins are available for Browserify and Webpack.

Alternatively, you can also use a pre-built bundle from Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global `window.Uppy` object.

> ⚠️ The bundle consists of most Uppy plugins, so this method is not recommended for production, as your users will have to download all plugins when you are likely using only a few.
```html
<!-- 1. Add CSS to `<head>` -->
<link href="https://releases.transloadit.com/uppy/v2.2.1/uppy.min.css" rel="stylesheet">
<link href="https://releases.transloadit.com/uppy/v2.2.3/uppy.min.css" rel="stylesheet">

<!-- 2. Add JS before the closing `</body>` -->
<script src="https://releases.transloadit.com/uppy/v2.2.1/uppy.min.js"></script>
<script src="https://releases.transloadit.com/uppy/v2.2.3/uppy.min.js"></script>

<!-- 3. Initialize -->
<div class="UppyDragDrop"></div>
Expand Down Expand Up @@ -190,7 +190,7 @@ If you’re using Uppy from CDN, those polyfills are already included in the leg
bundle, so no need to include anything additionally:
```html
<script src="https://releases.transloadit.com/uppy/v2.2.1/uppy.min.js"></script>
<script src="https://releases.transloadit.com/uppy/v2.2.3/uppy.legacy.min.js"></script>
```
## FAQ
Expand Down
8 changes: 0 additions & 8 deletions bin/after-version-bump.js
Expand Up @@ -13,7 +13,6 @@
// NOTE this _amends_ the previous commit, which should
// already be a "Release" commit generated by bin/release.

const lastCommitMessage = require('last-commit-message')
const { spawn } = require('child_process')
const { readFile, writeFile } = require('fs/promises')
const once = require('events.once')
Expand Down Expand Up @@ -43,7 +42,6 @@ async function updateVersions (files, packageName) {
console.log('replacing', replacements, 'in', files.length, 'files')

for (const f of files) {
// eslint-disable-next-line no-await-in-loop
await replaceInFile(f, replacements)
}
}
Expand Down Expand Up @@ -78,12 +76,6 @@ async function main () {
process.exit(0)
}

const message = await lastCommitMessage()
if (message.trim() !== 'Release') {
console.error(`Last commit is not a release commit, but '${message}'`)
process.exit(1)
}

const files = await globby([
'README.md',
'BUNDLE-README.md',
Expand Down
14 changes: 7 additions & 7 deletions bin/build-bundle.js
Expand Up @@ -96,17 +96,17 @@ const methods = [
buildBundle(
'./packages/uppy/index.js',
'./packages/uppy/dist/uppy.js',
{ standalone: 'Uppy' }
{ standalone: 'Uppy' },
).then(minifyBundle),
buildBundle(
'./packages/uppy/bundle.js',
'./packages/uppy/dist/uppy.legacy.js',
{ standalone: 'Uppy (with polyfills)' }
{ standalone: 'Uppy (with polyfills)' },
).then(transpileDownForIE),
buildBundle(
'./packages/@uppy/robodog/bundle.js',
'./packages/@uppy/robodog/dist/robodog.js',
{ standalone: 'Robodog' }
{ standalone: 'Robodog' },
).then(minifyBundle),
]

Expand All @@ -118,17 +118,17 @@ glob.sync(localePackagePath).forEach((localePath) => {
buildBundle(
`./packages/@uppy/locales/src/${localeName}.js`,
`./packages/@uppy/locales/dist/${localeName}.min.js`,
{ minify: true }
)
{ minify: true },
),
)
})

// Add BUNDLE-README.MD
methods.push(
fs.promises.copyFile(
`${__dirname}/../BUNDLE-README.md`,
`./packages/uppy/dist/README.md`
)
`./packages/uppy/dist/README.md`,
),
)

Promise.all(methods).then(() => {
Expand Down
6 changes: 2 additions & 4 deletions bin/build-css.js
Expand Up @@ -23,7 +23,6 @@ function handleErr (err) {
async function compileCSS () {
const files = await glob('packages/{,@uppy/}*/src/style.scss')

/* eslint-disable no-await-in-loop */
for (const file of files) {
const importedFiles = new Set()
const scssResult = await renderScss({
Expand Down Expand Up @@ -78,7 +77,7 @@ async function compileCSS () {
await writeFile(outfile, postcssResult.css)
console.info(
chalk.green('✓ Built Uppy CSS:'),
chalk.magenta(path.relative(cwd, outfile))
chalk.magenta(path.relative(cwd, outfile)),
)

const minifiedResult = await postcss([
Expand All @@ -90,10 +89,9 @@ async function compileCSS () {
await writeFile(outfile.replace(/\.css$/, '.min.css'), minifiedResult.css)
console.info(
chalk.green('✓ Minified Bundle CSS:'),
chalk.magenta(path.relative(cwd, outfile).replace(/\.css$/, '.min.css'))
chalk.magenta(path.relative(cwd, outfile).replace(/\.css$/, '.min.css')),
)
}
/* eslint-enable no-await-in-loop */
}

compileCSS().then(() => {
Expand Down
4 changes: 2 additions & 2 deletions bin/build-lib.js
Expand Up @@ -34,7 +34,7 @@ async function buildLib () {
const metaMtime = Math.max(...metaMtimes)

const files = await glob(SOURCE)
/* eslint-disable no-await-in-loop, no-continue */
/* eslint-disable no-continue */
for (const file of files) {
if (IGNORE.test(file)) {
continue
Expand All @@ -60,7 +60,7 @@ async function buildLib () {
])
console.log(chalk.green('Compiled lib:'), chalk.magenta(libFile))
}
/* eslint-enable no-await-in-loop, no-continue */
/* eslint-enable no-continue */
}

console.log('Using Babel version:', require('@babel/core/package.json').version)
Expand Down

0 comments on commit 697171b

Please sign in to comment.