@theme-ui/css
Advanced tools
Comparing version 0.15.0-develop.22 to 0.15.0-develop.26
@@ -1,1 +0,11 @@ | ||
export * from "./declarations/src/index"; | ||
// are you seeing an error that a default export doesn't exist but your source file has a default export? | ||
// you should run `yarn` or `yarn preconstruct dev` if preconstruct dev isn't in your postinstall hook | ||
// curious why you need to? | ||
// this file exists so that you can import from the entrypoint normally | ||
// except that it points to your source file and you don't need to run build constantly | ||
// which means we need to re-export all of the modules from your source file | ||
// and since export * doesn't include default exports, we need to read your source file | ||
// to check for a default export and re-export it if it exists | ||
// it's not ideal, but it works pretty well ¯\_(ツ)_/¯ | ||
export * from "../src/index"; |
@@ -1,7 +0,16 @@ | ||
'use strict'; | ||
"use strict"; | ||
// this file might look strange and you might be wondering what it's for | ||
// it's lets you import your source files by importing this entrypoint | ||
// as you would import it if it was built with preconstruct build | ||
// this file is slightly different to some others though | ||
// it has a require hook which compiles your code with Babel | ||
// this means that you don't have to set up @babel/register or anything like that | ||
// but you can still require this module and it'll be compiled | ||
if (process.env.NODE_ENV === "production") { | ||
module.exports = require("./theme-ui-css.cjs.prod.js"); | ||
} else { | ||
module.exports = require("./theme-ui-css.cjs.dev.js"); | ||
} | ||
// this bit of code imports the require hook and registers it | ||
let unregister = require("../../../node_modules/.pnpm/@preconstruct+hook@0.4.0/node_modules/@preconstruct/hook").___internalHook(typeof __dirname === 'undefined' ? undefined : __dirname, "../../..", ".."); | ||
// this re-exports the source file | ||
module.exports = require("../src/index.ts"); | ||
unregister(); |
{ | ||
"name": "@theme-ui/css", | ||
"version": "0.15.0-develop.22", | ||
"version": "0.15.0-develop.26", | ||
"source": "src/index.ts", | ||
@@ -8,3 +8,2 @@ "main": "dist/theme-ui-css.cjs.js", | ||
"sideEffects": false, | ||
"scripts": {}, | ||
"author": "Brent Jackson", | ||
@@ -22,2 +21,7 @@ "license": "MIT", | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18", | ||
"@babel/core": "^7", | ||
"@theme-ui/test-utils": "^0.15.0-develop.26" | ||
}, | ||
"preconstruct": { | ||
@@ -29,3 +33,4 @@ "entrypoints": [ | ||
}, | ||
"gitHead": "596aeb366bdec8c3459d5e00fbfa23d75f1bb4d8" | ||
} | ||
"gitHead": "621199460fa3bdb0100748441e62517b7529b8c8", | ||
"scripts": {} | ||
} |
@@ -54,3 +54,3 @@ import { expecter } from '@theme-ui/test-utils' | ||
expectSnippet(` | ||
import { get } from 'theme-ui' | ||
import { get } from './packages/css' | ||
@@ -68,3 +68,3 @@ css({ | ||
expectSnippet(` | ||
import { Theme } from 'theme-ui'; | ||
import { Theme } from './packages/css'; | ||
@@ -75,3 +75,3 @@ interface MySyntaxHighlightingTheme { | ||
declare module 'theme-ui' { | ||
declare module './packages/css' { | ||
interface Theme { | ||
@@ -93,3 +93,3 @@ syntaxHighlighting?: MySyntaxHighlightingTheme | ||
test('works as described in the docs', () => { | ||
const theme: Theme = { | ||
const _theme: Theme = { | ||
colors: { background: 'white', text: 'black', primary: '#07f' }, | ||
@@ -131,3 +131,3 @@ space: [0, 8, 16, 32, 64, 128, 256], | ||
expectSnippet(` | ||
import { ThemeUICSSObject } from 'theme-ui' | ||
import { ThemeUICSSObject } from './packages/css' | ||
@@ -134,0 +134,0 @@ const style: ThemeUICSSObject = { |
@@ -26,3 +26,3 @@ import { Theme } from '../src' | ||
it('is exposed from entrypoint /utils and validates Theme type', () => { | ||
expecter('import { makeTheme } from "@theme-ui/css/utils"')( | ||
expecter('import { makeTheme } from "./packages/css/utils"')( | ||
'const t = makeTheme("banana")' | ||
@@ -29,0 +29,0 @@ ).toFail(/Type '"banana"' has no properties in common with type 'Theme'./) |
@@ -1,1 +0,11 @@ | ||
export * from "../../dist/declarations/src/utils"; | ||
// are you seeing an error that a default export doesn't exist but your source file has a default export? | ||
// you should run `yarn` or `yarn preconstruct dev` if preconstruct dev isn't in your postinstall hook | ||
// curious why you need to? | ||
// this file exists so that you can import from the entrypoint normally | ||
// except that it points to your source file and you don't need to run build constantly | ||
// which means we need to re-export all of the modules from your source file | ||
// and since export * doesn't include default exports, we need to read your source file | ||
// to check for a default export and re-export it if it exists | ||
// it's not ideal, but it works pretty well ¯\_(ツ)_/¯ | ||
export * from "../../src/utils"; |
@@ -1,7 +0,16 @@ | ||
'use strict'; | ||
"use strict"; | ||
// this file might look strange and you might be wondering what it's for | ||
// it's lets you import your source files by importing this entrypoint | ||
// as you would import it if it was built with preconstruct build | ||
// this file is slightly different to some others though | ||
// it has a require hook which compiles your code with Babel | ||
// this means that you don't have to set up @babel/register or anything like that | ||
// but you can still require this module and it'll be compiled | ||
if (process.env.NODE_ENV === "production") { | ||
module.exports = require("./theme-ui-css-utils.cjs.prod.js"); | ||
} else { | ||
module.exports = require("./theme-ui-css-utils.cjs.dev.js"); | ||
} | ||
// this bit of code imports the require hook and registers it | ||
let unregister = require("../../../../node_modules/.pnpm/@preconstruct+hook@0.4.0/node_modules/@preconstruct/hook").___internalHook(typeof __dirname === 'undefined' ? undefined : __dirname, "../../../..", "../.."); | ||
// this re-exports the source file | ||
module.exports = require("../../src/utils.ts"); | ||
unregister(); |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1
86381
3
17
2186