diff --git a/.changeset/ninety-windows-turn.md b/.changeset/ninety-windows-turn.md new file mode 100644 index 0000000..ac9b2bf --- /dev/null +++ b/.changeset/ninety-windows-turn.md @@ -0,0 +1,5 @@ +--- +"scalawind": patch +--- + +refactor code to use pipe pattern for transform source diff --git a/package.json b/package.json index 8986d42..19c02be 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "tsup": "^6.5.0", "turbo": "^2.0.4" }, - "packageManager": "pnpm@9.4.0", + "packageManager": "pnpm@9.15.0", "engines": { "node": ">=18" } diff --git a/packages/scalawind/package.json b/packages/scalawind/package.json index c023671..6ac0508 100644 --- a/packages/scalawind/package.json +++ b/packages/scalawind/package.json @@ -40,7 +40,7 @@ "@swc/cli": "^0.1.62", "@swc/jest": "^0.2.26", "@swc/register": "^0.1.10", - "bun": "^1.1.11", + "bun": "^1.1.40", "tailwindcss": "^3.4.3" }, "engines": { diff --git a/packages/scalawind/src/source-transform.js b/packages/scalawind/src/source-transform.js new file mode 100644 index 0000000..4d516c1 --- /dev/null +++ b/packages/scalawind/src/source-transform.js @@ -0,0 +1,48 @@ +// THIS FILE IS FOR INTERNAL USAGE, PLEASE IGNORE THIS FILE + +import { extractTw } from './transform'; + +function convertCamelCaseToSnakeCase(methodName) { + const units = ["px", "pc", "vh", "tx"]; + + const step1 = methodName.replace(/[A-Z]/g, match => `_${match.toLowerCase()}`); + + const step2 = step1.replace(/^([:a-z]+)([0-9]+)$/g, (match, p1, p2) => { + if (units.includes(p1)) { + return match; + } else { + return `${p1}_${p2}`; + } + }); + + const step3 = step2.replace(/_([a-z]+)([0-9]+)/g, (match, p1, p2) => { + if (units.includes(p1)) { + return match; + } else { + return `_${p1}_${p2}`; + } + }); + + return step3.toLowerCase(); +} + +function toSnakeCase(methodName) { + if (/^px[0-9]+$/.test(methodName)) { + return `px_${methodName.substring(2)}`; + } else { + return convertCamelCaseToSnakeCase(methodName); + } +} + +export function transformSource(source) { + try { + return extractTw(source, toSnakeCase); + } catch (error) { + console.error("Error transforming source:", error); + throw error; + } +} + +export const scalaSourceTransform = { + scala: (content) => transformSource(content), +}; diff --git a/packages/scalawind/src/transform.js b/packages/scalawind/src/transform.js index ea808e8..2126e7c 100644 --- a/packages/scalawind/src/transform.js +++ b/packages/scalawind/src/transform.js @@ -1,7 +1,13 @@ +// Utility function for pipe pattern +const pipe = + (...fns) => + (input) => + fns.reduce((result, fn) => fn(result), input); +// Patterns and replacements const PATTERNS = { TW: /tw(?:\s*\.(?:`[a-zA-Z0-9_/.]+`|[a-zA-Z0-9_¥#/€\[\]§⌇"]+)|\s*\((?:[^)(]+|\((?:[^)(]+|\((?:[^)(]+|\((?:[^)(]+|\((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\))*\))*\))*\))*\))+/g, - TW_REPLACE: /tw\.|\.|_|`|§|"/g, + TW_REPLACE: /tw\.|\.|`|§|"/g, MULTILINE: /\n\s+(?=(?:[^"]*"[^"]*")*[^"]*$)/g, BACKTICK: /`([^`]*)`/g, ARBITRARY: /_\(("[^"]+")?\)/g, @@ -10,49 +16,14 @@ const PATTERNS = { }; const REPLACEMENTS = { - 'tw.': '', - '.': ' ', - '_': '-', - '`': '', - '§': '.', - '"': '', + "tw.": "", + ".": " ", + "`": "", + "§": ".", + '"': "", }; -function replaceSpecialCases(source) { - return source.replace(/_2xl/g, '2xl'); -} - -function handleArbitraryValues(source) { - return source.replace(PATTERNS.ARBITRARY, (match, content) => { - if (content) { - return '_¥' + content.replace(/_/g, '⌇') + '¥'; - } - return match; - }); -} - -function handleOpacityValues(source) { - return source.replace(PATTERNS.OPACITY, (match, content) => { - if (content) { - content = content.replace(/\./g, '§'); - return '/€' + content + '€'; - } - return match; - }); -} - -function handleVariantTransform(source) { - return source.replace(PATTERNS.VARIANT_TRANSFORM, (match, selector, content) => { - const safeSelector = selector.replace(/[().]/g, char => ({ - '(': '《', - ')': '》', - '.': '§' - })[char]); - return `[${safeSelector}](${content})`; - }); -} - -function flattenClasses(twString) { +const flattenClasses = (twString) => { const classes = []; const stack = []; let currentClass = ""; @@ -71,7 +42,9 @@ function flattenClasses(twString) { stack.pop(); } else if (char === " ") { if (currentClass) { - classes.push(stack.length ? `${stack.join(":")}:${currentClass}` : currentClass); + classes.push( + stack.length ? `${stack.join(":")}:${currentClass}` : currentClass + ); currentClass = ""; } } else { @@ -80,64 +53,105 @@ function flattenClasses(twString) { } if (currentClass) { - classes.push(stack.length ? `${stack.join(":")}:${currentClass}` : currentClass); + classes.push( + stack.length ? `${stack.join(":")}:${currentClass}` : currentClass + ); } - return classes.join(" ") - .replace(/¥([^¥]+)¥/g, '[$1]') - .replace(/€([^€]+)€/g, '$1') - .replace(/important:|《|》|raw:|⌇/g, match => ({ - 'important:': '!', - '《': '(', - '》': ')', - 'raw:': '', - '⌇': '_' - })[match]) -} - -function preprocessSource(source) { - try { - let processed = replaceSpecialCases(source); - processed = handleArbitraryValues(processed); - processed = handleOpacityValues(processed); - return processed; - } catch (error) { - console.error('Error preprocessing source:', error); - throw error; - } -} + return classes; +}; -function extractTw(source) { +// Main function to extract and process TW +export const extractTw = (source, customClassTransformer = input => input) => { try { - const preprocessed = preprocessSource(source); - const matches = preprocessed.match(PATTERNS.TW); - - if (!matches) { - return []; - } - - return matches.map(match => { - return flattenClasses(handleVariantTransform(match).replace(PATTERNS.MULTILINE, '').replace(PATTERNS.BACKTICK, (_, content) => { - return '`' + content.replace(/\./g, '§') + '`'; - }).replace(PATTERNS.TW_REPLACE, match => REPLACEMENTS[match])); - }); + return pipe( + (source) => source.replace(/_2xl/g, "2xl"), + (source) => + source.replace(PATTERNS.ARBITRARY, (match, content) => { + if (content) { + return "_¥" + content.replace(/_/g, "⌇") + "¥"; + } + return match; + }), + (source) => + source.replace(PATTERNS.OPACITY, (match, content) => { + if (content) { + content = content.replace(/\./g, "§"); + return "/€" + content + "€"; + } + return match; + }), + (source) => source.match(PATTERNS.TW) || [], + (matches) => + matches.flatMap((match) => + pipe( + (source) => + source.replace( + PATTERNS.VARIANT_TRANSFORM, + (_, selector, content) => { + const safeSelector = selector.replace( + /[().]/g, + (char) => + ({ + "(": "《", + ")": "》", + ".": "§", + }[char]) + ); + return `[${safeSelector}](${content})`; + } + ), + (source) => source.replace(PATTERNS.MULTILINE, ""), + (source) => + source.replace( + PATTERNS.BACKTICK, + (_, content) => "`" + content.replace(/\./g, "§") + "`" + ), + (source) => + source.replace(PATTERNS.TW_REPLACE, (match) => REPLACEMENTS[match]), + flattenClasses + )(match) + ), + (classes) => [...new Set(classes)], + (classes) => classes.map(cls => customClassTransformer(cls)), + (classes) => classes.map(cls => cls.replace(/_/g, "-")), + (classes) => classes.join(" "), + (step) => step.replace(/¥([^¥]+)¥/g, "[$1]"), + (step) => step.replace(/€([^€]+)€/g, "$1"), + (step) => + step.replace( + /important:|《|》|raw:|⌇/g, + (match) => + ({ + "important:": "!", + "《": "(", + "》": ")", + "raw:": "", + "⌇": "_", + }[match]) + ) + )(source); } catch (error) { - console.error('Error extracting tw:', error); + console.error("Error extracting tw:", error); throw error; } -} +}; export function transformSource(source) { try { - return extractTw(source).join(" "); + return extractTw(source); } catch (error) { - console.error('Error transforming source:', error); + console.error("Error transforming source:", error); throw error; } } export const scalaSourceTransform = { scala: (content) => { - return transformSource(content) - } -} + const transformed = transformSource(content) + return `${content} + + ${transformed} + ` + }, +}; diff --git a/packages/scalawind/tests/source-transform.test.js b/packages/scalawind/tests/source-transform.test.js new file mode 100644 index 0000000..6d146c6 --- /dev/null +++ b/packages/scalawind/tests/source-transform.test.js @@ -0,0 +1,311 @@ +// THIS FILE IS FOR INTERNAL USAGE, PLEASE IGNORE THIS FILE + +import { expect, test, describe } from "bun:test"; +import { transformSource } from "../src/source-transform"; + +describe("source transform scala source", () => { + test("case 1", () => { + const source = ` + tw.bgRed500.p4 + `; + const actual = transformSource(source); + const expected = "bg-red-500 p-4"; + expect(actual).toBe(expected); + }); + + test("case 2", () => { + const source = ` + tw.raw("bg-red-500 p-4") + `; + const actual = transformSource(source); + const expected = "bg-red-500 p-4"; + expect(actual).toBe(expected); + }); + + test("case 3", () => { + const source = ` + tw.fontSans.grid + .gridRows_("20px_1fr_20px") + .itemsCenter + .justifyItemsCenter + .minHScreen + .p8 + .pb20 + .gap16 + .sm(tw.p20) + `; + const actual = transformSource(source); + const expected = + "font-sans grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20"; + expect(actual).toBe(expected); + }); + + test("case 4", () => { + const source = ` + tw.text_("#ff0") + tw.flex.text_("#ff0").itemsCenter.bg_("#00f") + `; + const actual = transformSource(source); + const expected = "text-[#ff0] flex items-center bg-[#00f]"; + expect(actual).toBe(expected); + }); + + test("case 5", () => { + const source = ` + tw.text_("#ff0") + tw.flex.text_("#ff0").itemsCenter.bg_("#00f") + `; + const actual = transformSource(source); + const expected = "text-[#ff0] flex items-center bg-[#00f]"; + expect(actual).toBe(expected); + }); + + test("case 6", () => { + const source = ` + tw.flex.flex_col.variant("&:nth-child(3)", tw.underline.flex).items_center.justify_center + `; + const actual = transformSource(source); + const expected = + "flex flex-col [&:nth-child(3)]:underline [&:nth-child(3)]:flex items-center justify-center"; + expect(actual).toBe(expected); + }); + + test("case 7", () => { + const source = ` + tw.lg(tw.variant("&:nth-child(3)", tw.hover(tw.underline))) + `; + const actual = transformSource(source); + const expected = "lg:[&:nth-child(3)]:hover:underline"; + expect(actual).toBe(expected); + }); + + test("case 8", () => { + const source = ` + tw.variant("&:nth-child(3)", tw.underline).listDisc.mx5.textWhite + `; + const actual = transformSource(source); + const expected = "[&:nth-child(3)]:underline list-disc mx-5 text-white"; + expect(actual).toBe(expected); + }); + + test("case 9", () => { + const source = ` + tw.variant("&:nth-child(3)", tw.underline) + `; + const actual = transformSource(source); + const expected = "[&:nth-child(3)]:underline"; + expect(actual).toBe(expected); + }); + + test("case 10", () => { + const source = ` + tw.variant("&:is(.foo, .bar)", + tw.underline) + .p4 + `; + const actual = transformSource(source); + const expected = "[&:is(.foo, .bar)]:underline p-4"; + expect(actual).toBe(expected); + }); + + test("case 11", () => { + const source = ` + tw.important(tw.textRed400) + `; + const actual = transformSource(source); + const expected = "!text-red-400"; + expect(actual).toBe(expected); + }); + + test("case 12", () => { + const source = ` + tw.textRed400$("10") + `; + const actual = transformSource(source); + const expected = "text-red-400/10"; + expect(actual).toBe(expected); + }); + + test("case 12", () => { + const source = ` + tw.bgBlack$("[.05]") + `; + const actual = transformSource(source); + const expected = "bg-black/[.05]"; + expect(actual).toBe(expected); + }); + test("case 13", () => { + const source = ` + tw.fontBold.textRed400$("10").bgGreen500$("20").hover(tw.textBlack) + `; + const actual = transformSource(source); + const expected = "font-bold text-red-400/10 bg-green-500/20 hover:text-black"; + expect(actual).toBe(expected); + }); + test("case 14", () => { + const source = ` + tw.sm(tw.hover(tw.important(tw.fontBold))) + `; + const actual = transformSource(source); + const expected = "sm:hover:!font-bold"; + expect(actual).toBe(expected); + }); + test("case 15", () => { + const source = "tw.`w_1/2`"; + const actual = transformSource(source); + const expected = "w-1/2"; + expect(actual).toBe(expected); + }); + test("case 16", () => { + const source = "tw.hover(tw.`w_1/2`)"; + const actual = transformSource(source); + const expected = "hover:w-1/2"; + expect(actual).toBe(expected); + }); + + test("case 17", () => { + const source = ` + div( + div( + tw.my24.textCenter.text20.leading32.textGray8.wFull.fontSemiBold, + "scalawind" + ) + ) + `; + const actual = transformSource(source); + const expected = "my-24 text-center text-20 leading-32 text-gray-8 w-full font-semi-bold"; + expect(actual).toBe(expected); + }); + + test("case 17", () => { + const source = ` + div( + div( + tw.flex, + "scalawind" + ), + div( + tw.itemsCenter.hover(tw.text20) + ) + ) + `; + const actual = transformSource(source); + const expected = "flex items-center hover:text-20"; + expect(actual).toBe(expected); + }); + + test("case 18", () => { + const source = ` + div( + tw.bgRed500.p4.hover(tw.bgBlue500).md(tw.focus(tw.bgGreen500.textWhite)).flex.flexCol.gap10 + ) + `; + const actual = transformSource(source); + const expected = "bg-red-500 p-4 hover:bg-blue-500 md:focus:bg-green-500 md:focus:text-white flex flex-col gap-10"; + expect(actual).toBe(expected); + }); + + test("case 19", () => { + const source = "tw.`w_1.5`"; + const actual = transformSource(source); + const expected = "w-1.5"; + expect(actual).toBe(expected); + }); + + test("case 20", () => { + const source = "tw.bgBlue500.hover(tw.bgBlue600).firstLetter(tw.textRed500.fontBold).textWhite.rounded.py3.px4.md(tw.py4.px5).dark(tw.bgSky900.hover(tw.bgSky800))"; + const actual = transformSource(source); + const expected = "bg-blue-500 hover:bg-blue-600 first-letter:text-red-500 first-letter:font-bold text-white rounded py-3 px-4 md:py-4 md:px-5 dark:bg-sky-900 dark:hover:bg-sky-800"; + expect(actual).toBe(expected); + }); + + test("case 21", () => { + const source = ` + tw.roundedFull.border.borderSolid.borderTransparent.transitionColors.flex.itemsCenter.justifyCenter.bgForeground.textBackground.gap2 + .hover(tw.bg_("#383838")) + .dark(tw.hover(tw.bg_("#333"))) + .textSm + .sm(tw.textBase) + .h10 + .sm(tw.h12) + .px4 + .sm(tw.px5) + ` + const actual = transformSource(source); + const expected = "rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#333] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"; + expect(actual).toBe(expected); + }); + + test("case negative value", () => { + const source = "tw._left_1"; + const actual = transformSource(source); + const expected = "-left-1"; + expect(actual).toBe(expected); + }); + + test("nested 1 level", () => { + const source = ` + tw.hover(tw.bgRed500) + tw.flex.hover(tw.bgRed500) + tw.flex.hover(tw.bgRed500).p4 + `; + const actual = transformSource(source); + const expected = "hover:bg-red-500 flex p-4"; + expect(actual).toBe(expected); + }); + + + test("nested 2 level", () => { + const source = ` + tw.md(tw.hover(tw.bgRed500)) + `; + const actual = transformSource(source); + const expected = "md:hover:bg-red-500"; + expect(actual).toBe(expected); + }); + + test("nested 3 level", () => { + const source = ` + tw.md(tw.hover(tw.focus(tw.bgRed500))) + `; + const actual = transformSource(source); + const expected = "md:hover:focus:bg-red-500"; + expect(actual).toBe(expected); + }); + + test("nested 4 level", () => { + const source = ` + tw.md(tw.hover(tw.focus(tw.active(tw.bgRed500)))) + `; + const actual = transformSource(source); + const expected = "md:hover:focus:active:bg-red-500"; + expect(actual).toBe(expected); + }); + + test("nested 5 level", () => { + const source = ` + tw.md(tw.hover(tw.focus(tw.active(tw.groupHover(tw.bgRed500))))) + `; + const actual = transformSource(source); + const expected = "md:hover:focus:active:group-hover:bg-red-500"; + expect(actual).toBe(expected); + }); + + test("nested 6 level", () => { + const source = ` + tw.md(tw.hover(tw.focus(tw.active(tw.groupHover(tw.disabled(tw.bgRed500)))))) + `; + const actual = transformSource(source); + const expected = "md:hover:focus:active:group-hover:disabled:bg-red-500"; + expect(actual).toBe(expected); + }); + + test("nested 7 level", () => { + const source = ` + tw.dark(tw.md(tw.hover(tw.focus(tw.active(tw.groupHover(tw.disabled(tw.bgRed500))))))) + `; + const actual = transformSource(source); + const expected = "dark:md:hover:focus:active:group-hover:disabled:bg-red-500"; + expect(actual).toBe(expected); + }); +}); diff --git a/packages/scalawind/tests/transform.test.js b/packages/scalawind/tests/transform.test.js index 1d3d928..469b16b 100644 --- a/packages/scalawind/tests/transform.test.js +++ b/packages/scalawind/tests/transform.test.js @@ -1,5 +1,5 @@ import { expect, test, describe } from "bun:test"; -import { transformSource } from "../src/transform"; +import { transformSource, scalaSourceTransform } from "../src/transform"; describe("transform scala source", () => { test("case 1", () => { @@ -44,7 +44,7 @@ describe("transform scala source", () => { tw.flex.text_("#ff0").items_center.bg_("#00f") `; const actual = transformSource(source); - const expected = "text-[#ff0] flex text-[#ff0] items-center bg-[#00f]"; + const expected = "text-[#ff0] flex items-center bg-[#00f]"; expect(actual).toBe(expected); }); @@ -54,7 +54,7 @@ describe("transform scala source", () => { tw.flex.text_("#ff0").items_center.bg_("#00f") `; const actual = transformSource(source); - const expected = "text-[#ff0] flex text-[#ff0] items-center bg-[#00f]"; + const expected = "text-[#ff0] flex items-center bg-[#00f]"; expect(actual).toBe(expected); }); @@ -247,7 +247,7 @@ describe("transform scala source", () => { tw.flex.hover(tw.bg_red_500).p_4 `; const actual = transformSource(source); - const expected = "hover:bg-red-500 flex hover:bg-red-500 flex hover:bg-red-500 p-4"; + const expected = "hover:bg-red-500 flex p-4"; expect(actual).toBe(expected); }); @@ -305,4 +305,19 @@ describe("transform scala source", () => { const expected = "dark:md:hover:focus:active:group-hover:disabled:bg-red-500"; expect(actual).toBe(expected); }); + + test("should preserve original source", () => { + const source = ` + div( + cls := "bg-red-500", + tw.flex.items_center + ) + `; + const actual = scalaSourceTransform.scala(source) + const expected = `${source} + + flex items-center + ` + expect(actual).toBe(expected); + }) }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4dffe83..8594ba5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,8 +58,8 @@ importers: specifier: ^0.1.10 version: 0.1.10(@swc/core@1.5.24) bun: - specifier: ^1.1.11 - version: 1.1.11 + specifier: ^1.1.40 + version: 1.1.40 tailwindcss: specifier: ^3.4.3 version: 3.4.3(ts-node@10.9.1(@swc/core@1.5.24)(typescript@5.3.3)) @@ -333,43 +333,58 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@oven/bun-darwin-aarch64@1.1.11': - resolution: {integrity: sha512-0BjqpB2cVoLmjsE0e+VYJY4/qf2X/42b4NE+etITX0IR4WFk1aaOSHctsS/akN/H3bLqb+tC/VrN08dTAvf+XA==} + '@oven/bun-darwin-aarch64@1.1.40': + resolution: {integrity: sha512-FFg771OiWe2o8Wi7uTgHKI8xD6/AZnsOUSiijoFmLHekXQfC8Y2eeBi6GmEIeJpWdFIpZ0kEfSb+GZLhvMgKLQ==} cpu: [arm64] os: [darwin] - '@oven/bun-darwin-x64-baseline@1.1.11': - resolution: {integrity: sha512-2gHpzfT1UpfcCQVLoeGRN7oOAsWju6IC4rocTsThW6TGShJ3yG1RlgCwbz1DvZQ6s2dGiFo/rmobDgXhUHmRMg==} + '@oven/bun-darwin-x64-baseline@1.1.40': + resolution: {integrity: sha512-LQOu4yaToi/ajAldRtQJ+BpMaEOoat6X/g8umFMtvTNXgeVm86u8l4BM96tRj+E2jGD6KGmgmQK/UZkjewPdlQ==} cpu: [x64] os: [darwin] - '@oven/bun-darwin-x64@1.1.11': - resolution: {integrity: sha512-Op6eKHqvHRpwv0AIx/q/DC6Jr72dJx9gkyJf6nriWqzrMC0rPEY6thHWAEPcoHcIucmWHKz31v7xQlB4oFbk8A==} + '@oven/bun-darwin-x64@1.1.40': + resolution: {integrity: sha512-nqYduEVUL5vBqDWJMULIM59RnS38TkhB0ZkLLXUUnXRIzzMqRuQ9fF1mxGAiskOo7m/539vG/+FbGA/KspKz7g==} cpu: [x64] os: [darwin] - '@oven/bun-linux-aarch64@1.1.11': - resolution: {integrity: sha512-Lm7Ze3rBe3Pb8sAgy3t1ukM4jydUl5bG6unQzqzMe6nyYRb3IeTsR+pvOmsRX11SKMQ8geXNLf3SiWb0PsNJKA==} + '@oven/bun-linux-aarch64-musl@1.1.40': + resolution: {integrity: sha512-mj6tMnyTjsBGAvYMgR5FPQtlQHtixEQIRKgXZz/V+2mgtTuP1Q7cnBm/BHs0FnAeP/vPea3ZJeYbbq8An3ykLg==} + cpu: [aarch64] + os: [linux] + + '@oven/bun-linux-aarch64@1.1.40': + resolution: {integrity: sha512-MUqNFI8iHWnMCCjJqa/YcQ4XhegZuJv2uR4RHGg3ItC+RgS9MT9c6qN0qKF50OY+8ajO9tLDosObBOExLW1V5w==} cpu: [arm64] os: [linux] - '@oven/bun-linux-x64-baseline@1.1.11': - resolution: {integrity: sha512-muMY5wWiVzjqmwZfVGcL/kbRNf1N3MBHjppxKqMCRFbx5NvVgbLX1l/8K/nKbPxKdlycRL+iGMxEU/IqaFgzKA==} + '@oven/bun-linux-x64-baseline@1.1.40': + resolution: {integrity: sha512-59SRLL4//kFCQYATXPrwLQlz3S1dZTLvhLMdxOT7yy8zz/7dbsE5Wh7bP2xf74EH5267ebbz+XS91J6XQAPFOw==} + cpu: [x64] + os: [linux] + + '@oven/bun-linux-x64-musl-baseline@1.1.40': + resolution: {integrity: sha512-/bTOgcgv6elAh4ciiFc9PM7qTAokdF7ZHg97FV8dAd+PtdEOrHP8A7eta1dVr+rGZ0z+sZumS2wCdapTHFcutg==} + cpu: [x64] + os: [linux] + + '@oven/bun-linux-x64-musl@1.1.40': + resolution: {integrity: sha512-OuSylDbtriB65+Awph4GtDk6xVMFp3K8AtlMTq/ihKUCp3/CQZK1fCAOPQuxjQicibYFtDiti3CpjjCEaqPhGA==} cpu: [x64] os: [linux] - '@oven/bun-linux-x64@1.1.11': - resolution: {integrity: sha512-Y32aNWKcdkAesleKVLy8VidjGthEN4btPNdqvdaF06aSdbaj7eykrUGL795BpUk3r2plKgooUit+XfDsWBrG6A==} + '@oven/bun-linux-x64@1.1.40': + resolution: {integrity: sha512-HbUYuqplqssmkZW5xdTWJLVQK6OVfC1boO8qRmSYMb1uN8CCUdw3o9PaVswlPQVHHLj/jchYdMAmoYhfun8ROg==} cpu: [x64] os: [linux] - '@oven/bun-windows-x64-baseline@1.1.11': - resolution: {integrity: sha512-HcfFFWsGl2xAT9UzDb+iWVIjZ97aABKte6Y3bZ7ef0upLIS2DyewZi4zJL7olrjELrDauJb+oMO3MmiKZpwzbQ==} + '@oven/bun-windows-x64-baseline@1.1.40': + resolution: {integrity: sha512-jZTK6eWVNgVxyCV2klEySlY0UY+vLWe4pddkn47us7SZSk0NkUWvwB0R6erqMC5NFKmiYOmPRUozKS1kGuFudw==} cpu: [x64] os: [win32] - '@oven/bun-windows-x64@1.1.11': - resolution: {integrity: sha512-VYtFJAT/sS/lc4Tt0mVDgPoPATyMUjAaepD258AWSTuqWeuM6O3CZiPEjQR2F6WFIEUfCZuQwCLNnVztsyF/6g==} + '@oven/bun-windows-x64@1.1.40': + resolution: {integrity: sha512-JpRLqy6S/t/Y+TAxcY5XU9CyfLaw85lpmvYXi2fQqJcOMaKHQsxutSuNDW/uoZbqI/GVj11XseDGGR6oYexAQA==} cpu: [x64] os: [win32] @@ -655,8 +670,9 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - bun@1.1.11: - resolution: {integrity: sha512-xWoJ0ss+a6HtO/tIECvZ28j4Vg2FKXqo0UoORzSCcCBcp5hn/RphZiDkRf5CDR5KIq4g9IIHdCI/NF67nyk0wQ==} + bun@1.1.40: + resolution: {integrity: sha512-7sxXBCSa6xmnMPArYPWjQpMG7a0AUs1mRMTeC37326ippV+yY76qor2wZpzXNqfQkVXenoEIJ7etx51OMIErHw==} + cpu: [arm64, x64, aarch64] os: [darwin, linux, win32] hasBin: true @@ -2564,28 +2580,37 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 - '@oven/bun-darwin-aarch64@1.1.11': + '@oven/bun-darwin-aarch64@1.1.40': + optional: true + + '@oven/bun-darwin-x64-baseline@1.1.40': + optional: true + + '@oven/bun-darwin-x64@1.1.40': + optional: true + + '@oven/bun-linux-aarch64-musl@1.1.40': optional: true - '@oven/bun-darwin-x64-baseline@1.1.11': + '@oven/bun-linux-aarch64@1.1.40': optional: true - '@oven/bun-darwin-x64@1.1.11': + '@oven/bun-linux-x64-baseline@1.1.40': optional: true - '@oven/bun-linux-aarch64@1.1.11': + '@oven/bun-linux-x64-musl-baseline@1.1.40': optional: true - '@oven/bun-linux-x64-baseline@1.1.11': + '@oven/bun-linux-x64-musl@1.1.40': optional: true - '@oven/bun-linux-x64@1.1.11': + '@oven/bun-linux-x64@1.1.40': optional: true - '@oven/bun-windows-x64-baseline@1.1.11': + '@oven/bun-windows-x64-baseline@1.1.40': optional: true - '@oven/bun-windows-x64@1.1.11': + '@oven/bun-windows-x64@1.1.40': optional: true '@pkgjs/parseargs@0.11.0': @@ -2843,16 +2868,19 @@ snapshots: buffer-from@1.1.2: {} - bun@1.1.11: + bun@1.1.40: optionalDependencies: - '@oven/bun-darwin-aarch64': 1.1.11 - '@oven/bun-darwin-x64': 1.1.11 - '@oven/bun-darwin-x64-baseline': 1.1.11 - '@oven/bun-linux-aarch64': 1.1.11 - '@oven/bun-linux-x64': 1.1.11 - '@oven/bun-linux-x64-baseline': 1.1.11 - '@oven/bun-windows-x64': 1.1.11 - '@oven/bun-windows-x64-baseline': 1.1.11 + '@oven/bun-darwin-aarch64': 1.1.40 + '@oven/bun-darwin-x64': 1.1.40 + '@oven/bun-darwin-x64-baseline': 1.1.40 + '@oven/bun-linux-aarch64': 1.1.40 + '@oven/bun-linux-aarch64-musl': 1.1.40 + '@oven/bun-linux-x64': 1.1.40 + '@oven/bun-linux-x64-baseline': 1.1.40 + '@oven/bun-linux-x64-musl': 1.1.40 + '@oven/bun-linux-x64-musl-baseline': 1.1.40 + '@oven/bun-windows-x64': 1.1.40 + '@oven/bun-windows-x64-baseline': 1.1.40 bundle-require@4.1.0(esbuild@0.17.19): dependencies: