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

@wyw-in-js/processor-utils

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wyw-in-js/processor-utils - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

11

esm/utils/templateProcessor.js

@@ -27,3 +27,2 @@ /* eslint-disable no-continue */

let item;
let lastTemplateElementLocation;
// eslint-disable-next-line no-cond-assign

@@ -34,3 +33,2 @@ while (item = template.shift()) {

cssText += item.value.cooked;
lastTemplateElementLocation = item.loc;
continue;

@@ -44,3 +42,4 @@ }

const {
end
end,
start
} = ex.loc;

@@ -52,7 +51,3 @@ const beforeLength = cssText.length;

const loc = {
// +1 because an expression location always shows 1 column before
start: {
line: lastTemplateElementLocation.end.line,
column: lastTemplateElementLocation.end.column + 1
},
start,
end: next ? {

@@ -59,0 +54,0 @@ line: next.loc.start.line,

@@ -6,4 +6,7 @@ // ParamMapping maps each ParamName to its corresponding Param type.

// If T is none of the above, return never.
// MapParams iteratively maps the input ParamConstraints to their corresponding Param types.
// If TNames is an empty tuple, return the result tuple.
export function isValidParams(params, constraints) {

@@ -10,0 +13,0 @@ const length = Math.max(params.length, constraints.length);

@@ -13,4 +13,4 @@ "use strict";

var _units = require("./units");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -36,3 +36,2 @@ /* eslint-disable no-continue */

let item;
let lastTemplateElementLocation;
// eslint-disable-next-line no-cond-assign

@@ -43,3 +42,2 @@ while (item = template.shift()) {

cssText += item.value.cooked;
lastTemplateElementLocation = item.loc;
continue;

@@ -53,3 +51,4 @@ }

const {
end
end,
start
} = ex.loc;

@@ -61,7 +60,3 @@ const beforeLength = cssText.length;

const loc = {
// +1 because an expression location always shows 1 column before
start: {
line: lastTemplateElementLocation.end.line,
column: lastTemplateElementLocation.end.column + 1
},
start,
end: next ? {

@@ -68,0 +63,0 @@ line: next.loc.start.line,

{
"name": "@wyw-in-js/processor-utils",
"version": "0.1.1",
"version": "0.2.0",
"dependencies": {
"@babel/generator": "^7.23.0",
"@wyw-in-js/shared": "0.1.1"
"@babel/generator": "^7.23.5",
"@wyw-in-js/shared": "0.2.0"
},
"devDependencies": {
"@babel/types": "^7.23.0",
"@types/babel__core": "^7.20.2",
"@types/babel__generator": "^7.6.5",
"@babel/types": "^7.23.5",
"@types/babel__core": "^7.20.5",
"@types/babel__generator": "^7.6.7",
"@types/node": "^16.18.55",
"typescript": "^5.2.2",
"@wyw-in-js/babel-config": "0.1.1",
"@wyw-in-js/eslint-config": "0.1.1",
"@wyw-in-js/jest-preset": "0.1.1",
"@wyw-in-js/ts-config": "0.1.1"
"@wyw-in-js/babel-config": "0.2.0",
"@wyw-in-js/eslint-config": "0.2.0",
"@wyw-in-js/jest-preset": "0.2.0",
"@wyw-in-js/ts-config": "0.2.0"
},

@@ -19,0 +19,0 @@ "engines": {

@@ -50,3 +50,2 @@ "use strict";

let item;
let lastTemplateElementLocation;
// eslint-disable-next-line no-cond-assign

@@ -57,3 +56,2 @@ while ((item = template.shift())) {

cssText += item.value.cooked;
lastTemplateElementLocation = item.loc;
continue;

@@ -63,3 +61,3 @@ }

const { ex } = item;
const { end } = ex.loc;
const { end, start } = ex.loc;
const beforeLength = cssText.length;

@@ -69,7 +67,3 @@ // The location will be end of the current string to start of next string

const loc = {
// +1 because an expression location always shows 1 column before
start: {
line: lastTemplateElementLocation.end.line,
column: lastTemplateElementLocation.end.column + 1,
},
start,
end: next

@@ -76,0 +70,0 @@ ? { line: next.loc.start.line, column: next.loc.start.column }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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