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

@vanilla-extract/integration

Package Overview
Dependencies
Maintainers
4
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vanilla-extract/integration - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

6

CHANGELOG.md
# @vanilla-extract/integration
## 1.0.1
### Patch Changes
- [#176](https://github.com/seek-oss/vanilla-extract/pull/176) [`cbfe0de`](https://github.com/seek-oss/vanilla-extract/commit/cbfe0def098dcf820fb710388cdc82b48436bdca) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Continue searching for package.json if one is found with no name
## 1.0.0

@@ -4,0 +10,0 @@

37

dist/vanilla-extract-integration.cjs.dev.js

@@ -167,2 +167,20 @@ 'use strict';

function getClosestPackageInfo(directory) {
const packageJsonPath = findUp__default['default'].sync('package.json', {
cwd: directory
});
if (packageJsonPath) {
const {
name
} = require(packageJsonPath);
return {
name,
path: packageJsonPath,
dirname: path__default['default'].dirname(packageJsonPath)
};
}
}
const packageInfoCache = new Map();

@@ -177,19 +195,12 @@ function getPackageInfo(cwd) {

const packageJsonPath = findUp__default['default'].sync('package.json', {
cwd: resolvedCwd
});
let packageInfo = getClosestPackageInfo(resolvedCwd);
if (!packageJsonPath) {
throw new Error(`Can't find package.json`);
while (packageInfo && !packageInfo.name) {
packageInfo = getClosestPackageInfo(path__default['default'].resolve(packageInfo.dirname, '..'));
}
const {
name
} = require(packageJsonPath);
if (!packageInfo || !packageInfo.name) {
throw new Error(`Couldn't find parent package.json with a name field from '${resolvedCwd}'`);
}
const packageInfo = {
name,
path: packageJsonPath,
dirname: path__default['default'].dirname(packageJsonPath)
};
packageInfoCache.set(resolvedCwd, packageInfo);

@@ -196,0 +207,0 @@ return packageInfo;

@@ -167,2 +167,20 @@ 'use strict';

function getClosestPackageInfo(directory) {
const packageJsonPath = findUp__default['default'].sync('package.json', {
cwd: directory
});
if (packageJsonPath) {
const {
name
} = require(packageJsonPath);
return {
name,
path: packageJsonPath,
dirname: path__default['default'].dirname(packageJsonPath)
};
}
}
const packageInfoCache = new Map();

@@ -177,19 +195,12 @@ function getPackageInfo(cwd) {

const packageJsonPath = findUp__default['default'].sync('package.json', {
cwd: resolvedCwd
});
let packageInfo = getClosestPackageInfo(resolvedCwd);
if (!packageJsonPath) {
throw new Error(`Can't find package.json`);
while (packageInfo && !packageInfo.name) {
packageInfo = getClosestPackageInfo(path__default['default'].resolve(packageInfo.dirname, '..'));
}
const {
name
} = require(packageJsonPath);
if (!packageInfo || !packageInfo.name) {
throw new Error(`Couldn't find parent package.json with a name field from '${resolvedCwd}'`);
}
const packageInfo = {
name,
path: packageJsonPath,
dirname: path__default['default'].dirname(packageJsonPath)
};
packageInfoCache.set(resolvedCwd, packageInfo);

@@ -196,0 +207,0 @@ return packageInfo;

@@ -154,2 +154,20 @@ import { setAdapter } from '@vanilla-extract/css/adapter';

function getClosestPackageInfo(directory) {
const packageJsonPath = findUp.sync('package.json', {
cwd: directory
});
if (packageJsonPath) {
const {
name
} = require(packageJsonPath);
return {
name,
path: packageJsonPath,
dirname: path.dirname(packageJsonPath)
};
}
}
const packageInfoCache = new Map();

@@ -164,19 +182,12 @@ function getPackageInfo(cwd) {

const packageJsonPath = findUp.sync('package.json', {
cwd: resolvedCwd
});
let packageInfo = getClosestPackageInfo(resolvedCwd);
if (!packageJsonPath) {
throw new Error(`Can't find package.json`);
while (packageInfo && !packageInfo.name) {
packageInfo = getClosestPackageInfo(path.resolve(packageInfo.dirname, '..'));
}
const {
name
} = require(packageJsonPath);
if (!packageInfo || !packageInfo.name) {
throw new Error(`Couldn't find parent package.json with a name field from '${resolvedCwd}'`);
}
const packageInfo = {
name,
path: packageJsonPath,
dirname: path.dirname(packageJsonPath)
};
packageInfoCache.set(resolvedCwd, packageInfo);

@@ -183,0 +194,0 @@ return packageInfo;

{
"name": "@vanilla-extract/integration",
"version": "1.0.0",
"version": "1.0.1",
"description": "Zero-runtime Stylesheets-in-TypeScript",

@@ -5,0 +5,0 @@ "main": "dist/vanilla-extract-integration.cjs.js",

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