Skip to content

Switch node-keytar into optional dependency #786

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

Closed
felipecrs opened this issue Nov 17, 2022 · 2 comments · Fixed by #795
Closed

Switch node-keytar into optional dependency #786

felipecrs opened this issue Nov 17, 2022 · 2 comments · Fixed by #795
Assignees

Comments

@felipecrs
Copy link
Contributor

felipecrs commented Nov 17, 2022

As far as I know, node-keytar is only used for authentication when NOT using the VSCE_PAT, therefore it is an optional dependency, which is a potential fix for:

References

https://docs.npmjs.com/cli/v9/configuring-npm/package-json#optionaldependencies

felipecrs added a commit to vscode-shellcheck/vscode-shellcheck that referenced this issue Nov 17, 2022
felipecrs added a commit to vscode-shellcheck/vscode-shellcheck that referenced this issue Nov 17, 2022
@joaomoreno joaomoreno self-assigned this Nov 17, 2022
@joaomoreno joaomoreno added the feature-request Request for new features or functionality label Nov 17, 2022
@felipecrs
Copy link
Contributor Author

felipecrs commented Dec 5, 2022

@joaomoreno I took a look at the source code, and it seems that keytar is already treated as being optional (i.e, code will automatically fallback to the file store if keytar doesn't open). All that is left is to:

"dependencies": {
	"azure-devops-node-api": "^11.0.1",
	"chalk": "^2.4.2",
	"cheerio": "^1.0.0-rc.9",
	"commander": "^6.1.0",
	"glob": "^7.0.6",
	"hosted-git-info": "^4.0.2",
-       "keytar": "^7.7.0"
	"leven": "^3.1.0",
	"markdown-it": "^12.3.2",
	"mime": "^1.3.4",
	"minimatch": "^3.0.3",
	"parse-semver": "^1.1.1",
	"read": "^1.0.7",
	"semver": "^5.1.0",
	"tmp": "^0.2.1",
	"typed-rest-client": "^1.8.4",
	"url-join": "^4.0.1",
	"xml2js": "^0.4.23",
	"yauzl": "^2.3.1",
	"yazl": "^2.2.2"
},
+ "optionalDependencies": {
+ 	"keytar": "^7.7.0"
+ },

@joaomoreno joaomoreno added engineering and removed feature-request Request for new features or functionality labels Dec 7, 2022
@joaomoreno joaomoreno added this to the December 2022 milestone Dec 7, 2022
joaomoreno added a commit that referenced this issue Dec 7, 2022
joaomoreno added a commit that referenced this issue Dec 7, 2022
@felipecrs
Copy link
Contributor Author

Thanks a lot!

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.

2 participants