@bumbag/emotion
Advanced tools
Comparing version 10.0.27-0 to 10.0.27-1
@@ -1,21 +0,7 @@ | ||
"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 | ||
'use strict'; | ||
const path = require("path"); | ||
// this bit of code imports the require hook and registers it | ||
let unregister = require("../../../node_modules/@preconstruct/hook/dist/hook.cjs.js").___internalHook(path.resolve(__dirname, "../../.."), path.resolve(__dirname, "..")); | ||
// this re-exports the source file | ||
module.exports = require("../src/index.js"); | ||
// this unregisters the require hook so that any modules required after this one | ||
// aren't compiled with the require hook in case you have some other require hook | ||
// or something that should be used on other modules | ||
unregister(); | ||
if (process.env.NODE_ENV === "production") { | ||
module.exports = require("./emotion.cjs.prod.js"); | ||
} else { | ||
module.exports = require("./emotion.cjs.dev.js"); | ||
} |
@@ -1,15 +0,15 @@ | ||
// 👋 hey!! | ||
// you might be reading this and seeing .esm in the filename | ||
// and being confused why there is commonjs below this filename | ||
// DON'T WORRY! | ||
// this is intentional | ||
// it's only commonjs with `preconstruct dev` | ||
// when you run `preconstruct build`, it will be ESM | ||
// why is it commonjs? | ||
// we need to re-export every export from the source file | ||
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *) | ||
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to | ||
// run preconstruct dev again which wouldn't be ideal | ||
// this solution could change but for now, it's working | ||
import createEmotion from 'create-emotion'; | ||
module.exports = require("../src/index.js") | ||
var _createEmotion = createEmotion(), | ||
flush = _createEmotion.flush, | ||
hydrate = _createEmotion.hydrate, | ||
cx = _createEmotion.cx, | ||
merge = _createEmotion.merge, | ||
getRegisteredStyles = _createEmotion.getRegisteredStyles, | ||
injectGlobal = _createEmotion.injectGlobal, | ||
keyframes = _createEmotion.keyframes, | ||
css = _createEmotion.css, | ||
sheet = _createEmotion.sheet, | ||
cache = _createEmotion.cache; | ||
export { cache, css, cx, flush, getRegisteredStyles, hydrate, injectGlobal, keyframes, merge, sheet }; |
{ | ||
"name": "@bumbag/emotion", | ||
"version": "10.0.27-0", | ||
"version": "10.0.27-1", | ||
"description": "The Next Generation of CSS-in-JS.", | ||
@@ -21,3 +21,3 @@ "main": "dist/emotion.cjs.js", | ||
"babel-plugin-emotion": "^10.0.27", | ||
"create-emotion": "npm:@bumbag/create-emotion@10.0.27-0" | ||
"create-emotion": "npm:@bumbag/create-emotion@10.0.27-1" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
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
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
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
105233
19
288
2
+ Added@bumbag/create-emotion@10.0.27-1(transitive)
+ Added@bumbag/emotion-cache@10.0.29-1(transitive)
- Removed@bumbag/create-emotion@10.0.27-0(transitive)
- Removed@bumbag/emotion-cache@10.0.29-0(transitive)