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

@tabula/forge

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tabula/forge - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

46

lib/index.js

@@ -5,3 +5,3 @@ // src/cli/run.ts

// package.json
var version = "0.2.0";
var version = "0.2.1";

@@ -172,2 +172,3 @@ // src/cli/createCommand.ts

import { fromObject } from "convert-source-map";
import { readPackageUpSync } from "read-pkg-up";
async function renderCss({ path }) {

@@ -181,2 +182,38 @@ const css = await readFile3(path, "utf8");

}
function findImportDirectly(name, localRequire) {
try {
const path = localRequire.resolve(`${name}/package.json`);
const dir = dirname(path);
const json = localRequire(path);
if (json.sass == null) {
return null;
}
return join2(dir, json.sass);
} catch {
return null;
}
}
function findImportConditionally(name, localRequire) {
try {
const entry = localRequire.resolve(name);
const result = readPackageUpSync({ cwd: dirname(entry) });
if (result == null) {
return null;
}
const { packageJson, path } = result;
if (packageJson.sass == null) {
return null;
}
return join2(dirname(path), packageJson.sass);
} catch {
return null;
}
}
function findImport(name, localRequire) {
const directImport = findImportDirectly(name, localRequire);
if (directImport != null) {
return directImport;
}
return findImportConditionally(name, localRequire);
}
function createImporter(path) {

@@ -193,7 +230,4 @@ return {

const localRequire = createRequire(path);
const packageJsonPath = localRequire.resolve(`${url}/package.json`);
const packageJsonDir = dirname(packageJsonPath);
const packageJson = localRequire(packageJsonPath);
if (packageJson.sass != null) {
const importPath = join2(packageJsonDir, packageJson.sass);
const importPath = findImport(url, localRequire);
if (importPath != null) {
return pathToFileURL(importPath);

@@ -200,0 +234,0 @@ }

2

package.json
{
"name": "@tabula/forge",
"version": "0.2.0",
"version": "0.2.1",
"description": "The bundler for packages for Node.js and browser with support of various tools",

@@ -5,0 +5,0 @@ "type": "module",

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