@vanilla-extract/integration
Advanced tools
Comparing version 0.0.0-namespace-theme-tokens-20240321223951 to 0.0.0-package-json-types-field-20240521234503
@@ -8,4 +8,3 @@ 'use strict'; | ||
var javascriptStringify = require('javascript-stringify'); | ||
var isPlainObject = require('lodash/isPlainObject'); | ||
var outdent = require('outdent'); | ||
var dedent = require('dedent'); | ||
var crypto = require('crypto'); | ||
@@ -45,4 +44,3 @@ var zlib = require('zlib'); | ||
var evalCode__default = /*#__PURE__*/_interopDefault(evalCode); | ||
var isPlainObject__default = /*#__PURE__*/_interopDefault(isPlainObject); | ||
var outdent__default = /*#__PURE__*/_interopDefault(outdent); | ||
var dedent__default = /*#__PURE__*/_interopDefault(dedent); | ||
var crypto__default = /*#__PURE__*/_interopDefault(crypto); | ||
@@ -80,2 +78,18 @@ var path__default = /*#__PURE__*/_interopDefault(path); | ||
const originalNodeEnv = process.env.NODE_ENV; | ||
// Copied from https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore/blob/51f83bd3db728fd7ee177de1ffc253fdb99c537f/README.md#_isplainobject | ||
function isPlainObject(value) { | ||
if (typeof value !== 'object' || value === null) { | ||
return false; | ||
} | ||
if (Object.prototype.toString.call(value) !== '[object Object]') { | ||
return false; | ||
} | ||
const prototype = Object.getPrototypeOf(value); | ||
if (prototype === null) { | ||
return true; | ||
} | ||
const constructor = Object.prototype.hasOwnProperty.call(prototype, 'constructor') && prototype.constructor; | ||
return typeof constructor === 'function' && constructor instanceof constructor && Function.prototype.call(constructor) === Function.prototype.call(value); | ||
} | ||
function stringifyFileScope({ | ||
@@ -195,3 +209,3 @@ packageName, | ||
} | ||
if (Array.isArray(value) || isPlainObject__default["default"](value)) { | ||
if (Array.isArray(value) || isPlainObject(value)) { | ||
const reusedExport = exportLookup.get(value); | ||
@@ -232,3 +246,3 @@ if (reusedExport && reusedExport !== key) { | ||
} | ||
throw new Error(outdent__default["default"]` | ||
throw new Error(dedent__default["default"]` | ||
Invalid exports. | ||
@@ -375,3 +389,3 @@ | ||
if (hasESM && !isMixed) { | ||
source = outdent__default["default"]` | ||
source = dedent__default["default"](` | ||
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope"; | ||
@@ -381,5 +395,5 @@ setFileScope("${normalizedPath}", "${packageName}"); | ||
endFileScope(); | ||
`; | ||
`); | ||
} else { | ||
source = outdent__default["default"]` | ||
source = dedent__default["default"](` | ||
const __vanilla_filescope__ = require("@vanilla-extract/css/fileScope"); | ||
@@ -389,3 +403,3 @@ __vanilla_filescope__.setFileScope("${normalizedPath}", "${packageName}"); | ||
__vanilla_filescope__.endFileScope(); | ||
`; | ||
`); | ||
} | ||
@@ -395,3 +409,3 @@ } | ||
const adapterImport = hasESM && !isMixed ? 'import * as __vanilla_css_adapter__ from "@vanilla-extract/css/adapter";' : 'const __vanilla_css_adapter__ = require("@vanilla-extract/css/adapter");'; | ||
source = outdent__default["default"]` | ||
source = dedent__default["default"](` | ||
${adapterImport} | ||
@@ -401,3 +415,3 @@ __vanilla_css_adapter__.setAdapter(${globalAdapterIdentifier}); | ||
__vanilla_css_adapter__.removeAdapter(); | ||
`; | ||
`); | ||
} | ||
@@ -404,0 +418,0 @@ return source; |
@@ -8,4 +8,3 @@ 'use strict'; | ||
var javascriptStringify = require('javascript-stringify'); | ||
var isPlainObject = require('lodash/isPlainObject'); | ||
var outdent = require('outdent'); | ||
var dedent = require('dedent'); | ||
var crypto = require('crypto'); | ||
@@ -45,4 +44,3 @@ var zlib = require('zlib'); | ||
var evalCode__default = /*#__PURE__*/_interopDefault(evalCode); | ||
var isPlainObject__default = /*#__PURE__*/_interopDefault(isPlainObject); | ||
var outdent__default = /*#__PURE__*/_interopDefault(outdent); | ||
var dedent__default = /*#__PURE__*/_interopDefault(dedent); | ||
var crypto__default = /*#__PURE__*/_interopDefault(crypto); | ||
@@ -80,2 +78,18 @@ var path__default = /*#__PURE__*/_interopDefault(path); | ||
const originalNodeEnv = "production"; | ||
// Copied from https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore/blob/51f83bd3db728fd7ee177de1ffc253fdb99c537f/README.md#_isplainobject | ||
function isPlainObject(value) { | ||
if (typeof value !== 'object' || value === null) { | ||
return false; | ||
} | ||
if (Object.prototype.toString.call(value) !== '[object Object]') { | ||
return false; | ||
} | ||
const prototype = Object.getPrototypeOf(value); | ||
if (prototype === null) { | ||
return true; | ||
} | ||
const constructor = Object.prototype.hasOwnProperty.call(prototype, 'constructor') && prototype.constructor; | ||
return typeof constructor === 'function' && constructor instanceof constructor && Function.prototype.call(constructor) === Function.prototype.call(value); | ||
} | ||
function stringifyFileScope({ | ||
@@ -195,3 +209,3 @@ packageName, | ||
} | ||
if (Array.isArray(value) || isPlainObject__default["default"](value)) { | ||
if (Array.isArray(value) || isPlainObject(value)) { | ||
const reusedExport = exportLookup.get(value); | ||
@@ -232,3 +246,3 @@ if (reusedExport && reusedExport !== key) { | ||
} | ||
throw new Error(outdent__default["default"]` | ||
throw new Error(dedent__default["default"]` | ||
Invalid exports. | ||
@@ -375,3 +389,3 @@ | ||
if (hasESM && !isMixed) { | ||
source = outdent__default["default"]` | ||
source = dedent__default["default"](` | ||
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope"; | ||
@@ -381,5 +395,5 @@ setFileScope("${normalizedPath}", "${packageName}"); | ||
endFileScope(); | ||
`; | ||
`); | ||
} else { | ||
source = outdent__default["default"]` | ||
source = dedent__default["default"](` | ||
const __vanilla_filescope__ = require("@vanilla-extract/css/fileScope"); | ||
@@ -389,3 +403,3 @@ __vanilla_filescope__.setFileScope("${normalizedPath}", "${packageName}"); | ||
__vanilla_filescope__.endFileScope(); | ||
`; | ||
`); | ||
} | ||
@@ -395,3 +409,3 @@ } | ||
const adapterImport = hasESM && !isMixed ? 'import * as __vanilla_css_adapter__ from "@vanilla-extract/css/adapter";' : 'const __vanilla_css_adapter__ = require("@vanilla-extract/css/adapter");'; | ||
source = outdent__default["default"]` | ||
source = dedent__default["default"](` | ||
${adapterImport} | ||
@@ -401,3 +415,3 @@ __vanilla_css_adapter__.setAdapter(${globalAdapterIdentifier}); | ||
__vanilla_css_adapter__.removeAdapter(); | ||
`; | ||
`); | ||
} | ||
@@ -404,0 +418,0 @@ return source; |
{ | ||
"name": "@vanilla-extract/integration", | ||
"version": "0.0.0-namespace-theme-tokens-20240321223951", | ||
"version": "0.0.0-package-json-types-field-20240521234503", | ||
"description": "Zero-runtime Stylesheets-in-TypeScript", | ||
"main": "dist/vanilla-extract-integration.cjs.js", | ||
"types": "dist/vanilla-extract-integration.cjs.d.ts", | ||
"files": [ | ||
@@ -19,4 +20,5 @@ "/dist" | ||
"@babel/plugin-syntax-typescript": "^7.23.3", | ||
"@vanilla-extract/babel-plugin-debug-ids": "^1.0.5", | ||
"@vanilla-extract/css": "0.0.0-namespace-theme-tokens-20240321223951", | ||
"@vanilla-extract/babel-plugin-debug-ids": "0.0.0-package-json-types-field-20240521234503", | ||
"@vanilla-extract/css": "0.0.0-package-json-types-field-20240521234503", | ||
"dedent": "^1.5.3", | ||
"esbuild": "npm:esbuild@~0.17.6 || ~0.18.0 || ~0.19.0", | ||
@@ -26,5 +28,3 @@ "eval": "0.1.8", | ||
"javascript-stringify": "^2.0.1", | ||
"lodash": "^4.17.21", | ||
"mlly": "^1.4.2", | ||
"outdent": "^0.8.0", | ||
"vite": "^5.0.11", | ||
@@ -34,5 +34,4 @@ "vite-node": "^1.2.0" | ||
"devDependencies": { | ||
"@types/babel__core": "^7.20.5", | ||
"@types/lodash": "^4.14.168" | ||
"@types/babel__core": "^7.20.5" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65968
12
1
1818
+ Addeddedent@^1.5.3
+ Added@vanilla-extract/babel-plugin-debug-ids@0.0.0-package-json-types-field-20240521234503(transitive)
+ Added@vanilla-extract/css@0.0.0-package-json-types-field-20240521234503(transitive)
+ Added@vanilla-extract/private@0.0.0-package-json-types-field-20240521234503(transitive)
+ Addeddedent@1.5.3(transitive)
- Removedlodash@^4.17.21
- Removedoutdent@^0.8.0
- Removed@vanilla-extract/babel-plugin-debug-ids@1.1.0(transitive)
- Removed@vanilla-extract/css@0.0.0-namespace-theme-tokens-20240321223951(transitive)
- Removed@vanilla-extract/private@0.0.0-namespace-theme-tokens-20240321223951(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedoutdent@0.8.0(transitive)
- Removedsupports-color@7.2.0(transitive)
Updated@vanilla-extract/babel-plugin-debug-ids@0.0.0-package-json-types-field-20240521234503
Updated@vanilla-extract/css@0.0.0-package-json-types-field-20240521234503