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

Dev dependency being duplicated #2267

Closed
btaskew opened this issue Jan 29, 2020 · 1 comment · Fixed by #2269
Closed

Dev dependency being duplicated #2267

btaskew opened this issue Jan 29, 2020 · 1 comment · Fixed by #2269

Comments

@btaskew
Copy link

btaskew commented Jan 29, 2020

Have 3 separate test files as part of a single component (spread across 3 files), each test file imports the same, separate Bit component as a dependency: import '@bit/iexeter.tester.test-setup';.

When running bit show for the component, the test dependency is listed 3 times under the Dev Dependencies list:

Bit show

When running bit tag the following appears:

a dependency iexeter.tester/test-setup@0.0.1 is duplicated
This error should have never happened. Please report this issue on Github https://github.com/teambit/bit/issues

bitmap extract for component:

"components/sso-form": {
        "files": [
            {
                "relativePath": "src/components/sso-form/NativeForm.jsx",
                "test": false,
                "name": "NativeForm.jsx"
            },
            {
                "relativePath": "src/components/sso-form/WebForm.jsx",
                "test": false,
                "name": "WebForm.jsx"
            },
            {
                "relativePath": "src/components/sso-form/__tests__/NativeForm.test.js",
                "test": true,
                "name": "NativeForm.test.js"
            },
            {
                "relativePath": "src/components/sso-form/__tests__/SsoForm.test.js",
                "test": true,
                "name": "SsoForm.test.js"
            },
            {
                "relativePath": "src/components/sso-form/__tests__/WebForm.test.js",
                "test": true,
                "name": "WebForm.test.js"
            },
            {
                "relativePath": "src/components/sso-form/index.jsx",
                "test": false,
                "name": "index.jsx"
            }
        ],
        "mainFile": "src/components/sso-form/index.jsx",
        "trackDir": "src/components/sso-form",
        "origin": "AUTHORED",
        "exported": false
    },

Expected Behavior

Dev dependency should only be included once

Steps to Reproduce the Problem

  1. Create component with multiple test files, each including the same Bit component dependency
  2. Build component
  3. Run bit show and view Dev Dependencies

Specifications

  • Bit version: 14.7.2
  • Node version: 12.14.1
  • npm / yarn version: yarn 1.21.1
  • Bit compiler (include version): bit.envs/compilers/react@1.0.13
  • Bit tester (include version): Custom tester built off bit.envs/testers/jest@22.4.3
@GiladShoham
Copy link
Member

@btaskew Thanks for reporting this.
We will check it, and update here soon.

davidfirst added a commit that referenced this issue Jan 29, 2020
davidfirst added a commit that referenced this issue Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants