
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
babel-plugin-jsm-to-commonjs
Advanced tools
Transforms imports and exports in Firefox .jsm to commonjs syntax
This module converts import and export statements with Components.utils.import
and XPCOMUtils.defineLazyModuleGetter
in .jsm
modules to commonjs modules. For example:
Source:
const {utils: Cu} = Components;
const {Bar, Baz} = Cu.import("resource://activity-stream/addon/barbaz.jsm", {});
XPCOMUtils.defineLazyModuleGetter("Foo", "resource://activity-stream/addon/Foo.jsm")
this.Stuff = {};
this.Whatever = {};
this.EXPORTED_SYMBOLS = ["Stuff", "Whatever"];
Compiles to:
const {Bar, Baz} = require("addon/barbaz.jsm");
const {Foo} = require("addon/Foo.jsm")
var Stuff = {};
var Whatever = {};
module.exports = {Stuff, Whatever};
basePath
Defaults to /^resource:\/\/
. A RegEx or String that tests for which import paths to rewrite.
replace
Defaults to false
. Remove the basePath
component of the import string?
e.g. If the basePath is /^resource:\/\/
, resource://activity-stream/foo.js
will be rewritten to activity-stream/foo.js
.
"plugins": ["transform-react-jsx", {basePath: "resource://activity-stream/"}],
removeOtherImports
Defaults to false
. Should we remove non-matching imports?
FAQs
Transforms imports and exports in Firefox .jsm to commonjs syntax
The npm package babel-plugin-jsm-to-commonjs receives a total of 144 weekly downloads. As such, babel-plugin-jsm-to-commonjs popularity was classified as not popular.
We found that babel-plugin-jsm-to-commonjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.