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
@uppy/companion: don't pin Yarn version in package.json
#3347
Conversation
The Dockerfile tries to build Companion standalone using some trickery that is very much tied to npm logic, Yarn is not the fittest tool here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this trickery you're referring to? I just tried locally on my machine, and even though I have installed uppy with corepack yarn install
, I was able to run npm run build
successfully and even corepack yarn run build
works for me. I think we should strive for equal environments in development and prod (if we use yarn in dev, we should use yarn in prod too)
uppy/packages/@uppy/companion/Dockerfile Lines 9 to 17 in 8ebae54
|
Is there any error? It’s not obvious to me why that code doesnt work with corepack yarn install but works with npm install |
OK but where's the limit? Should all Uppy devs be forced to use Docker so we can have the same environment as the prod? The Dockerfile is using
Why not use both? I think all Uppy devs have both npm and yarn on their path, so it's not an issue of a different environment, it's simply different tools.
Yarn by default uses PnP instead of If you want this script to use Yarn, you'd need to refactor the Dockerfile so it pulls up the whole monorepo and install all the deps from all the packages (unless you can find a way to ask Yarn to install only a subset of those, not sure). |
I agree that using
Absolutely, i agree that we shouldn't have to run companion in docker or with apk in our dev environment. but I thought that things like using a supported node.js version and the same package manager as production for installing
Drawbacks I see with using two different package managers for node_modules:
I agree we should strive to use PnP as long as it's possible. I know some packages don't support PnP but we haven't hit that issue yet, so it makes more sense to rewrite the dockerfile to support PnP than to turn off PnP.
I think we can use I can see why nobody wants to do the job of rewriting the dockerfile, so maybe we should just merge this and raise a new TODO issue for rewriting it to support yarn. what do you think? |
AFAIU it was already the case, the Dockerfile was not getting the lock file when we were using npm. That doesn't mean we should keep it this way, but at least it's not new with this very PR.
We are currently not using PnP, it's already disabled. If we were,
That's fine by me; maybe I could add a TODO comment to save ourselves from an issue, wdyt? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package.json
| Package | Version | Package | Version | | ----------------- | ------- | ----------------- | ------- | | @uppy/angular | 0.2.7 | @uppy/store-redux | 2.0.3 | | @uppy/audio | 0.2.1 | @uppy/svelte | 1.0.6 | | @uppy/aws-s3 | 2.0.7 | @uppy/vue | 0.4.4 | | @uppy/companion | 3.1.3 | @uppy/xhr-upload | 2.0.7 | | @uppy/core | 2.1.4 | @uppy/robodog | 2.1.5 | | @uppy/dashboard | 2.1.3 | uppy | 2.3.1 | | @uppy/locales | 2.0.5 | | | - meta: update npm deps (Antoine du Hamel / #3352) - @uppy/companion: fix Dockerfile and deploy automation (Mikael Finstad / #3355) - @uppy/companion: don’t pin Yarn version in `package.json` (Antoine du Hamel / #3347) - @uppy/aws-s3,@uppy/core,@uppy/dashboard,@uppy/store-redux,@uppy/xhr-upload: deps: use `nanoid/non-secure` to workaround react-native limitation (Antoine du Hamel / #3350) - @uppy/audio: showRecordingLength option was removed, always clearInterval (Artur Paikin / #3351) - meta: drop `stringify-object` dependency to generate locales (Antoine du Hamel / #3344) - meta: add release automations (Antoine du Hamel / #3304)
| Package | Version | Package | Version | | ----------------- | ------- | ----------------- | ------- | | @uppy/angular | 0.2.7 | @uppy/store-redux | 2.0.3 | | @uppy/audio | 0.2.1 | @uppy/svelte | 1.0.6 | | @uppy/aws-s3 | 2.0.7 | @uppy/vue | 0.4.4 | | @uppy/companion | 3.1.3 | @uppy/xhr-upload | 2.0.7 | | @uppy/core | 2.1.4 | @uppy/robodog | 2.1.5 | | @uppy/dashboard | 2.1.3 | uppy | 2.3.1 | | @uppy/locales | 2.0.5 | | | - meta: update npm deps (Antoine du Hamel / transloadit#3352) - @uppy/companion: fix Dockerfile and deploy automation (Mikael Finstad / transloadit#3355) - @uppy/companion: don’t pin Yarn version in `package.json` (Antoine du Hamel / transloadit#3347) - @uppy/aws-s3,@uppy/core,@uppy/dashboard,@uppy/store-redux,@uppy/xhr-upload: deps: use `nanoid/non-secure` to workaround react-native limitation (Antoine du Hamel / transloadit#3350) - @uppy/audio: showRecordingLength option was removed, always clearInterval (Artur Paikin / transloadit#3351) - meta: drop `stringify-object` dependency to generate locales (Antoine du Hamel / transloadit#3344) - meta: add release automations (Antoine du Hamel / transloadit#3304)
The Dockerfile tries to build Companion standalone using some
trickery that is very much tied to npm logic, Yarn is not the fittest
tool here.