fix: Move jest-environment-jsdom from dependencies to devDependencies#315
Open
grahammatt wants to merge 1 commit intoamazon-connect:masterfrom
Open
Conversation
…from dependencies to devDependencies Move jest-environment-jsdom from dependencies to devDependencies (amazon-connect#314) jest-environment-jsdom is a test-only package and should not be included in production dependencies. Its presence in dependencies causes consumers to install it (and its transitive dependency @tootallnate/once, which has a known security vulnerability) unnecessarily. The package-lock.json version field also updates from 4.0.0 to 5.0.0 to match package.json, which was already at 5.0.0 on master.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #314
Issue
As reported in #314 by @Gabe-Ambrosio,
jest-environment-jsdomis listed underdependenciesinpackage.jsonbut is only used as a Jest test environment (via the"testEnvironment": "jsdom"config). This causes consumers of the package to unnecessarily installjest-environment-jsdomand its full transitive dependency tree — including@tootallnate/once, which has a known security vulnerability.Changes
jest-environment-jsdomfromdependenciesjest-environment-jsdomtodevDependenciespackage-lock.jsonNo source code, tests, or configuration were changed.
Testing
npm install— clean install with no errorsnpx jest— all 279 tests pass across 17 test suitesnpm install amazon-connect-chatjsNote on
package-lock.jsondiffThe lockfile diff also shows the top-level
versionfield changing from4.0.0to5.0.0. This is not a version bump —package.jsonalready has"version": "5.0.0"onmaster(as released in v5.0.0, commit 667598e). The lockfile was not regenerated during the v5.0.0 release, sonpm installcorrected the drift.Notes
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.