testing-library / testing-library/dom-testing-library

Add a package-lock.json or yarn.lock

Open
#1,353 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
3.3k
Forks
474
PR merge metrics
No merged PRs in 30d

Description

Hello :)

It's me again.

What happened:

When I tried to make a reproduction test in this repository, I encounter some difficulties with the dependencies because there is not lock files. Moreover, because there are some libraries overrides this is buggy.

Reproduction:

Follow CONTRIBUTING.md, i.e. :

  • Clone the repo
  • npm run setup -s

See the error with browserslist.

Problem description:

Because there is no lock files, the latest libraries are fetched. Unfortunately babel made some change on their @babel/helper-compilation-targets that pull the latest browserslist package which expose a new findConfigFile (which is not exposed in the override version)

In the issue https://github.com/testing-library/dom-testing-library/issues/1352 I had to do this to make the test reproduction works:

package.json Overrides

https://github.com/romain-trotard/dom-testing-library/blob/labelledby-multiple-repro/package.json#L83

Suggested solution:

I know that Kent is not fond of pushing lock files https://github.com/kentcdodds/kcd-scripts/issues/22#issuecomment-355061803.

But I wonder why it would be a problem to do it.

I think pushing it, would help a lot on the reproducibility.

Thanks in advance :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CONTRIBUTING.md and run npm run setup -s to reproduce the browserslist dependency error. Inspect package.json, including its overrides, and determine whether a package-lock.json or yarn.lock fits the repository's workflow. Done means the dependency versions are locked and setup completes reproducibly without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.