@serenity-is/tsbuild 10.2.3 → 10.3.2

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/index.d.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  import esbuild from "esbuild";
2
- import { type GlobOptions } from "glob";
3
2
  export declare const defaultEntryPointGlobs: string[];
4
3
  /**
5
4
  * Default mapping for importing modules as globals. corelib, domwise, extensions, pro.extensions, sleekgrid
6
5
  * are all mapped to Serenity global namespace */
7
6
  export declare const importAsGlobalsMapping: Record<string, string>;
8
- export declare function safeGlobSync(globs: string[], options?: Omit<GlobOptions, "ignore">): string[];
7
+ /** Safely performs a glob search, preventing path traversal and returns matching file paths.
8
+ * @param options The arguments passed to the glob engine (currently tinyglobby)
9
+ */
10
+ export declare function safeGlobSync(globs: string[], options?: any): string[];
9
11
  /** Default esbuild options used by TSBuild */
10
12
  export declare const tsbuildDefaults: Partial<import("esbuild").BuildOptions>;
11
13
  export interface TSBuildOptions extends Partial<import("esbuild").BuildOptions> {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { init as esmlInit, parse as esmlParse } from "es-module-lexer";
2
2
  import esbuild from "esbuild";
3
3
  import { createReadStream, createWriteStream, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
4
- import { globSync } from "glob";
4
+ import { globSync } from "tinyglobby";
5
5
  import pipe from "node:stream/promises";
6
6
  import { constants, createBrotliCompress, createGzip } from "node:zlib";
7
7
  import { dirname, isAbsolute, join, resolve, sep } from "path";
@@ -40,9 +40,7 @@ export function safeGlobSync(globs, options = {}) {
40
40
  const includes = globs.filter((x) => !x.startsWith("!")).map(normalizePattern);
41
41
  const excludes = globs.filter((x) => x.startsWith("!")).map((x) => normalizePattern(x.substring(1)));
42
42
  const results = globSync(includes, {
43
- nodir: true,
44
43
  ignore: excludes,
45
- matchBase: true,
46
44
  cwd: root,
47
45
  ...options
48
46
  });
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@serenity-is/tsbuild",
3
- "version": "10.2.3",
3
+ "version": "10.3.2",
4
4
  "author": "Serenity (https://serenity.is)",
5
5
  "bugs": "https://github.com/serenity-is/serenity/issues",
6
6
  "description": "Serenity ESBuild functions",
7
7
  "dependencies": {
8
- "esbuild": "0.27.4",
9
- "es-module-lexer": "2.0.0",
10
- "glob": "13.0.6"
8
+ "esbuild": "0.28.1",
9
+ "es-module-lexer": "2.1.0",
10
+ "tinyglobby": "0.2.17"
11
11
  },
12
12
  "exports": {
13
13
  ".": {
@@ -30,7 +30,10 @@
30
30
  "esbuild"
31
31
  ],
32
32
  "license": "MIT",
33
- "repository": "https://github.com/serenity-is/serenity/packages/tsbuild",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/serenity-is/serenity/packages/tsbuild"
36
+ },
34
37
  "type": "module",
35
38
  "types": "dist/index.d.ts"
36
39
  }