Last active
June 14, 2024 16:18
-
-
Save mcknasty/1d666798cf45232e115439203ddedf97 to your computer and use it in GitHub Desktop.
This file contains 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
> git checkout 6ff250fa443807ed4ee179d1b2364643d8b46f63; | |
Note: switching to '6ff250fa443807ed4ee179d1b2364643d8b46f63'. | |
You are in 'detached HEAD' state. You can look around, make experimental | |
changes and commit them, and you can discard any commits you make in this | |
state without impacting any branches by switching back to a branch. | |
If you want to create a new branch to retain commits you create, you may | |
do so (now or later) by using -c with the switch command. Example: | |
git switch -c <new-branch-name> | |
Or undo this operation with: | |
git switch - | |
Turn off this advice by setting config variable advice.detachedHead to false | |
HEAD is now at 6ff250f Additional Configuration File Support (#436) | |
> git status; | |
HEAD detached at 6ff250f | |
nothing to commit, working tree clean | |
> git log -n 1 | grep commit; | |
commit 6ff250fa443807ed4ee179d1b2364643d8b46f63 | |
> cat package.json | sed -E 's@^ *"js-yaml.*",$@ @g' | sed -z 's/ \n//g' > tmp.json; | |
> rm package.json && mv tmp.json package.json; | |
> git diff; | |
diff --git a/package.json b/package.json | |
index 3fd76a5..e9f960a 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -41,7 +41,6 @@ | |
"istanbul-lib-report": "^3.0.1", | |
"istanbul-reports": "^3.1.6", | |
"test-exclude": "^7.0.1", | |
- "js-yaml": "^4.1.0", | |
"v8-to-istanbul": "^9.0.0", | |
"yargs": "^17.7.2", | |
"yargs-parser": "^21.1.1" | |
> rm -rdf node_modules; | |
> npm install --no-progress; | |
added 413 packages, and audited 414 packages in 9s | |
107 packages are looking for funding | |
run `npm fund` for details | |
found 0 vulnerabilities | |
> find node_modules -name js-yaml; | |
node_modules/js-yaml | |
node_modules/.bin/js-yaml | |
node_modules/eslint/node_modules/js-yaml | |
node_modules/eslint/node_modules/js-yaml/lib/js-yaml | |
node_modules/eslint/node_modules/.bin/js-yaml | |
node_modules/@eslint/eslintrc/node_modules/js-yaml | |
node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/js-yaml | |
node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml | |
> cat package.json | grep 'js-yaml'; | |
> npm run test > log.txt; | |
cat log.txt | grep yml; | |
should be able to read config files with .json, .yml, .yaml, .js, .cjs extensions | |
✔ should be able to resolve config file .c8rc.yml with --config flag | |
- should be able to resolve config file .c8rc.yml by detection | |
✔ should be able to resolve config file .nycrc.yml with --config flag | |
- should be able to resolve config file .nycrc.yml by detection | |
> cat log.txt | grep yaml; | |
should be able to read config files with .json, .yml, .yaml, .js, .cjs extensions | |
✔ should be able to resolve config file .c8rc.yaml with --config flag | |
- should be able to resolve config file .c8rc.yaml by detection | |
✔ should be able to resolve config file .nycrc.yaml with --config flag | |
- should be able to resolve config file .nycrc.yaml by detection | |
> cat log.txt | grep -C 2 passing; | |
134 passing (1m) | |
17 pending | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist is to display what happens if we remove the dev-dependency
js-yaml
. The results is that the unit tests dependent onjs-yaml
still pass. This is becausejs-yaml
is a dependency ofeslint
,eslint
is a dependency ofstandard
, andstandard
is a dev-dependency ofc8
.To show visually:
--> symbolized dependency (dev or otherwise)
c8 --> standard -> eslint --> js-yaml
Unit Test Legend: The ✔ are passing tests and the - are skipped or pending tests