{"id":26865,"library":"cssafe","title":"cssafe","description":"A TypeScript-based CSS transpiler that provides type safety for stylesheets. Currently at version 0.0.1 with unknown maturity and release cadence. Differentiates by aiming to catch CSS errors at compile time using TypeScript, unlike traditional CSS preprocessors or runtime solutions.","status":"active","version":"0.0.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","css","typesafe","type","transpiler"],"install":[{"cmd":"npm install cssafe","lang":"bash","label":"npm"},{"cmd":"yarn add cssafe","lang":"bash","label":"yarn"},{"cmd":"pnpm add cssafe","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only; CommonJS require may fail.","wrong":"const cssafe = require('cssafe')","symbol":"cssafe","correct":"import cssafe from 'cssafe'"},{"note":"Named export, not default.","wrong":"import transpile from 'cssafe'","symbol":"transpile","correct":"import { transpile } from 'cssafe'"},{"note":"TypeScript type; use 'import type' to avoid runtime import.","wrong":"import { CSSafeOptions } from 'cssafe'","symbol":"CSSafeOptions","correct":"import type { CSSafeOptions } from 'cssafe'"}],"quickstart":{"code":"import cssafe from 'cssafe';\n\nconst result = cssafe.transpile(`\n  .foo {\n    color: red;\n    font-size: 16px;\n  }\n`, { sourcemap: true });\n\nconsole.log(result.code);","lang":"typescript","description":"Transpiles a CSS string using cssafe with options."},"warnings":[{"fix":"Pin to specific version and test thoroughly.","message":"Version 0.0.1 is a pre-release; API may change without notice.","severity":"breaking","affected_versions":"0.0.1"},{"fix":"Use default import: import cssafe from 'cssafe'","message":"Default export is the main entry; named exports may not work if package uses CJS-like export pattern.","severity":"gotcha","affected_versions":"0.0.1"},{"fix":"Check source code or contact maintainer for documentation.","message":"No README available; assumptions about API may be incorrect.","severity":"gotcha","affected_versions":"0.0.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Upgrade to Node.js >= 16 and use import statements.","cause":"Node.js version < 16 or using require instead of import","error":"Error [ERR_MODULE_NOT_FOUND]"},{"fix":"Check import: import cssafe from 'cssafe' then call cssafe.transpile()","cause":"Importing wrong export or using old version without transpile method","error":"Uncaught TypeError: cssafe.transpile is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}