Registry / devops / shared-integration

shared-integration

JSON →
library0.0.12jsnpmunverified

Internal utility package for UnoCSS bundler integrations, providing shared logic for transforming CSS with @apply directives and variant substitutions. Current stable version: 0.0.12. Released as part of the UnoCSS monorepo; release cadence follows UnoCSS releases. Key differentiator: handles UnoCSS-specific preprocessing like dark mode variants and responsive modifiers in a single function call. Not intended for direct end-user consumption but used by bundler plugins (e.g., Vite, Webpack). Ships TypeScript types.

npm install shared-integration
INSTALL
IMPORT
SIG · SHARED-INTEGRATION
S
shared-integration
devopsjavascriptv0.0.12
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

transformedCode
import { transformedCode } from 'shared-integration'
const transformedCode = require('shared-integration')
ESM default export is not named; use named import. CommonJS require works but TypeScript may complain without 'esModuleInterop'
transformedCode (type)
import type { TransformedCodeOptions } from 'shared-integration'
import { TransformedCodeOptions } from 'shared-integration'
Options type is not exported as value; only used for type annotation
default import
import sharedIntegration from 'shared-integration'
// no default export
This package has no default export; only named exports are available

Shows how to import and use the transformedCode function to process UnoCSS @apply and variant directives.

import { transformedCode } from 'shared-integration'; async function transformCSS() { const css = await transformedCode( '.a { @apply p-4 block .dark:c-red @dark:c-red; }', // options (optional) ); console.log(css); } transformCSS();
Debug
Known issues
breakingVersion 0.0.12 may change behavior with UnoCSS preset updates; ensure compatibility with your UnoCSS version.
fix
Pin exact version and test upgrade with new UnoCSS releases.
affects: >=0.0.0
gotchaPackage is internal and not documented thoroughly; expect API changes without major version bumps.
fix
Only use if you are contributing to UnoCSS bundler plugins. Do not rely on for production applications.
affects: >=0.0.0
deprecatedSome options like 'transform' or 'preflights' may be deprecated in future releases; check changelog.
fix
Refer to UnoCSS monorepo changelog for deprecation notices.
affects: >=0.0.10
Errors
Common errors & fixes
Cannot find module 'shared-integration' or its corresponding type declarations.
Package not installed or missing from node_modules.
fix
Run `npm install shared-integration` or `yarn add shared-integration` (it is published on npm but may be scoped? Actually scoped as @unocss/shared-integration, but import uses unscoped name? Check package.json exports).
'transformedCode' is not a function or its return is ambiguous
Using wrong import style or missing async/await.
fix
Use `import { transformedCode } from 'shared-integration'` and await the promise.
SyntaxError: Unexpected token . in expression
Using .dark:c-red without proper quoting or in wrong context.
fix
Ensure the CSS string is properly escaped and passed as a string literal.
Upgrade
Version history
0.0.12latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
shared-integration — npm install shared-integration · libregistry