{"id":16487395,"url":"https://github.com/tjenkinson/rollup-plugin-bundle-guard","last_synced_at":"2026-01-21T18:01:48.631Z","repository":{"id":38960926,"uuid":"222126725","full_name":"tjenkinson/rollup-plugin-bundle-guard","owner":"tjenkinson","description":"A rollup plugin that makes sure you don't accidentally import something statically, which could have an effect on your bundle size.","archived":false,"fork":false,"pushed_at":"2025-07-21T23:13:13.000Z","size":738,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T04:48:44.463Z","etag":null,"topics":["dynamic-import","guard","import","rollup","rollup-plugin","static-import"],"latest_commit_sha":null,"homepage":null,"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/tjenkinson.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}},"created_at":"2019-11-16T16:23:02.000Z","updated_at":"2025-05-06T13:18:07.000Z","dependencies_parsed_at":"2025-06-19T03:49:00.144Z","dependency_job_id":null,"html_url":"https://github.com/tjenkinson/rollup-plugin-bundle-guard","commit_stats":{"total_commits":218,"total_committers":6,"mean_commits":"36.333333333333336","dds":"0.27064220183486243","last_synced_commit":"2ece0521f952a9900cc4a6061e330731eff9eb3a"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/tjenkinson/rollup-plugin-bundle-guard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjenkinson%2Frollup-plugin-bundle-guard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjenkinson%2Frollup-plugin-bundle-guard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjenkinson%2Frollup-plugin-bundle-guard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjenkinson%2Frollup-plugin-bundle-guard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tjenkinson","download_url":"https://codeload.github.com/tjenkinson/rollup-plugin-bundle-guard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjenkinson%2Frollup-plugin-bundle-guard/sbom","scorecard":{"id":888323,"data":{"date":"2025-08-11","repo":{"name":"github.com/tjenkinson/rollup-plugin-bundle-guard","commit":"afe1f676c0102d12e0eb4b272c7a90a76fd38303"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/automerge.yml:1","Warn: no topLevel permission defined: .github/workflows/nodejs.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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/automerge.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/tjenkinson/rollup-plugin-bundle-guard/automerge.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/tjenkinson/rollup-plugin-bundle-guard/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/tjenkinson/rollup-plugin-bundle-guard/nodejs.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   1 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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T10:50:22.304Z","repository_id":38960926,"created_at":"2025-08-24T10:50:22.304Z","updated_at":"2025-08-24T10:50:22.304Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28638492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T17:36:33.271Z","status":"ssl_error","status_checked_at":"2026-01-21T17:36:30.617Z","response_time":86,"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":["dynamic-import","guard","import","rollup","rollup-plugin","static-import"],"created_at":"2024-10-11T13:34:05.773Z","updated_at":"2026-01-21T18:01:48.590Z","avatar_url":"https://github.com/tjenkinson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/rollup-plugin-bundle-guard.svg)](https://badge.fury.io/js/rollup-plugin-bundle-guard)\n\n# rollup-plugin-bundle-guard\n\nA rollup plugin that makes sure you don't accidentally import something statically, which could have an effect on your bundle size.\n\n## How?\n\nTag files you want to be in the same group by adding a comment with the group name.\n\n```js\n// rollup-plugin-bundle-guard: group=entry\n```\n\nIf you attempt to statically import a file that is not in the same group, your build will fail with something like:\n\n```\n\"entry.js\" statically imports \"load-me-dynamically.js\" which is not allowed. Should it be in \"entry\"?\n```\n\nThat's it!\n\n### More Detail\n\nWith strict mode disabled anything that is not assigned a group will default to the group named `default`, and anything is allowed to import something assigned to the `default` group.\n\nEach module can only be assigned to a single group. You can however include additional groups that are allowed to import the module with the following comment:\n\n```js\n// rollup-plugin-bundle-guard: allowedImportFrom=\u003cgroup 1 name\u003e \u003cgroup 2 name\u003e ...\n```\n\nThis makes it possible for separate bundles to statically import shared dependencies.\n\n## Installation\n\n```\nnpm install --save-dev rollup-plugin-bundle-guard\n```\n\n## Usage\n\nrollup.config.js\n\n```js\nconst rollupPluginBundleGuard = require('rollup-plugin-bundle-guard');\n\nexport default {\n  input: 'main.js',\n  plugins: [\n    // default config\n    // rollupPluginBundleGuard(),\n\n    // all the options\n    rollupPluginBundleGuard({\n      // Defaults to `false`. If enabled, all imported modules must be assigned a group.\n      // Otherwise anything without a group is assigned a group named `default`\n      strictMode: false,\n      modules: [\n        // 'react' can be imported from both the `entry` and `default` group\n        { allowedImportFrom: ['entry', 'default'], module: 'react' },\n        // anything that contains the string 'somegroup' will be part of the 'someGroup' group\n        { group: 'someGroup', module: /somegroup/ },\n      ],\n      // optional. The default (below) disables checking comments for anything in 'node_modules'\n      comments: {\n        pathPatterns: [ /node_modules/ ],\n        isWhitelist: false\n      }\n    })\n    // ...\n  ],\n  // ...\n});\n```\n\nmain.js\n\n```js\n// rollup-plugin-bundle-guard: group=entry\n\nimport 'react'; // allowed because `entry` is allowed to import `react`\nimport './a.js'; // allowed because `./a.js` is also in `entry`\nimport './b.js'; // ERROR! not allowed because `./b.js` is not in `entry`\n\nimport('./b.js'); // allowed because it's a dynamic import\n```\n\na.js\n\n```js\n// rollup-plugin-bundle-guard: group=entry\n\nconsole.log('In module a.');\n```\n\nb.js\n\n```js\n// rollup-plugin-bundle-guard: group=group2\n\nimport './c.js'; // ERROR! c is in `default`, not `group2`\n\nconsole.log('In module b.');\n```\n\nc.js\n\n```js\n// in the default group\nimport './d.js';\n\nconsole.log('In module c.');\n```\n\nd.js\n\n```js\n// in the `default` group\nimport 'react'; // allowed because `default` is allowed to import `react`\n\nimport './a.js'; // allowed because in non strict mode `a.js` is allowing imports from `default`\n\nconsole.log('In module d.');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjenkinson%2Frollup-plugin-bundle-guard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftjenkinson%2Frollup-plugin-bundle-guard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjenkinson%2Frollup-plugin-bundle-guard/lists"}