New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@freesewing/plugin-mirror

Package Overview
Dependencies
Maintainers
2
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@freesewing/plugin-mirror - npm Package Compare versions

Comparing version
4.4.3
to
4.5.0
+1
-1
about.json
{
"id": "plugin-mirror",
"description": "A FreeSewing plugin to mirror points or paths",
"version": "4.4.3"
"version": "4.5.0"
}
{
"name": "@freesewing/plugin-mirror",
"version": "4.4.3",
"version": "4.5.0",
"description": "A FreeSewing plugin to mirror points or paths",

@@ -39,3 +39,3 @@ "author": "Joost De Cock <joost@joost.at> (https://codeberg.org/joostdecock)",

"peerDependencies": {
"@freesewing/core": "4.4.3"
"@freesewing/core": "4.5.0"
},

@@ -42,0 +42,0 @@ "dependencies": {},

@@ -14,3 +14,3 @@ <p align='center'><a

title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-132-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-131-pink.svg"
alt="All Contributors"/>

@@ -17,0 +17,0 @@ </a></p><p align='center'><a

@@ -47,4 +47,6 @@ import about from '../about.json' with { type: 'json' }

paths = [],
snippets = [],
prefix = 'mirrored',
nameFormat = undefined,
reverse = false,
}) {

@@ -57,3 +59,4 @@ const [start, end] = mirror

if (this.paths[pathId]) {
const path = clone ? this.paths[pathId].clone() : this.paths[pathId]
let path = clone ? this.paths[pathId].clone() : this.paths[pathId]
path = reverse ? path.reverse() : path

@@ -102,2 +105,33 @@ const newId = clone

}
for (const snippetId of snippets) {
// Make sure the snippet exists
if (this.snippets[snippetId]) {
const pointId = this.snippets[snippetId].anchor.name
const snippet = clone ? this.snippets[snippetId].clone() : this.snippets[snippetId]
const newSnippetId = clone
? typeof nameFormat == 'function'
? nameFormat(snippetId, 'snippet')
: `${prefix}${capFirst(snippetId)}`
: snippetId
this.snippets[newSnippetId] = snippet
const point = mirrorPoint(snippet.anchor)
if (this.points[pointId]) {
const newPointId = clone
? typeof nameFormat == 'function'
? nameFormat(pointId, 'point')
: `${prefix}${capFirst(pointId)}`
: pointId
this.points[newPointId] = point
snippet.anchor = this.points[newPointId]
} else {
snippet.anchor = point
}
}
}
},

@@ -104,0 +138,0 @@ },