@delance/builder 0.3.4 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -94,7 +94,7 @@ if (!process.isBun) {
94
94
  async function main(argv2) {
95
95
  debug.enable("*,-babel");
96
96
  const cwd = argv2.pop();
97
- for await (const x of new Bun.Glob("{!browser,*}.bundle.js").scan({ absolute: true, cwd })) {
97
+ for await (const x of new Bun.Glob("{!browser}*.bundle.js").scan({ absolute: true, cwd })) {
98
98
  console.group(`${magenta("> build")} ${dim(x)}`);
99
99
  const label = `${bgBlue(white(" Processed "))} ${dim(x)}`;
100
100
  console.time(label);
package/dist/index.js CHANGED
@@ -101,10 +101,10 @@ function codePreview(node) {
101
101
  var import_traverse3 = __toESM(require_traverse(), 1);
102
102
  import * as t14 from "@babel/types";
103
103
 
104
- // node_modules/@codemod/matchers/dist/matchers/anyExpression.js
104
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/anyExpression.js
105
105
  import * as t2 from "@babel/types";
106
106
 
107
- // node_modules/@codemod/matchers/dist/matchers/Matcher.js
107
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/Matcher.js
108
108
  class Matcher {
109
109
  match(value, keys = []) {
110
110
  return this.matchValue(value, keys);
@@ -114,7 +114,7 @@ class Matcher {
114
114
  }
115
115
  }
116
116
 
117
- // node_modules/@codemod/matchers/dist/matchers/anyExpression.js
117
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/anyExpression.js
118
118
  class AnyExpressionMatcher extends Matcher {
119
119
  matchValue(value) {
120
120
  return t2.isNode(value) && t2.isExpression(value);
@@ -123,7 +123,7 @@ class AnyExpressionMatcher extends Matcher {
123
123
  function anyExpression() {
124
124
  return new AnyExpressionMatcher;
125
125
  }
126
- // node_modules/@codemod/matchers/dist/utils/distributeAcrossSlices.js
126
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/utils/distributeAcrossSlices.js
127
127
  function* distributeAcrossSlices(slices, available) {
128
128
  if (slices.length === 0) {
129
129
  yield [];
@@ -143,7 +143,7 @@ function* distributeAcrossSlices(slices, available) {
143
143
  }
144
144
  }
145
145
 
146
- // node_modules/@codemod/matchers/dist/matchers/anything.js
146
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/anything.js
147
147
  class AnythingMatcher extends Matcher {
148
148
  matchValue(value) {
149
149
  return true;
@@ -153,7 +153,7 @@ function anything() {
153
153
  return new AnythingMatcher;
154
154
  }
155
155
 
156
- // node_modules/@codemod/matchers/dist/matchers/slice.js
156
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/slice.js
157
157
  class SliceMatcher extends Matcher {
158
158
  min;
159
159
  max;
@@ -192,7 +192,7 @@ function slice(optionsOrLength, matcherOrUndefined) {
192
192
  return new SliceMatcher(min, max, matcher);
193
193
  }
194
194
 
195
- // node_modules/@codemod/matchers/dist/matchers/anyList.js
195
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/anyList.js
196
196
  class AnyListMatcher extends Matcher {
197
197
  matchers;
198
198
  sliceMatchers = [];
@@ -249,11 +249,11 @@ class AnyListMatcher extends Matcher {
249
249
  function anyList(...elements) {
250
250
  return new AnyListMatcher(elements);
251
251
  }
252
- // node_modules/@codemod/matchers/dist/matchers/anyNode.js
252
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/anyNode.js
253
253
  import * as t3 from "@babel/types";
254
- // node_modules/@codemod/matchers/dist/matchers/anyStatement.js
254
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/anyStatement.js
255
255
  import * as t4 from "@babel/types";
256
- // node_modules/@codemod/matchers/dist/matchers/anyString.js
256
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/anyString.js
257
257
  class StringMatcher extends Matcher {
258
258
  matchValue(value) {
259
259
  return typeof value === "string" || value instanceof String;
@@ -262,7 +262,7 @@ class StringMatcher extends Matcher {
262
262
  function anyString() {
263
263
  return new StringMatcher;
264
264
  }
265
- // node_modules/@codemod/matchers/dist/matchers/arrayOf.js
265
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/arrayOf.js
266
266
  class ArrayOfMatcher extends Matcher {
267
267
  elementMatcher;
268
268
  constructor(elementMatcher) {
@@ -284,7 +284,7 @@ class ArrayOfMatcher extends Matcher {
284
284
  function arrayOf(elementMatcher) {
285
285
  return new ArrayOfMatcher(elementMatcher);
286
286
  }
287
- // node_modules/@codemod/matchers/dist/matchers/capture.js
287
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/capture.js
288
288
  class CapturedMatcher extends Matcher {
289
289
  matcher;
290
290
  _current;
@@ -315,7 +315,7 @@ class CapturedMatcher extends Matcher {
315
315
  function capture(matcher) {
316
316
  return new CapturedMatcher(matcher);
317
317
  }
318
- // node_modules/@codemod/matchers/dist/matchers/containerOf.js
318
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/containerOf.js
319
319
  import * as t5 from "@babel/types";
320
320
  class ContainerOfMatcher extends CapturedMatcher {
321
321
  containedMatcher;
@@ -349,18 +349,18 @@ class ContainerOfMatcher extends CapturedMatcher {
349
349
  function containerOf(containedMatcher) {
350
350
  return new ContainerOfMatcher(containedMatcher);
351
351
  }
352
- // node_modules/@codemod-esm/utils/dist/index.js
352
+ // node_modules/.pnpm/@codemod-esm+utils@1.1.2/node_modules/@codemod-esm/utils/dist/index.js
353
353
  import * as Babel from "@babel/core";
354
354
  import * as t10 from "@babel/types";
355
355
 
356
- // node_modules/@codemod-esm/utils/dist/builders.js
356
+ // node_modules/.pnpm/@codemod-esm+utils@1.1.2/node_modules/@codemod-esm/utils/dist/builders.js
357
357
  var import_traverse2 = __toESM(require_traverse(), 1);
358
358
  import * as t6 from "@babel/types";
359
359
 
360
- // node_modules/@codemod-esm/parser/dist/index.js
360
+ // node_modules/.pnpm/@codemod-esm+parser@1.4.3/node_modules/@codemod-esm/parser/dist/index.js
361
361
  import { parse as babelParse2 } from "@babel/parser";
362
362
 
363
- // node_modules/@codemod-esm/parser/dist/options.js
363
+ // node_modules/.pnpm/@codemod-esm+parser@1.4.3/node_modules/@codemod-esm/parser/dist/options.js
364
364
  var DefaultParserPlugins = new Set([
365
365
  "asyncGenerators",
366
366
  "bigInt",
@@ -390,13 +390,13 @@ var DefaultParserPlugins = new Set([
390
390
  ["pipelineOperator", { proposal: "minimal" }],
391
391
  ["recordAndTuple", { syntaxType: "hash" }]
392
392
  ]);
393
- // node_modules/@codemod-esm/utils/dist/js.js
393
+ // node_modules/.pnpm/@codemod-esm+utils@1.1.2/node_modules/@codemod-esm/utils/dist/js.js
394
394
  import * as t8 from "@babel/types";
395
395
 
396
- // node_modules/@codemod-esm/utils/dist/NodeTypes.js
396
+ // node_modules/.pnpm/@codemod-esm+utils@1.1.2/node_modules/@codemod-esm/utils/dist/NodeTypes.js
397
397
  import * as t7 from "@babel/types";
398
398
  var { BUILDER_KEYS, NODE_FIELDS } = t7;
399
- // node_modules/@codemod-esm/utils/dist/nodesEquivalent.js
399
+ // node_modules/.pnpm/@codemod-esm+utils@1.1.2/node_modules/@codemod-esm/utils/dist/nodesEquivalent.js
400
400
  import * as t9 from "@babel/types";
401
401
  function nodesEquivalent(a, b) {
402
402
  if (a === b) {
@@ -442,7 +442,7 @@ function nodesEquivalent(a, b) {
442
442
  }
443
443
  return true;
444
444
  }
445
- // node_modules/@codemod/matchers/dist/matchers/fromCapture.js
445
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/fromCapture.js
446
446
  class FromCaptureMatcher extends Matcher {
447
447
  capturedMatcher;
448
448
  constructor(capturedMatcher) {
@@ -459,10 +459,10 @@ class FromCaptureMatcher extends Matcher {
459
459
  function fromCapture(capturedMatcher) {
460
460
  return new FromCaptureMatcher(capturedMatcher);
461
461
  }
462
- // node_modules/@codemod/matchers/dist/matchers/function.js
462
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/function.js
463
463
  import * as t11 from "@babel/types";
464
464
 
465
- // node_modules/@codemod/matchers/dist/matchers/tupleOf.js
465
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/tupleOf.js
466
466
  class TupleOfMatcher extends Matcher {
467
467
  matchers;
468
468
  constructor(...matchers) {
@@ -490,7 +490,7 @@ function tupleOf(...matchers) {
490
490
  return new TupleOfMatcher(...matchers);
491
491
  }
492
492
 
493
- // node_modules/@codemod/matchers/dist/matchers/function.js
493
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/function.js
494
494
  class FunctionMatcher extends Matcher {
495
495
  params;
496
496
  body;
@@ -521,7 +521,7 @@ class FunctionMatcher extends Matcher {
521
521
  function Function(params, body) {
522
522
  return new FunctionMatcher(params, body);
523
523
  }
524
- // node_modules/@codemod/matchers/dist/matchers/generated.js
524
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/generated.js
525
525
  import * as t12 from "@babel/types";
526
526
  class ArrayExpressionMatcher extends Matcher {
527
527
  elements;
@@ -2261,7 +2261,7 @@ class WhileStatementMatcher extends Matcher {
2261
2261
  function whileStatement(test, body) {
2262
2262
  return new WhileStatementMatcher(test, body);
2263
2263
  }
2264
- // node_modules/@codemod/matchers/dist/matchers/or.js
2264
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/or.js
2265
2265
  class OrMatcher extends Matcher {
2266
2266
  matchersOrValues;
2267
2267
  constructor(...matchersOrValues) {
@@ -2284,7 +2284,7 @@ class OrMatcher extends Matcher {
2284
2284
  function or(...matchersOrValues) {
2285
2285
  return new OrMatcher(...matchersOrValues);
2286
2286
  }
2287
- // node_modules/@codemod/matchers/dist/matchers/predicate.js
2287
+ // node_modules/.pnpm/@codemod-esm+matchers@1.7.2/node_modules/@codemod-esm/matchers/dist/matchers/predicate.js
2288
2288
  class PredicateMatcher extends Matcher {
2289
2289
  predicate;
2290
2290
  constructor(predicate) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@delance/builder",
3
3
  "type": "module",
4
- "version": "0.3.4",
4
+ "version": "0.3.6",
5
5
  "description": "A spear to the Python language server built with black magic",
6
6
  "author": "mochaaP <npm@mochaa.ws>",
7
7
  "license": "0BSD",
@@ -20,18 +20,6 @@
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
23
- "scripts": {
24
- "build": "bun build.ts",
25
- "build:minify": "bun run build --minify --entry-naming [dir]/[name].min.[ext]",
26
- "build:webcrack": "tsc -p ./tsconfig.webcrack.json || :",
27
- "check": "tsc; bun run lint",
28
- "lint": "eslint .",
29
- "lint:fix": "eslint . --fix",
30
- "prebuild": "bun run build:webcrack",
31
- "prepare": "bun run build",
32
- "prepublishOnly": "rm -rf dist",
33
- "start": "bun cli.ts"
34
- },
35
23
  "peerDependencies": {
36
24
  "@babel/code-frame": "^7.26.2",
37
25
  "@babel/helper-validator-identifier": "^7.25.9",
@@ -47,10 +35,10 @@
47
35
  "quickjs-emscripten": "^0.31.0"
48
36
  },
49
37
  "devDependencies": {
50
- "@codemod/core": "npm:@codemod-esm/core@^2.2.1",
51
- "@codemod/matchers": "npm:@codemod-esm/matchers@^1.7.1",
52
- "@codemod/parser": "npm:@codemod-esm/parser@^1.4.2",
53
- "@codemod/utils": "npm:@codemod-esm/utils@^1.1.1",
38
+ "@codemod/core": "npm:@codemod-esm/core@^2.2.2",
39
+ "@codemod/matchers": "npm:@codemod-esm/matchers@^1.7.2",
40
+ "@codemod/parser": "npm:@codemod-esm/parser@^1.4.3",
41
+ "@codemod/utils": "npm:@codemod-esm/utils@^1.1.2",
54
42
  "@mochaa/eslintrc": "^0.1.12",
55
43
  "@types/babel__core": "^7.20.5",
56
44
  "@types/babel__generator": "^7.6.8",
@@ -59,8 +47,19 @@
59
47
  "@types/babel__traverse": "^7.20.6",
60
48
  "@types/bun": "^1.2.4",
61
49
  "@types/debug": "^4.1.12",
50
+ "bun": "^1.2.4",
62
51
  "eslint": "^9.21.0",
63
52
  "typescript": "^5.8.2",
64
53
  "webcrack": "github:j4k0xb/webcrack"
54
+ },
55
+ "scripts": {
56
+ "build": "bun build.ts",
57
+ "build:minify": "bun run build --minify",
58
+ "build:webcrack": "tsc -p ./tsconfig.webcrack.json || :",
59
+ "check": "tsc; bun run lint",
60
+ "lint": "eslint .",
61
+ "lint:fix": "eslint . --fix",
62
+ "prebuild": "bun run build:webcrack",
63
+ "start": "bun cli.ts"
65
64
  }
66
- }
65
+ }
package/types.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import type * as t from '@babel/types';
2
+
3
+ export default function (code: string): Promise<string>;
4
+ export function transform(ast: t.Node): Promise<t.Node>;