{"id":17398437,"url":"https://github.com/vweevers/vsource","last_synced_at":"2026-05-06T20:35:26.473Z","repository":{"id":40574637,"uuid":"319140358","full_name":"vweevers/vsource","owner":"vweevers","description":"Add messages to a vfile bound to a plugin source.","archived":false,"fork":false,"pushed_at":"2025-12-01T19:36:25.000Z","size":13,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-04T09:47:00.062Z","etag":null,"topics":["javascript","lint","nodejs","npm-package","vfile"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vweevers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-06T21:59:46.000Z","updated_at":"2025-12-01T19:36:21.000Z","dependencies_parsed_at":"2024-10-23T03:24:55.247Z","dependency_job_id":null,"html_url":"https://github.com/vweevers/vsource","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vweevers/vsource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fvsource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fvsource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fvsource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fvsource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vweevers","download_url":"https://codeload.github.com/vweevers/vsource/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fvsource/sbom","scorecard":{"id":1240228,"data":{"date":"2025-11-24","repo":{"name":"github.com/vweevers/vsource","commit":"1e41a0941dc878ba53c2e2cea445b69994904f71"},"scorecard":{"version":"v5.4.1-0.20251125161513-488797dbe611","commit":"488797dbe611ab7e16f12d88185cde5e8dc28aca"},"score":3.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/vweevers/vsource/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/vweevers/vsource/test.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/test.yml:19","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#sast"}}]},"last_synced_at":"2025-12-06T03:56:46.207Z","repository_id":40574637,"created_at":"2025-12-06T03:56:46.207Z","updated_at":"2025-12-06T03:56:46.207Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32711440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T19:35:05.142Z","status":"ssl_error","status_checked_at":"2026-05-06T19:35:03.996Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","lint","nodejs","npm-package","vfile"],"created_at":"2024-10-16T14:56:27.144Z","updated_at":"2026-05-06T20:35:26.454Z","avatar_url":"https://github.com/vweevers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vsource\n\n**Add [messages](https://github.com/vfile/vfile-message) to a [vfile](https://github.com/vfile/vfile) bound to a plugin source.**\n\n[![npm status](http://img.shields.io/npm/v/vsource.svg)](https://www.npmjs.org/package/vsource)\n[![node](https://img.shields.io/node/v/vsource.svg)](https://www.npmjs.org/package/vsource)\n![Test](https://github.com/vweevers/vsource/workflows/Test/badge.svg?branch=main)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Usage\n\n```js\nconst vsource = require('vsource')\nconst vfile = require('vfile')\n\nconst file = vfile({ path: 'package.json' })\nconst s = vsource('my-lint-plugin', file)\n\n// Add error message to file\ns.fail('Name must be lowercase', pos, 'lowercase-name')\n```\n\nWhich is just a convenient shortcut for:\n\n```js\nfile.fail('Name must be lowercase', pos, 'my-lint-plugin:lowercase-name')\n```\n\nIn addition, `fail()` can be called multiple times to collect more than one error, unlike [`VFile#fail()`](https://github.com/vfile/vfile#vfilefailreason-position-origin) which immediately terminates the process. I'm taking a slightly different approach to linting (than [`remark-lint`](https://github.com/remarkjs/remark-lint) et al): both error and warning messages are lint failures, but warnings can be ignored by the user. This behavior is closer to the [`standard`](https://github.com/standard/standard) linter. While `remark-lint` normally only produces warning messages, reserving error messages for unexpected exceptions.\n\n## API\n\n### `s = vsource(source[, file])`\n\nIf a `file` argument is provided, it does not have to be passed into the below methods.\n\n### `message = s.fail([file, ]reason, position, ruleId)`\n\nAdd error message to `file`, similar to `VFile#fail()`. Sets [`message.fatal`](https://github.com/vfile/vfile-message#fatal) to `true`.\n\n### `message = s.warn([file, ]reason, position, ruleId)`\n\nAdd warning message to `file`, same as `VFile#message()`. Sets `message.fatal` to `false`.\n\n### `message = s.info([file, ]reason, position, ruleId)`\n\nAdd info message to `file`, same as `VFile#info()`. Sets `message.fatal` to `null`.\n\n## Install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install vsource\n```\n\n## License\n\n[MIT](LICENSE) © Vincent Weevers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fvsource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvweevers%2Fvsource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fvsource/lists"}