Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fde289b
chore: Update dependencies
maxmilton Jul 23, 2026
00a675d
chore: Fix new lint issues
maxmilton Jul 23, 2026
46c85fe
docs: Clean up dev
maxmilton Jul 23, 2026
8931666
chore: Tweak VS Code settings
maxmilton Jul 24, 2026
d9c2e15
feat: Add support for real sourcemaps
maxmilton Jul 24, 2026
00a2ce0
test: Add tests for sourcemaps
maxmilton Jul 24, 2026
f514cd3
feat(plugin-apply); Improve performance
maxmilton Jul 24, 2026
d87a15a
test: Add tests for plugin-import
maxmilton Jul 24, 2026
9374d82
test: Add tests for plugin-apply
maxmilton Jul 24, 2026
d363725
test: Add tests for plugin-prefix
maxmilton Jul 24, 2026
593cea0
chore: Update dependencies
maxmilton Jul 24, 2026
33fb410
chore: Tweak eslint config
maxmilton Jul 24, 2026
5ed2e9c
chore: Update dependency
maxmilton Jul 24, 2026
1e45498
chore: Fix lint issues
maxmilton Jul 24, 2026
f5e4224
Bump package versions (next tag)
maxmilton Jul 24, 2026
787a0d1
chore: Update lockfile
maxmilton Jul 24, 2026
0201b8a
chore Cleanup
maxmilton Jul 24, 2026
b24ba08
chore: Update dependencies
maxmilton Aug 3, 2026
53fb073
chore: Force bun instead of node when running scripts
maxmilton Aug 3, 2026
61ca0fc
chore: Update dependencies
maxmilton Sep 6, 2026
d045034
chore: Tweak bun config
maxmilton Sep 6, 2026
f2c325a
chore: Tweak ignored files
maxmilton Sep 6, 2026
ba994fa
chore: Update dependencies
maxmilton Sep 29, 2026
7f3c735
chore: Fix new lint issues
maxmilton Sep 29, 2026
716a286
Merge branch 'master' into next
maxmilton Sep 29, 2026
c405f33
test: Clean up unwanted test snapshot
maxmilton Sep 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
dist/
node_modules/
!/bun.lock
/.claude/
/coverage/

# auto-generated
Expand Down
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"recommendations": [
"biomejs.biome",
"dbaeumer.vscode-eslint",
"MylesMurphy.prettify-ts",
"oven.bun-vscode",
"stylelint.vscode-stylelint",
"tekumara.typos-vscode",
Expand Down
8 changes: 0 additions & 8 deletions .vscode/mcp.json

This file was deleted.

355 changes: 175 additions & 180 deletions bun.lock

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
"$schema" = "https://www.schemastore.org/bunfig.json"

[run]
bun = true
noOrphans = true

[install]
auto = "disable"
linker = "isolated"
peer = false
minimumReleaseAge = 604800 # 7 days
minimumReleaseAgeExcludes = ["@maxmilton/*"]

[test]
preload = ["./test/setup.ts"]
2 changes: 0 additions & 2 deletions docs/dev/.npmrc

This file was deleted.

11 changes: 11 additions & 0 deletions docs/dev/bunfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"$schema" = "https://www.schemastore.org/bunfig.json"

logLevel = "debug"

[install]
linker = "isolated"
peer = false
minimumReleaseAge = 604800 # 7 days

[install.lockfile]
save = false
5 changes: 0 additions & 5 deletions docs/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,5 @@
"devDependencies": {
"microdoc": "*",
"sirv-cli": "*"
},
"__pnpm": {
"overrides": {
"microdoc": "../../../microdoc"
}
}
}
2 changes: 0 additions & 2 deletions docs/dev/pnpm-workspace.yaml

This file was deleted.

5 changes: 4 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ export default defineConfig(
rules: {
"@typescript-eslint/prefer-nullish-coalescing": "warn", // compatibility with node >= v12
"no-plusplus": "off", // byte savings
"unicorn/consistent-boolean-name": "off",
"unicorn/no-array-callback-reference": "off", // byte savings
"unicorn/no-array-for-each": "off", // slower but more compact (for non-performance-critical code)
"unicorn/prefer-at": "off", // bad browser support
"unicorn/prefer-code-point": "off", // faster
"unicorn/prefer-global-this": "off", // prefer to clearly separate Bun and DOM
"unicorn/prefer-string-replace-all": "off", // bad browser support and slower
"unicorn/prefer-uint8array-base64": "off", // not available in node < v25
Expand Down Expand Up @@ -65,9 +67,10 @@ export default defineConfig(
"unicorn/no-anonymous-default-export": "off",
"unicorn/no-process-exit": "off",
"unicorn/no-unsafe-string-replacement": "warn",
"unicorn/prefer-early-return": "off",
"unicorn/prefer-logical-operator-over-ternary": "off",
"unicorn/prefer-minimal-ternary": "off",
},
},
{ ignores: ["**/*.bak", "**/dist", "coverage", "packages/framework/*.d.ts"] },
{ ignores: ["**/*.bak", "**/dist", ".claude", "coverage", "packages/framework/*.d.ts"] },
);
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@
"test:node:c8": "c8 npm run test:node"
},
"devDependencies": {
"@biomejs/biome": "2.5.10",
"@biomejs/biome": "2.5.14",
"@eslint/js": "10.0.1",
"@maxmilton/eslint-config": "0.3.5",
"@maxmilton/stylelint-config": "0.4.4",
"@maxmilton/test-utils": "0.0.18",
"@types/bun": "1.4.0",
"@types/node": "26.3.0",
"c8": "11.0.0",
"@types/bun": "1.4.2",
"@types/node": "26.6.2",
"c8": "12.0.0",
"ekscss": "workspace:*",
"eslint": "10.9.1",
"eslint-plugin-unicorn": "70.0.0",
"eslint": "10.11.0",
"eslint-plugin-unicorn": "76.0.0",
"postcss-ekscss": "workspace:*",
"stylelint": "17.14.1",
"stylelint": "17.15.0",
"stylelint-config-standard": "40.0.0",
"turbo": "2.10.12",
"turbo": "2.11.2",
"typescript": "6.0.3",
"typescript-eslint": "8.68.0",
"typescript-eslint": "8.70.1",
"uvu": "0.5.6"
},
"packageManager": "bun@1.99.0"
Expand Down
1 change: 1 addition & 0 deletions packages/build-tools/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export function createTypes(entrypoints: string[], outdir = "dist"): void {
skipLibCheck: true,
};
const result = createProgram(entrypoints, config).emit(undefined, undefined, undefined, true);
// eslint-disable-next-line unicorn/prefer-early-return
if (result.emitSkipped) {
// eslint-disable-next-line no-console
console.error(
Expand Down
2 changes: 1 addition & 1 deletion packages/bun-plugin-ekscss/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bun-plugin-ekscss",
"version": "0.0.3",
"version": "0.0.4-next.0",
"description": "Bun plugin to add support for XCSS",
"homepage": "https://ekscss.js.org",
"repository": "github:maxmilton/ekscss",
Expand Down
7 changes: 1 addition & 6 deletions packages/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,7 @@ module.exports = async (src, dest, opts) => {

if (sourcemap) {
if (config.banner) {
const bannerLineCount = config.banner.split("\n").length;
for (let i = 0; i < bannerLineCount; i++) {
// @ts-expect-error - internal property
// eslint-disable-next-line
sourcemap._map._mappings.unshift([]);
}
sourcemap.shift(config.banner.split("\n").length);
}

await Promise.all([
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ekscss/cli",
"version": "0.0.21",
"version": "0.0.22-next.0",
"description": "A simple, fast, and powerful CSS preprocessor",
"homepage": "https://ekscss.js.org",
"repository": "github:maxmilton/ekscss",
Expand Down
2 changes: 1 addition & 1 deletion packages/config-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
},
"devDependencies": {
"@ekscss/build-tools": "workspace:*",
"esbuild": "0.28.1"
"esbuild": "0.28.2"
}
}
8 changes: 3 additions & 5 deletions packages/config-loader/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,8 @@ export class ConfigLoader {
return mod.default || mod;
}

if (this.packageJsonCache.has(filePath)) {
return this.packageJsonCache.get(filePath);
}

return JSON.parse(fs.readFileSync(filePath, "utf8"));
return this.packageJsonCache.has(filePath)
? this.packageJsonCache.get(filePath)
: JSON.parse(fs.readFileSync(filePath, "utf8"));
}
}
2 changes: 1 addition & 1 deletion packages/ekscss/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const out1 = await build({
"process.env.BROWSER": "false",
"process.env.NODE_ENV": JSON.stringify(mode),
},
external: ["@jridgewell/gen-mapping", "stylis"],
external: ["@jridgewell/*", "stylis"],
bundle: true,
sourcemap: true,
minify: !isDev,
Expand Down
6 changes: 4 additions & 2 deletions packages/ekscss/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ekscss",
"version": "0.0.23",
"version": "0.0.24-next.0",
"description": "A simple, fast, and powerful CSS preprocessor",
"homepage": "https://ekscss.js.org",
"repository": "github:maxmilton/ekscss",
Expand All @@ -19,12 +19,14 @@
},
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.13",
"@jridgewell/remapping": "^2.3.5",
"@types/stylis": "^4.2.7",
"stylis": "^4.3.6"
},
"devDependencies": {
"@ekscss/build-tools": "workspace:*",
"@ekscss/plugin-null": "workspace:*",
"esbuild": "0.28.1"
"@jridgewell/trace-mapping": "0.3.31",
"esbuild": "0.28.2"
}
}
34 changes: 19 additions & 15 deletions packages/ekscss/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,31 @@ export function compile(

ctx.rootDir = rootDir;
ctx.from = from;
ctx.raw = map ? code : undefined;
ctx.pos = map ? new Map<string | undefined, number[]>() : undefined;
ctx.fn = fn;
ctx.x = x;
ctx.dependencies = dependencies;
ctx.warnings = warnings;

for (const run of beforeBuild) run();
try {
for (const run of beforeBuild) run();

const interpolated = interpolate(code)(xcss, x, fn);
const ast = stylis.compile(interpolated);
const css = stylis.serialize(ast, stylis.middleware(middlewares));
const interpolated = interpolate(code)(xcss, x, fn);
const ast = stylis.compile(interpolated);
const css = stylis.serialize(ast, stylis.middleware(middlewares));

for (const run of afterBuild) run();
for (const run of afterBuild) run();

// @ts-expect-error - reset ctx to initial state
// dprint-ignore
ctx.rootDir = ctx.from = ctx.fn = ctx.x = ctx.dependencies = ctx.warnings = undefined; // eslint-disable-line no-multi-assign

return {
css,
map: map ? compileSourceMap(code, ast, rootDir, from, to, warnings) : undefined,
dependencies,
warnings,
};
return {
css,
map: map ? compileSourceMap(interpolated, ast, to) : undefined,
dependencies,
warnings,
};
} finally {
// @ts-expect-error - reset ctx for next compile
// biome-ignore format: Reset ctx
ctx.rootDir = ctx.from = ctx.raw = ctx.pos = ctx.fn = ctx.x = ctx.dependencies = ctx.warnings = undefined; // eslint-disable-line no-multi-assign
}
}
Loading
Loading