{"id":18862792,"url":"https://github.com/eik-lib/esbuild-plugin","last_synced_at":"2026-02-09T08:07:03.447Z","repository":{"id":37879717,"uuid":"314664743","full_name":"eik-lib/esbuild-plugin","owner":"eik-lib","description":"esbuild plugin to do build-time import mapping using Eik","archived":false,"fork":false,"pushed_at":"2026-02-05T12:31:44.000Z","size":674,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-06T00:02:33.538Z","etag":null,"topics":["eik","eik-import-mapping","esbuild","esbuild-plugin"],"latest_commit_sha":null,"homepage":"https://eik.dev","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/eik-lib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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-11-20T20:42:06.000Z","updated_at":"2026-02-05T12:32:23.000Z","dependencies_parsed_at":"2022-08-02T15:15:55.942Z","dependency_job_id":"24447037-48f6-45dd-9f68-cec45b8ea65e","html_url":"https://github.com/eik-lib/esbuild-plugin","commit_stats":{"total_commits":156,"total_committers":7,"mean_commits":"22.285714285714285","dds":0.6346153846153846,"last_synced_commit":"f7aed151d6194248ea6846b97a0d9b2cc04a2a80"},"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"purl":"pkg:github/eik-lib/esbuild-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eik-lib%2Fesbuild-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eik-lib%2Fesbuild-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eik-lib%2Fesbuild-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eik-lib%2Fesbuild-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eik-lib","download_url":"https://codeload.github.com/eik-lib/esbuild-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eik-lib%2Fesbuild-plugin/sbom","scorecard":{"id":369964,"data":{"date":"2025-08-11","repo":{"name":"github.com/eik-lib/esbuild-plugin","commit":"f6e1cfe44a7a8972e841b56afa989799fac1797c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/30 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":"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":"Maintained","score":10,"reason":"18 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/eik-lib/esbuild-plugin/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/eik-lib/esbuild-plugin/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/eik-lib/esbuild-plugin/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/eik-lib/esbuild-plugin/test.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   2 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: topLevel 'contents' permission set to 'write': .github/workflows/publish.yml:4","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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"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":"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":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'main'","Warn: could not determine whether codeowners review is allowed","Warn: no status checks found to merge onto branch 'main'","Warn: PRs are not required to make changes on branch 'main'; or we don't have data to detect it.If you think it might be the latter, make sure to run Scorecard with a PAT or use Repo Rules (that are always public) instead of Branch Protection settings"],"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":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.0.4 not signed: https://api.github.com/repos/eik-lib/esbuild-plugin/releases/235520693","Warn: release artifact v2.0.3 not signed: https://api.github.com/repos/eik-lib/esbuild-plugin/releases/225473891","Warn: release artifact v2.0.2 not signed: https://api.github.com/repos/eik-lib/esbuild-plugin/releases/223920971","Warn: release artifact v2.0.1 not signed: https://api.github.com/repos/eik-lib/esbuild-plugin/releases/219453029","Warn: release artifact v2.0.0 not signed: https://api.github.com/repos/eik-lib/esbuild-plugin/releases/217308122","Warn: release artifact v2.0.4 does not have provenance: https://api.github.com/repos/eik-lib/esbuild-plugin/releases/235520693","Warn: release artifact v2.0.3 does not have provenance: https://api.github.com/repos/eik-lib/esbuild-plugin/releases/225473891","Warn: release artifact v2.0.2 does not have provenance: https://api.github.com/repos/eik-lib/esbuild-plugin/releases/223920971","Warn: release artifact v2.0.1 does not have provenance: https://api.github.com/repos/eik-lib/esbuild-plugin/releases/219453029","Warn: release artifact v2.0.0 does not have provenance: https://api.github.com/repos/eik-lib/esbuild-plugin/releases/217308122"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yml:18"],"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":"SAST","score":5,"reason":"SAST tool is not run on all commits -- score normalized to 5","details":["Warn: 11 commits out of 19 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":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"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-18T12:43:40.597Z","repository_id":37879717,"created_at":"2025-08-18T12:43:40.598Z","updated_at":"2025-08-18T12:43:40.598Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29259493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["eik","eik-import-mapping","esbuild","esbuild-plugin"],"created_at":"2024-11-08T04:35:44.680Z","updated_at":"2026-02-09T08:07:03.427Z","avatar_url":"https://github.com/eik-lib.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @eik/esbuild-plugin\n\n[esbuild](https://esbuild.github.io/) plugin for [build-time import mapping with Eik](https://eik.dev/docs/guides/esbuild).\n\n## Installation\n\n```bash\nnpm install --save-dev esbuild @eik/esbuild-plugin\n```\n\n## Usage\n\n```js\nimport * as eik from \"@eik/esbuild-plugin\";\nimport esbuild from \"esbuild\";\n\nconst options = /** @type {esbuild.BuildOptions}*/ ({\n\tentryPoints: [\"./src/index.js\"],\n\toutdir: \"./public\",\n\tformat: \"esm\",\n\tplatform: \"browser\",\n\ttarget: [\"es2017\"],\n\tbundle: true,\n\tsourcemap: true,\n});\n\nconst watch = process.argv.includes(\"--dev\");\nif (watch) {\n\tlet ctx = await esbuild.context(options);\n\tawait ctx.watch();\n\tconsole.log(\"[esbuild] watching...\");\n} else {\n\t// Use the Eik plugin to to import mapping for the production build\n\t// Load the import maps listed in eik.json from the Eik server\n\tawait eik.load();\n\tawait esbuild.build({\n\t\t...options,\n\t\tplugins: [eik.plugin()],\n\t});\n}\n```\n\n## API\n\nThis module has the following API:\n\n### .load(options)\n\nLoads an Eik configuration or import maps directly for the plugn to use to apply.\n\n| option | default        | type     | required | details                                 |\n| ------ | -------------- | -------- | -------- | --------------------------------------- |\n| path   | `cwd/eik.json` | `string` | `false`  | Path to eik.json file.                  |\n| urls   | `[]`           | `array`  | `false`  | Array of import map URLs to fetch from. |\n| maps   | `[]`           | `array`  | `false`  | Array of import map as objects.         |\n\nThe plugin will attempt to read a `eik.json` from the current working directory of the Node.js process.\n\n```js\nawait eik.load();\n```\n\nThe path to the location of an `eik.json` file can be specified with the `path` option.\n\n```js\nawait eik.load({\n\tpath: \"/path/to/eik.json\",\n});\n```\n\nThe plugin can also load import maps directly from one or multiple URLs using the `urls` option.\n\n```js\nawait eik.load({\n\turls: [\"http://myserver/import-maps/map.json\"],\n});\n```\n\nAdditionally, individual import maps can be specified using the `maps` option.\n\n```js\nawait eik.load({\n\tmaps: [\n\t\t{\n\t\t\timports: {\n\t\t\t\t\"lit-element\": \"https://cdn.eik.dev/lit-element/v2\",\n\t\t\t},\n\t\t},\n\t],\n});\n```\n\nIf several of these options are used, `maps` takes precedence over `urls` which takes precedence over values loaded from an `eik.json` file.\n\nie. in the following example\n\n```js\nawait eik.load({\n\tpath: \"/path/to/eik.json\",\n\turls: [\"http://myserver/import-maps/map.json\"],\n\tmaps: [\n\t\t{\n\t\t\timports: {\n\t\t\t\t\"lit-element\": \"https://cdn.eik.dev/lit-element/v2\",\n\t\t\t},\n\t\t},\n\t],\n});\n```\n\nAny import map URLs in `eik.json` will be loaded first, then merged with (and overridden if necessary by) the result of fetching from `http://myserver/import-map` before finally being merged with (and overriden if necessary by) specific mappings defined in `maps`. (In this case `lit-element`)\n\n### .plugin()\n\nReturns the plugin which will apply the loaded import maps during build. The returned plugin should be appended to the esbuild plugin array.\n\n```js\nimport * as eik from \"@eik/esbuild-plugin\";\nimport esbuild from \"esbuild\";\n\nawait eik.load();\n\nesbuild\n\t.build({\n\t\tentryPoints: [\"src/main.js\"],\n\t\tbundle: true,\n\t\tformat: \"esm\",\n\t\tminify: false,\n\t\tsourcemap: false,\n\t\ttarget: [\"es2017\"],\n\t\tplugins: [eik.plugin()],\n\t\toutfile: \"out.js\",\n\t})\n\t.catch(() =\u003e process.exit(1));\n```\n\n### .clear()\n\nClears the loaded import maps from the plugins internal cache.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feik-lib%2Fesbuild-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feik-lib%2Fesbuild-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feik-lib%2Fesbuild-plugin/lists"}