@venizia/dev-configs 0.3.5 → 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/compilers/bun.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export declare class BunCompiler {
|
|
|
14
14
|
plugins?: Bun.BunPlugin[];
|
|
15
15
|
/** Compile-time constants: each key is replaced by its value, a JSON-encoded expression, wherever the bundle reads it. */
|
|
16
16
|
define?: Record<string, string>;
|
|
17
|
+
/** Type-check the bundle first; a type error stops the compile. */
|
|
18
|
+
check?: boolean;
|
|
17
19
|
}): Promise<void>;
|
|
18
20
|
}
|
|
19
21
|
//# sourceMappingURL=bun.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../../src/compilers/bun.ts"],"names":[],"mappings":"AAIA,gHAAgH;AAChH,qBAAa,WAAW;IACtB;;;;OAIG;WACU,OAAO,CAClB,IAAI,GAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,6GAA6G;QAC7G,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC;QAC1B,0HAA0H;QAC1H,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../../src/compilers/bun.ts"],"names":[],"mappings":"AAIA,gHAAgH;AAChH,qBAAa,WAAW;IACtB;;;;OAIG;WACU,OAAO,CAClB,IAAI,GAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,6GAA6G;QAC7G,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC;QAC1B,0HAA0H;QAC1H,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,mEAAmE;QACnE,KAAK,CAAC,EAAE,OAAO,CAAC;KACZ,GACL,OAAO,CAAC,IAAI,CAAC;CAsCjB"}
|
package/dist/compilers/bun.js
CHANGED
|
@@ -12,7 +12,7 @@ class BunCompiler {
|
|
|
12
12
|
* `platformaticKafkaPlugins()` from `helpers`, which would invert that chain.
|
|
13
13
|
*/
|
|
14
14
|
static async compile(opts = {}) {
|
|
15
|
-
const { entrypoint = DEFAULT_ENTRYPOINT, workers = [], outfile = DEFAULT_OUTFILE, target = Bun.env.BUN_TARGET ?? DEFAULT_COMPILE_TARGET, plugins = [], define = {}, } = opts;
|
|
15
|
+
const { entrypoint = DEFAULT_ENTRYPOINT, workers = [], outfile = DEFAULT_OUTFILE, target = Bun.env.BUN_TARGET ?? DEFAULT_COMPILE_TARGET, plugins = [], define = {}, check = false, } = opts;
|
|
16
16
|
const built = await Bun.build({
|
|
17
17
|
entrypoints: [entrypoint, ...workers],
|
|
18
18
|
target: 'bun',
|
|
@@ -25,6 +25,7 @@ class BunCompiler {
|
|
|
25
25
|
},
|
|
26
26
|
define,
|
|
27
27
|
plugins,
|
|
28
|
+
check,
|
|
28
29
|
});
|
|
29
30
|
if (!built.success) {
|
|
30
31
|
// `getError` lives in `inversion`, which depends on `dev-configs` - importing it here would
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bun.js","sourceRoot":"","sources":["../../src/compilers/bun.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAC7C,MAAM,eAAe,GAAG,YAAY,CAAC;AACrC,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAE/C,gHAAgH;AAChH,MAAa,WAAW;IACtB;;;;OAIG;IACH,MAAM,C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C,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAzDD,kCAyDC","sourcesContent":["const DEFAULT_ENTRYPOINT = './dist/index.js';\nconst DEFAULT_OUTFILE = './dist/bin';\nconst DEFAULT_COMPILE_TARGET = 'bun-linux-x64';\n\n/** Bundles and compiles a single Bun executable: minified, linked sourcemaps, target read from `BUN_TARGET`. */\nexport class BunCompiler {\n /**\n * `plugins` is a parameter, never resolved here - `dev-configs` sits below every other IGNIS\n * package (see the Makefile chain) and must not import a plugin factory such as\n * `platformaticKafkaPlugins()` from `helpers`, which would invert that chain.\n */\n static async compile(\n opts: {\n entrypoint?: string;\n /** Bun Worker files the entrypoint starts (`new Worker('./x.worker.ts')`): compiled into the same binary. */\n workers?: string[];\n outfile?: string;\n target?: string;\n plugins?: Bun.BunPlugin[];\n /** Compile-time constants: each key is replaced by its value, a JSON-encoded expression, wherever the bundle reads it. */\n define?: Record<string, string>;\n /** Type-check the bundle first; a type error stops the compile. */\n check?: boolean;\n } = {},\n ): Promise<void> {\n const {\n entrypoint = DEFAULT_ENTRYPOINT,\n workers = [],\n outfile = DEFAULT_OUTFILE,\n target = Bun.env.BUN_TARGET ?? DEFAULT_COMPILE_TARGET,\n plugins = [],\n define = {},\n check = false,\n } = opts;\n\n const built = await Bun.build({\n entrypoints: [entrypoint, ...workers],\n target: 'bun',\n minify: { whitespace: true, syntax: true },\n sourcemap: 'linked',\n throw: false,\n compile: {\n target: target as Bun.Build.CompileTarget,\n outfile,\n },\n define,\n plugins,\n check,\n });\n\n if (!built.success) {\n // `getError` lives in `inversion`, which depends on `dev-configs` - importing it here would\n // create a circular workspace dependency, so a failed compile throws a plain `Error` instead.\n // eslint-disable-next-line venizia/no-new-error -- getError would be a dev-configs -> inversion cycle\n throw new Error(\n [\n `[BunCompiler] compile failed for entrypoint \"${entrypoint}\":`,\n ...built.logs.map(log => `[${log.level}] ${log.message}`),\n ].join('\\n'),\n );\n }\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/dev-configs",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Shareable development configurations for TypeScript projects: oxlint and oxfmt presets with per-rule builders, the ESLint naming-convention rule, the legacy ESLint flat config and Prettier presets, and TypeScript compiler options with critical decorator support (experimentalDecorators, emitDecoratorMetadata, useDefineForClassFields). Single source of truth for consistent code style, type checking, and build settings across monorepo packages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build-tools",
|
|
@@ -100,29 +100,30 @@
|
|
|
100
100
|
"LICENSE.md",
|
|
101
101
|
"dist",
|
|
102
102
|
"src/tsconfig",
|
|
103
|
+
"!**/__tests__",
|
|
103
104
|
"!**/*.tsbuildinfo"
|
|
104
105
|
],
|
|
105
106
|
"publishConfig": {
|
|
106
107
|
"access": "public"
|
|
107
108
|
},
|
|
108
109
|
"scripts": {
|
|
109
|
-
"force-update": "sh
|
|
110
|
+
"force-update": "sh ../../scripts/force-update.sh",
|
|
110
111
|
"prepublishOnly": "make rebuild"
|
|
111
112
|
},
|
|
112
113
|
"dependencies": {
|
|
113
114
|
"@eslint/js": "^10.0.1",
|
|
114
115
|
"eslint-config-prettier": "^10.1.8",
|
|
115
|
-
"eslint-plugin-n": "^18.
|
|
116
|
-
"eslint-plugin-prettier": "^5.5.
|
|
117
|
-
"eslint-plugin-unicorn": "^
|
|
118
|
-
"typescript-eslint": "^8.
|
|
116
|
+
"eslint-plugin-n": "^18.5.0",
|
|
117
|
+
"eslint-plugin-prettier": "^5.5.7",
|
|
118
|
+
"eslint-plugin-unicorn": "^78.0.0",
|
|
119
|
+
"typescript-eslint": "^8.72.0"
|
|
119
120
|
},
|
|
120
121
|
"peerDependencies": {
|
|
121
122
|
"eslint": "^9.0.0 || ^10.0.0",
|
|
122
|
-
"oxfmt": ">=0.
|
|
123
|
-
"oxlint": ">=1.
|
|
123
|
+
"oxfmt": ">=0.74.0",
|
|
124
|
+
"oxlint": ">=1.89.0",
|
|
124
125
|
"oxlint-tsgolint": ">=7.0.2004",
|
|
125
|
-
"prettier": "^3.
|
|
126
|
+
"prettier": "^3.9.10",
|
|
126
127
|
"typescript": "^5.0.0 || ^6.0.0"
|
|
127
128
|
},
|
|
128
129
|
"peerDependenciesMeta": {
|
|
@@ -146,12 +147,12 @@
|
|
|
146
147
|
}
|
|
147
148
|
},
|
|
148
149
|
"devDependencies": {
|
|
149
|
-
"@types/bun": "^1.4.
|
|
150
|
-
"eslint": "^10.
|
|
151
|
-
"oxfmt": "0.
|
|
152
|
-
"oxlint": "1.
|
|
150
|
+
"@types/bun": "^1.4.3",
|
|
151
|
+
"eslint": "^10.13.0",
|
|
152
|
+
"oxfmt": "0.74.0",
|
|
153
|
+
"oxlint": "1.89.0",
|
|
153
154
|
"oxlint-tsgolint": "7.0.2004",
|
|
154
|
-
"prettier": "^3.9.
|
|
155
|
+
"prettier": "^3.9.10",
|
|
155
156
|
"typescript": "^6.0.3"
|
|
156
157
|
}
|
|
157
158
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/tsconfig",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
/* TypeScript 6.0 — suppress deprecation warnings for experimentalDecorators */
|
|
5
|
-
"ignoreDeprecations": "6.0",
|
|
6
|
-
|
|
7
4
|
/* Language and Environment */
|
|
8
5
|
"target": "ES2025",
|
|
9
6
|
"lib": ["ES2025"],
|
|
10
7
|
"types": ["bun"],
|
|
8
|
+
"moduleDetection": "force",
|
|
11
9
|
"experimentalDecorators": true,
|
|
12
10
|
"emitDecoratorMetadata": true,
|
|
13
11
|
"useDefineForClassFields": false,
|
|
@@ -16,7 +14,7 @@
|
|
|
16
14
|
"module": "Node16",
|
|
17
15
|
"moduleResolution": "node16",
|
|
18
16
|
"resolveJsonModule": true,
|
|
19
|
-
"isolatedModules":
|
|
17
|
+
"isolatedModules": true,
|
|
20
18
|
"forceConsistentCasingInFileNames": true,
|
|
21
19
|
|
|
22
20
|
/* Emit */
|
|
@@ -41,7 +39,7 @@
|
|
|
41
39
|
/* Additional Checks */
|
|
42
40
|
"noUnusedLocals": true,
|
|
43
41
|
"noUnusedParameters": true,
|
|
44
|
-
"noImplicitReturns":
|
|
42
|
+
"noImplicitReturns": true,
|
|
45
43
|
"noFallthroughCasesInSwitch": true,
|
|
46
44
|
"noUncheckedIndexedAccess": false,
|
|
47
45
|
"noImplicitOverride": true,
|