@f-o-t/config 1.0.3 → 1.0.5
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/LICENSE +21 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +4 -0
- package/package.json +1 -1
- package/src/generators/package-json.ts +10 -1
- package/src/generators/tsconfig.ts +1 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FOT (F-O-T)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
CHANGED
|
@@ -160,10 +160,15 @@ interface BiomeConfig {
|
|
|
160
160
|
*/
|
|
161
161
|
declare function generateBiomeConfig(config: ResolvedFotConfig): BiomeConfig;
|
|
162
162
|
/**
|
|
163
|
-
* Package.json configuration
|
|
163
|
+
* Package.json configuration.
|
|
164
|
+
* Includes "module" and "import" conditions so bundlers/Vite can resolve ESM entries
|
|
165
|
+
* under conditions like ["module", "browser", "development", "import"].
|
|
166
|
+
* The "module" condition is required by newer Vite/rolldown versions.
|
|
164
167
|
*/
|
|
165
168
|
interface PackageExport {
|
|
166
169
|
types: string;
|
|
170
|
+
module: string;
|
|
171
|
+
import: string;
|
|
167
172
|
default: string;
|
|
168
173
|
}
|
|
169
174
|
/**
|
package/dist/index.js
CHANGED
|
@@ -84,6 +84,8 @@ function generatePackageJson(libraryName, version, config, customDependencies) {
|
|
|
84
84
|
const exports = {
|
|
85
85
|
".": {
|
|
86
86
|
types: "./dist/index.d.ts",
|
|
87
|
+
module: "./dist/index.js",
|
|
88
|
+
import: "./dist/index.js",
|
|
87
89
|
default: "./dist/index.js"
|
|
88
90
|
}
|
|
89
91
|
};
|
|
@@ -91,6 +93,8 @@ function generatePackageJson(libraryName, version, config, customDependencies) {
|
|
|
91
93
|
if (plugin.enabled !== false) {
|
|
92
94
|
exports[`./plugins/${plugin.name}`] = {
|
|
93
95
|
types: `./dist/plugins/${plugin.name}/index.d.ts`,
|
|
96
|
+
module: `./dist/plugins/${plugin.name}/index.js`,
|
|
97
|
+
import: `./dist/plugins/${plugin.name}/index.js`,
|
|
94
98
|
default: `./dist/plugins/${plugin.name}/index.js`
|
|
95
99
|
};
|
|
96
100
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { ResolvedFotConfig } from "../types";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Package.json export configuration
|
|
4
|
+
* Package.json export configuration.
|
|
5
|
+
* Includes "module" and "import" conditions so bundlers/Vite can resolve ESM entries
|
|
6
|
+
* under conditions like ["module", "browser", "development", "import"].
|
|
7
|
+
* The "module" condition is required by newer Vite/rolldown versions.
|
|
5
8
|
*/
|
|
6
9
|
export interface PackageExport {
|
|
7
10
|
types: string;
|
|
11
|
+
module: string;
|
|
12
|
+
import: string;
|
|
8
13
|
default: string;
|
|
9
14
|
}
|
|
10
15
|
|
|
@@ -47,6 +52,8 @@ export function generatePackageJson(
|
|
|
47
52
|
const exports: Record<string, PackageExport> = {
|
|
48
53
|
".": {
|
|
49
54
|
types: "./dist/index.d.ts",
|
|
55
|
+
module: "./dist/index.js",
|
|
56
|
+
import: "./dist/index.js",
|
|
50
57
|
default: "./dist/index.js",
|
|
51
58
|
},
|
|
52
59
|
};
|
|
@@ -56,6 +63,8 @@ export function generatePackageJson(
|
|
|
56
63
|
if (plugin.enabled !== false) {
|
|
57
64
|
exports[`./plugins/${plugin.name}`] = {
|
|
58
65
|
types: `./dist/plugins/${plugin.name}/index.d.ts`,
|
|
66
|
+
module: `./dist/plugins/${plugin.name}/index.js`,
|
|
67
|
+
import: `./dist/plugins/${plugin.name}/index.js`,
|
|
59
68
|
default: `./dist/plugins/${plugin.name}/index.js`,
|
|
60
69
|
};
|
|
61
70
|
}
|
|
@@ -38,9 +38,7 @@ export function generateTSConfig(config: ResolvedFotConfig): TSConfig {
|
|
|
38
38
|
// (e.g., @f-o-t/condition-evaluator) don't get type-checked in the main pass.
|
|
39
39
|
// Plugin declarations are handled separately by the build system.
|
|
40
40
|
const enabledPlugins = config.plugins.filter((p) => p.enabled !== false);
|
|
41
|
-
const pluginExcludes = enabledPlugins.map(
|
|
42
|
-
(p) => `src/plugins/${p.name}`,
|
|
43
|
-
);
|
|
41
|
+
const pluginExcludes = enabledPlugins.map((p) => `src/plugins/${p.name}`);
|
|
44
42
|
|
|
45
43
|
return {
|
|
46
44
|
compilerOptions: {
|