Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

chore(deps): lock file maintenance #678

Merged
merged 11 commits into from
Oct 4, 2021
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 27, 2021

WhiteSource Renovate

This PR contains the following updates:

Update Change
lockFileMaintenance All locks refreshed

🔧 This Pull Request updates lock files to use the latest dependency versions.


Configuration

📅 Schedule: "before 5am on monday" (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@github-actions github-actions bot added the type: chore work needed to keep the product and development running smoothly label Sep 27, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2021

⏱ Benchmark results

largeDepsEsbuild: 13.2s

^  13.2s  
│   ┌──┐  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
└───┴──┴──>
     T    
Legend
  • T (current commit): 13.2s

largeDepsZisi: 1m 7.5s

^ 1m 7.5s 
│   ┌──┐  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
└───┴──┴──>
     T    
Legend
  • T (current commit): 1m 7.5s

@renovate renovate bot force-pushed the renovate/lock-file-maintenance branch 10 times, most recently from 8bd8ba5 to 90133a6 Compare September 29, 2021 17:10
@renovate renovate bot force-pushed the renovate/lock-file-maintenance branch from 90133a6 to 7a59ace Compare September 30, 2021 09:09
@netlify-team-account-1
Copy link
Contributor

@eduardoboucas is it intentional that renovate updates benchmark/fixtures/package-lock.json? Seems like a file that should stay the same 🤔

(not the root cause for CI failing, though)

@eduardoboucas
Copy link
Member

Seems like a file that should stay the same 🤔

I agree. We should probably ignore it here. If you have the chance to address that as part of this, that would be great!

@netlify-team-account-1
Copy link
Contributor

Our package-lock.json uses lockfileVersion: 2, which is only compatible with newer NPM versions. Since newer Node distributions ship a recent NPM version, it's fine for the * target. Node 10.18.0 shipped NPM 6, though, which doesn't fully understand lockfileVersion: 2 and thus fails to require typescript, which was added as a transitive dependency trough this lockfile update. d2c2011 fixes the CI by always using npm@7, even for Node 10.18.0.

@eduardoboucas
Copy link
Member

Our package-lock.json uses lockfileVersion: 2, which is only compatible with newer NPM versions. Since newer Node distributions ship a recent NPM version, it's fine for the * target. Node 10.18.0 shipped NPM 6, though, which doesn't fully understand lockfileVersion: 2 and thus fails to require typescript, which was added as a transitive dependency trough this lockfile update. d2c2011 fixes the CI by always using npm@7, even for Node 10.18.0.

V2 lockfiles are backwards compatible with older npm versions, including npm 6, so why does it fail to require typescript? People using Node 10 will most likely use npm 6, as that's the version that it ships with, so we need to support that flow, otherwise we can't really say the package is compatible with Node 10.

This is the case with our build system when using Xenial, by the way, which uses Node 10 and npm 6 by default.

@netlify-team-account-1
Copy link
Contributor

V2 lockfiles are backwards compatible with older npm versions, including npm 6

Apparently not fully backwards compatible 😅

we need to support that flow

Got it! I'm pretty sure that this failure only concerns our test suite, as the problematic typescript import comes from somewhere inside an eslint package. So it shouldn't become a problem in production - but we should try to keep our test environment as close as possible. So I'll try to find a solution that keeps npm@6.

@netlify-team-account-1
Copy link
Contributor

Interesting! The more I look into this, the more problems with Node v10 arise 😅 @netlify/eslint-config-node has a dependency on eslint-plugin-unicorn, which dropped support for Node v10 in v32. unicorn has since introduced calls to Object.fromEntries, which isn't available under Node v10, and thus makes the CI fail with TypeError: Failed to load plugin 'unicorn' declared in '.eslintrc.js » @netlify/eslint-config-node': Object.fromEntries is not a function.
I'm surprised that this only surfaces with this PR 🤔

@erezrokah
Copy link
Contributor

I'm surprised that this only surfaces with this PR

FYI, we skip linting for Node.js 10

if: "${{ matrix.node-version == '*' }}"

@netlify-team-account-1
Copy link
Contributor

okay, so that's why it only surfaces with this PR ^^ Thanks for pointing that out! :)

I did quite some digging to find out *why* this is needed - but I couldn't find a sensible reason.
And since we're already planning on introducing typescript, I'm fine just installing it here.
@netlify-team-account-1
Copy link
Contributor

I did quite some digging to find out why it requires typescript to be installed, but couldn't find a sensible reason.
And since we're already planning on introducing typescript via #675, I think it's fine to just ignore the reasons for why this is failing, and give it what it wants. It wants typescript.

as pointed out by @eduardoboucas, typescript is required during *runtime*
of ZISI, not only during testing. So we should put it as a prod dependency.
@netlify-team-account-1
Copy link
Contributor

@eduardoboucas I think this is ready to merge, could you do a final review?

@eduardoboucas
Copy link
Member

I did quite some digging to find out why it requires typescript to be installed, but couldn't find a sensible reason. And since we're already planning on introducing typescript via #675, I think it's fine to just ignore the reasons for why this is failing, and give it what it wants. It wants typescript.

After db3f8d9, we're adding typescript to dependencies, whereas #675 only needs it in devDependencies. We should probably create an issue to reevaluate whether we still need it in dependencies after we get rid of precinct. What do you think?

@netlify-team-account-1
Copy link
Contributor

typescript is currently a transitive prod dependency of precinct, so there's no need for it once we get rid of precinct. We can open an issue to get rid of precinct, and mention this PR in there.

@eduardoboucas
Copy link
Member

typescript is currently a transitive prod dependency of precinct, so there's no need for it once we get rid of precinct.

That's what I mean. And there's no reason to open an issue to get rid of precinct, because that's already in motion (see #659). We just need to roll it out fully (it's behind a feature flag).

@kodiakhq
Copy link
Contributor

kodiakhq bot commented Oct 4, 2021

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

@eduardoboucas
Copy link
Member

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

Where did this come from? 🤨 I've only merged #695, which doesn't touch the lock file.

@netlify-team-account-1
Copy link
Contributor

I merged some of the other renovate PRs, maybe that's why.

@kodiakhq kodiakhq bot merged commit e77ff29 into main Oct 4, 2021
@kodiakhq kodiakhq bot deleted the renovate/lock-file-maintenance branch October 4, 2021 10:17
Skn0tt pushed a commit to netlify/build that referenced this pull request May 21, 2024
* chore(deps): lock file maintenance

* chore: exclude benchmarks/fixtures from Renovate

see renovate docs: https://docs.renovatebot.com/configuration-options/#ignorepaths

* debug what's happening

* chore: check if using npm7 fixes the issue

* Update workflow.yml

* chore: install typescript

I did quite some digging to find out *why* this is needed - but I couldn't find a sensible reason.
And since we're already planning on introducing typescript, I'm fine just installing it here.

* Update workflow.yml

* chore: move typescript to prod deps

as pointed out by @eduardoboucas, typescript is required during *runtime*
of ZISI, not only during testing. So we should put it as a prod dependency.

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Netlify Team Account 1 <90322326+netlify-team-account-1@users.noreply.github.com>
Co-authored-by: Netlify Team Account 1 <netlify-team-account-1@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants