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

Add package-lock.json back #875

Closed
xianshenglu opened this issue Oct 20, 2023 · 3 comments
Closed

Add package-lock.json back #875

xianshenglu opened this issue Oct 20, 2023 · 3 comments

Comments

@xianshenglu
Copy link

xianshenglu commented Oct 20, 2023

Hi, thanks for your great work.

I cloned v7.1.4 yesterday, but it couldn't work with npm i

It takes me half a day to fix it like your fix in v7.1.5.

The root cause is the different versions of @appium/types exist after npm i. The dependencies I got are different from those in the v7.1.4 ci.

So, I'm proposing to add package-lock.json back to avoid similar issues in the future. Because it could also happen for other libs.

In this way, we can ensure if the released version passes ci, then it should also work after other developers clone it to the local.

What do you think?

@KazuCocoa
Copy link
Member

appium-android-driver is designed to be used as part of https://github.com/appium/appium-uiautomator2-driver and https://github.com/appium/appium-espresso-driver , so the dependency lock as a appium driver is expected to be done by each driver itself, not by the dependencies like this library basically.

Each driver includes shrinkwrap in the release package as https://github.com/appium/appium-espresso-driver/blob/master/.github/workflows/publish.js.yml#L33 so published packages via npm has such dependencies lock.

kazu@laptop appium-uiautomator2-driver % ls
CHANGELOG.md        LICENSE             README.md           build               index.js            lib                 node_modules        npm-shrinkwrap.json package.json        scripts

Do you use this library directly?

@xianshenglu
Copy link
Author

xianshenglu commented Oct 25, 2023

appium-android-driver is designed to be used as part of https://github.com/appium/appium-uiautomator2-driver and https://github.com/appium/appium-espresso-driver , so the dependency lock as a appium driver is expected to be done by each driver itself, not by the dependencies like this library basically.

Each driver includes shrinkwrap in the release package as https://github.com/appium/appium-espresso-driver/blob/master/.github/workflows/publish.js.yml#L33 so published packages via npm has such dependencies lock.

kazu@laptop appium-uiautomator2-driver % ls
CHANGELOG.md        LICENSE             README.md           build               index.js            lib                 node_modules        npm-shrinkwrap.json package.json        scripts

Do you use this library directly?

Yes, use it directly.

According to your comment, the project will possibly meet another CI failure?

I think adding dependencies lock in this project doesn't conflict with high-level project?

@KazuCocoa
Copy link
Member

possibly, but as our base policy to manage dependencies is to not add unnecessary lock files in umbrella projects to not handle dependencies bot etc. If Appium needs to specify a specific version, we usually set the version only in package.json instead of ^ as umbrella projects. So ^ in package.json mean as our umbrella project, any version that satisfies with the conditon is ok. The parent project such as uia2 driver manages dependencies in the release for the npm package.

If you'd like to manage dependencies (that is umbrella one as Appium), I'd recommend you to add npm-shrinkwrap.json or package-lock in your project to lock dependencies for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants