Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rollup/plugin-esm-shim

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rollup/plugin-esm-shim - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

18

dist/cjs/index.js

@@ -52,5 +52,21 @@ 'use strict';

s.appendRight(indexToAppend, ESMShim);
const sourceMap = s.generateMap({
includeContent: true
});
let sourcesContent;
if (Array.isArray(sourceMap.sourcesContent)) {
sourcesContent = [];
for (let i = 0; i < sourceMap.sourcesContent.length; i++) {
const content = sourceMap.sourcesContent[i];
if (typeof content === 'string') {
sourcesContent.push(content);
}
}
}
return {
code: s.toString(),
map: s.generateMap()
map: {
...sourceMap,
sourcesContent
}
};

@@ -57,0 +73,0 @@ }

@@ -48,5 +48,21 @@ import MagicString from 'magic-string';

s.appendRight(indexToAppend, ESMShim);
const sourceMap = s.generateMap({
includeContent: true
});
let sourcesContent;
if (Array.isArray(sourceMap.sourcesContent)) {
sourcesContent = [];
for (let i = 0; i < sourceMap.sourcesContent.length; i++) {
const content = sourceMap.sourcesContent[i];
if (typeof content === 'string') {
sourcesContent.push(content);
}
}
}
return {
code: s.toString(),
map: s.generateMap()
map: {
...sourceMap,
sourcesContent
}
};

@@ -53,0 +69,0 @@ }

4

package.json
{
"name": "@rollup/plugin-esm-shim",
"version": "0.1.0",
"version": "0.1.1",
"publishConfig": {

@@ -63,3 +63,3 @@ "access": "public"

"dependencies": {
"magic-string": "^0.27.0"
"magic-string": "^0.30.0"
},

@@ -66,0 +66,0 @@ "devDependencies": {

@@ -46,6 +46,23 @@ import MagicString from 'magic-string';

const sourceMap = s.generateMap({
includeContent: true
});
let sourcesContent: string[] | undefined;
if (Array.isArray(sourceMap.sourcesContent)) {
sourcesContent = [];
for (let i = 0; i < sourceMap.sourcesContent.length; i++) {
const content = sourceMap.sourcesContent[i];
if (typeof content === 'string') {
sourcesContent.push(content);
}
}
}
return {
code: s.toString(),
map: s.generateMap()
map: {
...sourceMap,
sourcesContent
}
};
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc