Commit graph

283 commits

Author SHA1 Message Date
Ifedapo .A. Olarewaju
375b09fe2c
chores: catch custom version suffices (alpha, beta etc.) (#2311) 2020-06-08 15:11:32 +01:00
Renée Kooi
c06196ae68
website: fix the mixed content emails from netlify 2020-05-25 13:17:08 +02:00
Artur Paikin
908598c5d8
Fix build locales (#2221)
* add empty userAgent

//cc @MikeKovarik

* remove unused locale strings

* remove i18n from aws-s3 — it was unused?

/cc @goto-bus-stop
2020-04-23 11:54:07 +02:00
Renée Kooi
9513d1c0b1
Some Windows support (#2211)
* build: explicitly use `sh` for shell scripts

* build: fix css path check on windows

* build: use NODE_PATH instead of symlink for local package resolution in e2e tests

* build: actually with new lerna we do not need NODE_PATH

* build: sh → bash
2020-04-22 09:56:34 +02:00
Ifedapo .A. Olarewaju
a925881995
build: abort release script when there are uncomitted git changes (#2155) 2020-03-26 18:34:02 +01:00
Renée Kooi
fe81bc5ab0
Fix locale pack test output (#2153)
This was broken by #2077. Instead of the keys and values that were
missing, it was printing things like:

```
de_DE locale has missing string: '91' that is present in en_US with value: 'exceedsSize'
```

Which is not super helpful.
2020-03-25 14:11:41 +01:00
Renée Kooi
5e25b2a939
Fix translations that did not respect word order (#2077)
* Fix translations that did not respect word order

Fixes #2069

We were still using raw string concatenation in these two places. To
maintain backwards compatibility, this commit adds _new_ translations
that are substitution-based instead of concatenation-based. The old
translation is passed in as a possible substitution parameter
`backwardsCompat`, and the default (English) translations use this
parameter.

With this, if you are using a custom locale that overrides eg. the
`exceedsSize` string, Uppy will first get your `exceedsSize`
translation, and then use the default `exceedsSize2` translation which
concatenates that result and the file size. So it works the same as it
did in the past.
If a translation requires a different word order, it can override the
`exceedsSize2` translation instead.
```js
new Uppy({
  locale: {
    strings: {
      exceedsSize2: 'Maximum file size of %{size} exceeded',
      poweredBy2: '%{uppy} made this!'
    }
  }
})
```

In 2.0, we can remove all the old strings and only use `poweredBy2` (and
probably rename them to `poweredBy` too, heh)

* website: add missing dashboard strings to docs

* locales: remove unused second plural form from EN and NL

* build: allow different numbers of plural forms

* utils: add test for new throwing behaviour

* docs: insert PR url

* locales: revert ko_KR changes

* changelog: add 2.0 backlog entry

* locales: var → const

* docs: add brief note that translators should supply a pluralize function

* locales: update en_US with new template

* fix HEIGHT_MD = 400

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2020-03-19 14:41:14 +01:00
Renée Kooi
eedc1187af
CI refactor: shaving yaks (#2137)
* ci: name builds, split build scripts

* ci: try out separate build and CDN release jobs

* Release (but not really)

* ci: use separate build and CDN release jobs

* ci: can we put deploy config under a `jobs` key?

* ci: test if deploys work

* ci: revert deploy no-oping, activate deploys on `master` branch
2020-03-17 10:46:28 +01:00
Artur Paikin
17578e83dc
build: contributors:save fix — the node.js version (#2078)
* Create update-contributors.js

* move `## Contributors` out of `<!--contributors-->`

* use execa

* Update bin/update-contributors.js

Co-Authored-By: Renée Kooi <renee@kooi.me>

* yes, it’s not pretty, but it works?

* switch to execa again: showLogin --> showlogin

thanks @goto-bus-stop

Co-authored-by: Renée Kooi <renee@kooi.me>
2020-02-18 15:36:14 +01:00
Renée Kooi
be66c47deb
Actually check types (#1918)
* types: stronger typings

* Remove remaining `declare module` things for uppy.use

* Format types standard-style-like

* Add `target` properties to plugin typings

* Add type for `replaceTargetContent` option

* xhr-upload: allow lowercase method

* opt in to stricter typechecks

* use the strictly typed version in all typings tests

* endtoend: use strict types in typescript test

* Add some comments to the typings file so IDEs will warn about untyped use()

* informer: remove obsolete option from typings

* react: generate prop types based on actual options types

* react: update types

* react: fix import in typings test

* companion-client: add `pluginId` property to ProviderOptions type

Co-Authored-By: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>

* core: remove some `any` types

* *: add locale string types

* *: generate locale typings

* core: fix LocaleStrings<> type

* dashboard: add locale string type tests

* tus: inherit options typings from tus-js-client

* transloadit: add missing options types

* ci: do the required build steps before testing typings

* Support TokenStorage in types, add `title?: string` options

* form: update typings

* types: put TokenStorage type in dependents

* Document Uppy.StrictTypes

* if we pin at least we should use the latest

* Allow document.querySelector

I think it's a eslint-plugin-compat bug that it's marking querySelector
as not available in Android Chrome 78.

Co-authored-by: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>
2020-02-12 16:22:09 +01:00
Kevin van Zonneveld
b7bdce7363
Upload downloadable zip archive of releases to CDN (#2052)
* Fix jsdoc warnings

* Upload downloadable zip archive of releases to CDN

* var -> const

* Only upload .zip for the main uppy package

* Implement @goto-bus-stop's feedback
2020-02-05 13:49:47 +01:00
Renée Kooi
7b2283d8ef
examples: add npm run example script
a bad result from adding the examples as dependencies of the root
repository is that they now don't have access to the npm binaries they
need to run in their own folder, because they are installed into the
root repository instead.

this works around that issue.

we may need to consider undoing that change and making the examples work
as standalone projects again, that's easier to understand.

fixes #2024 for now.
2020-01-15 11:16:56 +01:00
Renée Kooi
f2a0c32aa0
build: i guess --npm-client is no longer a thing? 2019-12-11 14:43:57 +01:00
Renée Kooi
5d906440c2 locales: Rename es_GL → gl_ES (#1929)
* locales: Rename es_GL → gl_ES

the `es-GL` locale means Spanish in Greenland.
`gl-ES` means Galician in Spain.

I just renamed the file here which is a breaking change. I think that's
acceptable for the locales package, as it isn't a dependency of anything
else. `@uppy/locales@2.0` doesn't affect anything. what do y'all think?

* locales: add backwords compat module for es_GL

* add comment with reasoning
2019-11-08 18:31:05 +03:00
Renée Kooi
b501b7fce2
Let lerna ask for OTP 2019-10-14 16:37:13 +02:00
Renée Kooi
733de659da
Upgrade standard to v14 (#1860)
* Update eslint dependencies.

* standard --fix

* build: disable handler name lint rule

* status-bar: manually fix lint errors

* webcam: manually fix lint errors

* url: manually fix lint errors

* react-native: manually fix lint errors

* dashboard: manually fix lint errors

* informer: manually fix linting errors

* progress-bar: manually fix lint errors

* provider-views: manually fix lint errors

* redux-dev-tools: manually fix lint errors

* build: disable buggy no-unused-vars rule

* examples: manually fix lint errors

* ` quotes for code things, ' for text things
2019-10-09 14:53:02 +02:00
Renée Kooi
bb8b66d918
Use more cancellation-friendly strategy for limit: N uploads (#1736)
* xhr-upload: redo limit option using different strategy

* xhr-upload: fix marking requests as done

* Move duplicate createEventTracker definitions to @uppy/utils

* tus: new cancellation for local uploads

* tus: fix cancelling queued uploads

* tus: fix wrong name

* aws-s3-multipart: smol refactor

* aws-s3-multipart: new cancellation style

* aws-s3: new cancellation

* utils: port limitPromises test to RateLimitedQueue

* timing fix?

* tus: new cancellation on websocket

* xhr-upload: implement cancellation for remote uploads

* aws-s3-multipart: port to new cancellation

* utils: remove limitPromises

* xhr-upload: remove pause/resume code

* xhr-upload: clean up event listeners

* xhr-upload: extract progress timer to separate class

* Move ProgressTimeout class to utils

* utils: update typings

* Fix lint

* tus: make pause/resume respect the rate limiting queue

* tus: try to explain some of the tricky things at play in the Tus#upload method

* aws-s3-multipart: add missing { abort: true }

* aws-s3-multipart: make pause/resume respect the rate limiting queue

* eslintrc.json - fixed eslint warnings for jsdoc

* Revert "eslintrc.json - fixed eslint warnings for jsdoc"

This reverts commit 50b24773ce.

* eslintrc.json - allow indentation in jsdoc comments

* xhr-upload: fix promise return value

* tus: fix promise return value

* tus: add missing `return () => {}`

* utils: typing export type fixes

* tus: add more jsdoc

* companion-client: add missing SocketOptions type

* utils: fix more export typings

* core,companion-client,tus: more typings tweaking

* companion-client: test fix 😩

* companion-client: add type for Socket#open

* tus: fix emit() call

* add local cancellation fuzz....ish? test
2019-09-25 15:21:17 +02:00
Renée Kooi
c62ec3665d Update eslint to v6 (#1777)
* Update eslint

* Do eslint --fix

* Do not access Object.prototype method 'hasOwnProperty' from target object

* utils: add hasProperty

* eslint --fix

* Disable quote-props for locale files

* add back quotes in locale files

* revert locale files to state on master

* Update react-scripts
2019-08-13 21:45:30 +03:00
Renée Kooi
f40605548e
ci: post-merge tweaks 2019-07-19 12:31:15 +02:00
Renée Kooi
10bc79574e
lerna link convert (#1730)
* lerna link convert

* ci: use npm ci

* update lockfile

* companion: set `bin` to source file

Since typescript doesn't actually transform anything, we can just use
this.

In a next major version we could set `noEmit: true` in the tsconfig and
stop publishing `lib`.

* companion: do chmod +x on start-server.js

* build: remove obsolete lerna config

* build: explicitly install latest versions when building e2e tests for ci

* Remove versions from private packages

* fix regex

* try fix

* ci: force npm to install to endtoend folder

* ci: fold up e2e build output

* Update netlify deploy preview command

* Remove mentions of npm run bootstrap

* Edit .github/CONTRIBUTING.md instead

* companion: add proxy executable

* companion: fix publish

* Downgrade jest to appease create-react-app
2019-07-19 12:16:36 +02:00
Renée Kooi
5d24dfcc78
ci: deploy tweak #3465242374 2019-07-15 12:12:50 +02:00
Uppy Bot
547364d295
ci: do the env var checks for deploys inside their scripts 2019-07-15 11:54:46 +02:00
Evgenia Karunus
70acbf7861 Adjust i18n (#1712)
* @uppy/locales - updated Nl translation as per Kevin

* @uppy/provider-views - moved all translations to Core, removed dependency on Dashboard

* @uppy/locales - added missing translations for 'Add more'
2019-07-12 18:04:42 +02:00
Renée Kooi
54c347dfb7
ci: use a fancy matrix (#1709)
* ci: try a fancy matrix

* ci: separate lint build

* build: update some dependencies for node 12 compat

* ci: do typing checks as part of LINT run

* ci: conditionally run ACCEPTANCE and WEBSITE jobs

* ci: is sauce checking domain names or what?

* ci: only build the website when we actually deploy it

* Revert "ci: is sauce checking domain names or what?"

This reverts commit a29fc7ecf9.

* ci: i might have misinterpreted this config?

* ci: rename acceptance → endtoend for consistency

* test: may need to update element reference after click?

* ci: try to only use sauce connect for endtoend runs

* ci: fix sauce_connect property name

* ci: comment the travis config a bit [skip ci]
2019-07-09 11:22:49 +02:00
Renée Kooi
0a40f2c444
Update webdriverio to v5 (#1675)
* build: update webdriverio to v5

* build: update wdio services config syntax

* e2e test updates for wdio 5

* Sync pinned versions between repo root and companion

* build: enable all e2e tests for this PR run

* waitForExist

* test: await browser.url() calls

* test: awaitify url-plugin test

* test: use sauceConnect

* test: upload files to sauce before using them

* fall back to fakechoosefile a lot?

* fall back to fakechoosefile more

* Disable file selection on saucelabs

* test: need to await this thing

* test: make more-sure that the input is visible

* test: use currently low load transloadit region so i dont have to wait

* test: update but disable xhr-limit

* test: change the order

* test: newer firefoxes

* test: change the order back

* kinda sucks that they only have super old browsers on linux

* ci: disable url-plugin and transloadit e2e tests again

* test: use local tus-node-server for integration tests

* test: use envify to check env variables and select appropriate URL

* test: use companion.test:1080 for tus uploads on Travis

* test: fix env vars in typescript and CRA tests

* test: use getBoundingClientRect, may work better in android

* test: try getSize AND getBoundingClientRect

* test: do not check image width in android

* test: allow retrying tests that are prone to flakiness

* test: be more verbose during e2e tests

* test: force <input> visibility in more tests

* test: warn if using test:endtoend not on CI
2019-07-05 13:45:43 +02:00
Kevin van Zonneveld
5d55580868 Update bin/upload-to-cdn.js 2019-06-12 11:09:29 +02:00
Renée Kooi
dabc10b3bd
Fix uploadcdn for local build 2019-06-07 14:52:36 +02:00
Renée Kooi
a9a563169d
Fix mime types on CDN (#1636)
* Fix mime types on CDN

The mime-types library is already in use by companion, hence no lockfile
update

* fix region and bucket

* add --force to overwrite existing release

* Fix for doing --force without a specific version
2019-06-05 20:04:10 +02:00
Renée Kooi
9eb274cfbd
Merge branch 'master' into fix/uploadcdn 2019-06-05 16:21:14 +02:00
Renée Kooi
a07d81c5ef
add events.once 2019-05-29 10:52:00 +02:00
Renée Kooi
42bb2c754f
Add LOCAL=1 env var for npm run release 2019-05-29 10:20:17 +02:00
Renée Kooi
c17e992485
Fix discify script now that we have .json files in build 2019-05-27 16:53:47 +02:00
Renée Kooi
baf7ce114a
Really check for release commit 2019-05-27 16:53:47 +02:00
Renée Kooi
2c8173a563
Ensure everything is rebuilt after version bump 2019-05-27 16:53:47 +02:00
Renée Kooi
685cca283c
Update after-version-bump description 2019-05-27 16:53:47 +02:00
Renée Kooi
999253f034
Account for gitignores when running git add 2019-05-27 16:53:32 +02:00
Renée Kooi
bc6da2a637
Run build after version bump 2019-05-27 16:53:27 +02:00
Renée Kooi
27da43a8c9
Convert sync-version-numbers to Node.js script 2019-05-27 16:38:50 +02:00
Renée Kooi
98ec8ebdba
Merge branch 'master' into fix/uploadcdn 2019-05-27 12:13:47 +02:00
Renée Kooi
fdad0d4e80
uploadcdn: remove old script 2019-05-27 12:10:38 +02:00
Renée Kooi
d3e7bc3181
uploadcdn: check for existing tag 2019-05-27 12:10:22 +02:00
Kevin van Zonneveld
4eb62eb787
Fix typo 2019-05-22 16:36:36 +02:00
Renée Kooi
ee1d9e7928
uploadcdn: update comments 2019-05-22 16:23:37 +02:00
Renée Kooi
722c31262d
Switch to Node.js uploadcdn script 2019-05-22 12:21:39 +02:00
Renée Kooi
1abebd7506
do the upload-to-cdn.js thing 2019-05-20 15:35:43 +02:00
Renée Kooi
2c435a0ab5
test2 2019-05-20 14:35:40 +02:00
Renée Kooi
aced95aad2
Upgrade Babel to v7 and Jest to 24 2019-05-20 11:27:00 +02:00
Artur Paikin
3b154608dd disable upload-to-cdn and sync-version-numbers until the fix
until upload-to-cdn is refactored to publish multiple packages
revert when upload-to-cdn is updated

//cc @goto-bus-stop
2019-05-17 17:51:45 +03:00
Renée Kooi
1ad322497f
Release 2019-05-08 15:27:15 +02:00
Renée Kooi
61329656f2
build: add final manual intervention just before releasing 2019-05-08 15:23:05 +02:00