{"id":23269118,"url":"https://github.com/spence/lib0-webcrypto","last_synced_at":"2025-07-03T15:33:36.763Z","repository":{"id":265859815,"uuid":"695326827","full_name":"spence/lib0-webcrypto","owner":"spence","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-22T22:12:10.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T17:07:41.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spence.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-09-22T21:34:20.000Z","updated_at":"2023-09-22T21:52:38.000Z","dependencies_parsed_at":"2024-12-02T01:18:10.967Z","dependency_job_id":null,"html_url":"https://github.com/spence/lib0-webcrypto","commit_stats":null,"previous_names":["spence/lib0-webcrypto"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spence/lib0-webcrypto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spence%2Flib0-webcrypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spence%2Flib0-webcrypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spence%2Flib0-webcrypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spence%2Flib0-webcrypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spence","download_url":"https://codeload.github.com/spence/lib0-webcrypto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spence%2Flib0-webcrypto/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263350646,"owners_count":23453312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-19T17:48:08.867Z","updated_at":"2025-07-03T15:33:36.734Z","avatar_url":"https://github.com/spence.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Issue: https://github.com/dmonad/lib0/issues/74\n\n**Describe the bug**\n\n`lib0/webcrypto` has been broken for browser contexts since `lib@0.2.73` due to remapping exports ([2617ed3](https://github.com/dmonad/lib0/commit/2617ed3fa3dfb6b50c0e4c49bc8a769b6ac12ae9)).\n\n**To Reproduce**\n```shell\n# cargo install deno\n\ngit clone https://github.com/spence/lib0-webcrypto.git\ncd lib0-webcrypto\ndeno task start\n\n# open http://localhost:8080 and show console\n```\n\n**Expected Behavior**\n\nVia pinning `lib0/webcrypto@0.2.73`:\n\n\u003cimg width=\"608\" alt=\"image\" src=\"https://user-images.githubusercontent.com/138762/270060959-5d31d237-3251-4318-8f6e-b44705c9ae15.png\"\u003e\n\n**Actual Behavior**\n\nWithout pinning:\n\n\u003cimg width=\"608\" alt=\"image\" src=\"https://user-images.githubusercontent.com/138762/270060907-ac996289-ae32-42da-b64b-62deea2a7de5.png\"\u003e\n\n**Environment Information**\n- Browser (e.g., Chrome 119.0.6024.0)\n\n**Additional context**\n\nYou can see the published source of each version via source maps.\n\n`0.2.72` (works)\n```shell\ncurl -sS https://esm.sh/v132/lib0@0.2.72/es2022/webcrypto.js.map | jq\n```\n```json\n{\n  \"mappings\": \";AAEO,IAAMA,EAAS,OAAO,OAChBC,EAAkB,OAAO,gBAAgB,KAAK,MAAM\",\n  \"names\": [\n    \"subtle\",\n    \"getRandomValues\"\n  ],\n  \"sourceRoot\": \"/\",\n  \"sources\": [\n    \"../esmd/npm/lib0@0.2.72/node_modules/.pnpm/lib0@0.2.72/node_modules/lib0/webcrypto.browser.js\"\n  ],\n  \"sourcesContent\": [\n    \"/* eslint-env browser */\\n\\nexport const subtle = crypto.subtle\\nexport const getRandomValues = crypto.getRandomValues.bind(crypto)\\n\"\n  ],\n  \"version\": 3\n}\n```\n\n`0.2.73` (broken)\n```shell\ncurl -sS https://esm.sh/v132/lib0@0.2.73/es2022/webcrypto.js.map | jq\n```\n```json\n{\n  \"mappings\": \";AACA,OAAS,aAAAA,MAAiB,8DAEnB,IAAMC,EAA6BD,EAAW,OACxCE,EAAsCF,EAAW,gBAAgB,KAAKA,CAAS\",\n  \"names\": [\n    \"webcrypto\",\n    \"subtle\",\n    \"getRandomValues\"\n  ],\n  \"sourceRoot\": \"/\",\n  \"sources\": [\n    \"../esmd/npm/lib0@0.2.73/node_modules/.pnpm/lib0@0.2.73/node_modules/lib0/webcrypto.node.js\"\n  ],\n  \"sourcesContent\": [\n    \"\\nimport { webcrypto } from 'node:crypto'\\n\\nexport const subtle = /** @type {any} */ (webcrypto).subtle\\nexport const getRandomValues = /** @type {any} */ (webcrypto).getRandomValues.bind(webcrypto)\\n\"\n  ],\n  \"version\": 3\n}\n```\n\nRelated:\n- https://github.com/dmonad/lib0/issues/69\n- https://github.com/dmonad/lib0/issues/62\n- https://github.com/dmonad/lib0/issues/71\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspence%2Flib0-webcrypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspence%2Flib0-webcrypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspence%2Flib0-webcrypto/lists"}