{"_id":"@camertron/opal-esm","_rev":"3-93ce974b1e731eb60144364fb04fd407","name":"@camertron/opal-esm","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@camertron/opal-esm","version":"1.0.0","keywords":["ruby","opal"],"author":{"name":"Cameron Dutro"},"license":"MIT","_id":"@camertron/opal-esm@1.0.0","maintainers":[{"name":"camertron","email":"camertron@gmail.com"}],"homepage":"https://github.com/camertron/opal-esm#readme","bugs":{"url":"https://github.com/camertron/opal-esm/issues"},"dist":{"shasum":"c7f7e2d0483f07b3d1a425260abe2fdcc0ad733c","tarball":"https://registry.npmjs.org/@camertron/opal-esm/-/opal-esm-1.0.0.tgz","fileCount":60,"integrity":"sha512-4xG1dJJeIIY7TbQKmU/V4Gw3Vt0c7ti88gwFihgg9BMzrJKQXHJO2rSZomGMGn7XxZDdzb4amQYanstJxnUUvw==","signatures":[{"sig":"MEUCIQDQt24z1xlwCFH57ZsihRCoNQgIzhYHAqIhs84Wv67kFAIgOm66Pb8itwqrwEXPyfY835yLEiX3XvZ1zdWukNcelEg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6406315},"main":"index.js","type":"module","types":"./index.d.ts","module":"index.js","exports":{".":"./index.js","./*":"./src/*"},"gitHead":"4a415fcae31143c6f80e7cf5286cdb2f32aa9739","scripts":{"test":"vitest run","test:watch":"vitest"},"_npmUser":{"name":"camertron","email":"camertron@gmail.com"},"repository":{"url":"git+https://github.com/camertron/opal-esm.git","type":"git"},"_npmVersion":"11.7.0","description":"The Opal runtime, packaged as a series of ESM modules.","directories":{},"_nodeVersion":"25.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.5"},"_npmOperationalInternal":{"tmp":"tmp/opal-esm_1.0.0_1776984553900_0.12207247783872832","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@camertron/opal-esm","version":"1.0.1","keywords":["ruby","opal"],"author":{"name":"Cameron Dutro"},"license":"MIT","_id":"@camertron/opal-esm@1.0.1","maintainers":[{"name":"camertron","email":"camertron@gmail.com"}],"homepage":"https://github.com/camertron/opal-esm#readme","bugs":{"url":"https://github.com/camertron/opal-esm/issues"},"dist":{"shasum":"7144995f3a2c28754480c6cc0353f17f4f8a447a","tarball":"https://registry.npmjs.org/@camertron/opal-esm/-/opal-esm-1.0.1.tgz","fileCount":60,"integrity":"sha512-ceJ3HdhSev4jd9di7iEq7WrZDp7EswhkH15hFGpE01Ag6cMgsNh04VMRM+qEUDqIgKKlE1srcqNnaAaf+MAPBA==","signatures":[{"sig":"MEUCIQCpL4hmg4ocw5qHXaqkbpqdt5xbKlwOBPqwJAw4g099jAIgVL/TpxWm5aLu/0ZJbuX6SzD6D2Ue9Op3LcRmav/FXBc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6406318},"main":"index.js","type":"module","types":"./index.d.ts","module":"index.js","exports":{".":"./index.js","./*":"./src/*"},"gitHead":"bf7deb2246e33a0eea213f99447d4c70a710e1bb","scripts":{"test":"vitest run","test:watch":"vitest"},"_npmUser":{"name":"camertron","email":"camertron@gmail.com"},"repository":{"url":"git+https://github.com/camertron/opal-esm.git","type":"git"},"_npmVersion":"11.7.0","description":"The Opal runtime, packaged as a series of ESM modules.","directories":{},"_nodeVersion":"25.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.5"},"_npmOperationalInternal":{"tmp":"tmp/opal-esm_1.0.1_1776985768213_0.32461480917975205","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@camertron/opal-esm","version":"1.0.2","description":"The Opal runtime, packaged as a series of ESM modules.","main":"index.js","module":"index.js","repository":{"type":"git","url":"git+https://github.com/camertron/opal-esm.git"},"type":"module","publishConfig":{"access":"public"},"exports":{".":"./index.js","./*":"./src/*"},"keywords":["ruby","opal"],"author":{"name":"Cameron Dutro"},"license":"MIT","homepage":"https://github.com/camertron/opal-esm#readme","bugs":{"url":"https://github.com/camertron/opal-esm/issues"},"scripts":{"test":"vitest run","test:watch":"vitest"},"devDependencies":{"vitest":"^4.1.5"},"gitHead":"feaaef2785195811a828e8c8a06e96c624fe4d3e","types":"./index.d.ts","_id":"@camertron/opal-esm@1.0.2","_nodeVersion":"25.4.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-MwfE+CIU55xLXwsK0sQxPTclCwgX9pKJHO3pjMUqGmSC8iQFuY3pyVMsl+BZ2+pdiIw7fhtPocZrw10K4o75MQ==","shasum":"845d03f341077ee5791b4cd49a16ff50d4aba5e2","tarball":"https://registry.npmjs.org/@camertron/opal-esm/-/opal-esm-1.0.2.tgz","fileCount":60,"unpackedSize":6411626,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCgbZk0u/+XvRgobyBqxatcAUjuBrW5IqjR/MepAxVm1gIhANW4gTqh4/mW9WbY4tZFtJn1MJ0hkFU8BGsShGaTLx3O"}]},"_npmUser":{"name":"camertron","email":"camertron@gmail.com"},"directories":{},"maintainers":[{"name":"camertron","email":"camertron@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/opal-esm_1.0.2_1777006944526_0.936982300241231"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-23T22:49:13.776Z","modified":"2026-04-24T05:02:24.784Z","1.0.0":"2026-04-23T22:49:14.100Z","1.0.1":"2026-04-23T23:09:28.463Z","1.0.2":"2026-04-24T05:02:24.678Z"},"bugs":{"url":"https://github.com/camertron/opal-esm/issues"},"author":{"name":"Cameron Dutro"},"license":"MIT","homepage":"https://github.com/camertron/opal-esm#readme","keywords":["ruby","opal"],"repository":{"type":"git","url":"git+https://github.com/camertron/opal-esm.git"},"description":"The Opal runtime, packaged as a series of ESM modules.","maintainers":[{"name":"camertron","email":"camertron@gmail.com"}],"readme":"## @camertron/opal-esm\n\n![Unit Tests](https://github.com/camertron/opal-esm/actions/workflows/unit_tests.yml/badge.svg?branch=main)\n\n## What is this thing?\n\nThis package contains a copy of the Opal runtime, packaged as a series of ESM modules. Opal is normally evaluated directly on the page and thus attaches itself to `window`. This library prevents that behavior and instead allows importing and creating locally-scoped instances of the runtime.\n\n## Usage\n\nImport Opal using a standard ESM import statement:\n\n```javascript\nimport { Opal } from \"@camertron/opal-esm\";\n\nOpal.Kernel.$puts(\"Hello, world!\");\n```\n\n### Importing stdlib modules\n\nOpal includes an implementation of the Ruby standard library. To make these modules available to your ES module, all you have to do is import them.\n\n```javascript\nimport { Opal } from \"@camertron/opal-esm\";\nimport \"@camertron/opal-esm/base64\"\n\nOpal.require(\"base64\");\n\nconst base64_module = Opal.Kernel.$const_get(\"Base64\");\nconst encoded = Opal.send(base64_module, \"encode64\", [\"foobar\"]);\n\nconsole.log(encoded)  // prints \"Zm9vYmFy\\n\"\n```\n\n## Isolation\n\nNote that, although opal-esm allows the Opal runtime to be imported without modifying `window`, separate `import`s do not create more than one copy of the Ruby runtime. All `require`s, etc affect the same execution context.\n\n## Running Tests\n\n`npm test` should do the trick.\n\n## License\n\nLicensed under the MIT license. See LICENSE for details.\n\n## Authors\n\n* Cameron C. Dutro: http://github.com/camertron\n","readmeFilename":"README.md"}