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

mkdist

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mkdist - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

5

dist/cli.js

@@ -74,3 +74,3 @@ #!/usr/bin/env node

const contents = await input.getContents();
const [scriptBlock, attrs = "", script] = contents.match(/<script(\s[^>\s]*)*>([\S\s.]*?)<\/script>/) || [];
const [scriptBlock, attrs = "", _lastAttr, script] = contents.match(/<script((\s[^>\s]*)*)>([\S\s.]*?)<\/script>/) || [];
if (!scriptBlock || !script) {

@@ -91,6 +91,7 @@ return;

}
const newAttrs = attrs.replace(new RegExp(`\\s?lang="${lang}"`), "");
return [
{
path: input.path,
contents: contents.replace(scriptBlock, `<script>
contents: contents.replace(scriptBlock, `<script${newAttrs}>
${scriptFile.contents}<\/script>`)

@@ -97,0 +98,0 @@ },

@@ -72,3 +72,3 @@ 'use strict';

const contents = await input.getContents();
const [scriptBlock, attrs = "", script] = contents.match(/<script(\s[^>\s]*)*>([\S\s.]*?)<\/script>/) || [];
const [scriptBlock, attrs = "", _lastAttr, script] = contents.match(/<script((\s[^>\s]*)*)>([\S\s.]*?)<\/script>/) || [];
if (!scriptBlock || !script) {

@@ -89,6 +89,7 @@ return;

}
const newAttrs = attrs.replace(new RegExp(`\\s?lang="${lang}"`), "");
return [
{
path: input.path,
contents: contents.replace(scriptBlock, `<script>
contents: contents.replace(scriptBlock, `<script${newAttrs}>
${scriptFile.contents}<\/script>`)

@@ -95,0 +96,0 @@ },

2

package.json
{
"name": "mkdist",
"version": "0.3.3",
"version": "0.3.4",
"description": "Lightweight file-to-file transformer",

@@ -5,0 +5,0 @@ "repository": "unjs/mkdist",

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