@ttoss/config 1.32.2 → 1.32.3
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/README.md +1 -1
- package/dist/esm/index.js +17 -2
- package/dist/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +18 -8
- package/package.json +2 -1
- package/src/index.ts +1 -0
- package/src/tsup.ts +5 -2
- package/src/typescriptConfig.ts +5 -0
- package/tsconfig.json +5 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @ttoss/config
|
|
2
2
|
|
|
3
|
-
**@ttoss/config** is an opinionated configuration library for [monorepo](#monorepo) and [packages](#packages). It contains a set of
|
|
3
|
+
**@ttoss/config** is an opinionated configuration library for [monorepo](#monorepo) and [packages](#packages). It contains a set of default configurations that you can use on your projects.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __export = (target2, all) => {
|
|
4
|
+
for (var name in all) __defProp(target2, name, {
|
|
5
|
+
get: all[name],
|
|
6
|
+
enumerable: true
|
|
7
|
+
});
|
|
8
|
+
};
|
|
2
9
|
|
|
3
10
|
// src/configCreator.ts
|
|
4
11
|
import deepmerge from "deepmerge";
|
|
@@ -107,6 +114,13 @@ var defaultConfig6 = {
|
|
|
107
114
|
};
|
|
108
115
|
var syncpackConfig = configCreator(defaultConfig6);
|
|
109
116
|
|
|
117
|
+
// src/typescriptConfig.ts
|
|
118
|
+
var typescriptConfig_exports = {};
|
|
119
|
+
__export(typescriptConfig_exports, {
|
|
120
|
+
target: () => target
|
|
121
|
+
});
|
|
122
|
+
var target = "es2021";
|
|
123
|
+
|
|
110
124
|
// src/tsup.ts
|
|
111
125
|
import { transformAsync } from "@babel/core";
|
|
112
126
|
var formatjsPlugin = {
|
|
@@ -151,7 +165,8 @@ var defaultConfig7 = {
|
|
|
151
165
|
banner: {
|
|
152
166
|
js: `/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */`
|
|
153
167
|
},
|
|
154
|
-
esbuildPlugins: [formatjsPlugin]
|
|
168
|
+
esbuildPlugins: [formatjsPlugin],
|
|
169
|
+
target
|
|
155
170
|
};
|
|
156
171
|
var tsupConfig = configCreator(defaultConfig7);
|
|
157
|
-
export { babelConfig, commitlintConfig, jestConfig, lintstagedConfig, prettierConfig, syncpackConfig, tsupConfig };
|
|
172
|
+
export { babelConfig, commitlintConfig, jestConfig, lintstagedConfig, prettierConfig, syncpackConfig, tsupConfig, typescriptConfig_exports as typescriptConfig };
|
package/dist/index.d.mts
CHANGED
|
@@ -22,8 +22,24 @@ declare const syncpackConfig: (config?: any, deepmergeConfig?: {
|
|
|
22
22
|
arrayMerge: "append" | "overwrite";
|
|
23
23
|
} | undefined) => any;
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* any on configCreator to avoid error "The inferred type of 'tsup' cannot
|
|
27
|
+
* be named without a reference to '.../node_modules/tsup'. This is likely not
|
|
28
|
+
* portable. A type annotation is necessary."
|
|
29
|
+
*/
|
|
25
30
|
declare const tsupConfig: (config?: any, deepmergeConfig?: {
|
|
26
31
|
arrayMerge: "append" | "overwrite";
|
|
27
32
|
} | undefined) => any;
|
|
28
33
|
|
|
29
|
-
|
|
34
|
+
/**
|
|
35
|
+
* `target` to `es2021` because Node.js 20 supports ES2021 features.
|
|
36
|
+
* https://node.green/#ES2021
|
|
37
|
+
*/
|
|
38
|
+
declare const target = "es2021";
|
|
39
|
+
|
|
40
|
+
declare const typescriptConfig_target: typeof target;
|
|
41
|
+
declare namespace typescriptConfig {
|
|
42
|
+
export { typescriptConfig_target as target };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { babelConfig, commitlintConfig, jestConfig, lintstagedConfig, prettierConfig, syncpackConfig, tsupConfig, typescriptConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -22,8 +22,24 @@ declare const syncpackConfig: (config?: any, deepmergeConfig?: {
|
|
|
22
22
|
arrayMerge: "append" | "overwrite";
|
|
23
23
|
} | undefined) => any;
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* any on configCreator to avoid error "The inferred type of 'tsup' cannot
|
|
27
|
+
* be named without a reference to '.../node_modules/tsup'. This is likely not
|
|
28
|
+
* portable. A type annotation is necessary."
|
|
29
|
+
*/
|
|
25
30
|
declare const tsupConfig: (config?: any, deepmergeConfig?: {
|
|
26
31
|
arrayMerge: "append" | "overwrite";
|
|
27
32
|
} | undefined) => any;
|
|
28
33
|
|
|
29
|
-
|
|
34
|
+
/**
|
|
35
|
+
* `target` to `es2021` because Node.js 20 supports ES2021 features.
|
|
36
|
+
* https://node.green/#ES2021
|
|
37
|
+
*/
|
|
38
|
+
declare const target = "es2021";
|
|
39
|
+
|
|
40
|
+
declare const typescriptConfig_target: typeof target;
|
|
41
|
+
declare namespace typescriptConfig {
|
|
42
|
+
export { typescriptConfig_target as target };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { babelConfig, commitlintConfig, jestConfig, lintstagedConfig, prettierConfig, syncpackConfig, tsupConfig, typescriptConfig };
|
package/dist/index.js
CHANGED
|
@@ -7,8 +7,8 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
7
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __export = (
|
|
11
|
-
for (var name in all) __defProp(
|
|
10
|
+
var __export = (target2, all) => {
|
|
11
|
+
for (var name in all) __defProp(target2, name, {
|
|
12
12
|
get: all[name],
|
|
13
13
|
enumerable: true
|
|
14
14
|
});
|
|
@@ -22,15 +22,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
22
22
|
}
|
|
23
23
|
return to;
|
|
24
24
|
};
|
|
25
|
-
var __toESM = (mod, isNodeMode,
|
|
25
|
+
var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
26
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
27
|
// file that has been converted to a CommonJS file using a Babel-
|
|
28
28
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
29
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(
|
|
30
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target2, "default", {
|
|
31
31
|
value: mod,
|
|
32
32
|
enumerable: true
|
|
33
|
-
}) :
|
|
33
|
+
}) : target2, mod));
|
|
34
34
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
35
35
|
value: true
|
|
36
36
|
}), mod);
|
|
@@ -44,7 +44,8 @@ __export(src_exports, {
|
|
|
44
44
|
lintstagedConfig: () => lintstagedConfig,
|
|
45
45
|
prettierConfig: () => prettierConfig,
|
|
46
46
|
syncpackConfig: () => syncpackConfig,
|
|
47
|
-
tsupConfig: () => tsupConfig
|
|
47
|
+
tsupConfig: () => tsupConfig,
|
|
48
|
+
typescriptConfig: () => typescriptConfig_exports
|
|
48
49
|
});
|
|
49
50
|
module.exports = __toCommonJS(src_exports);
|
|
50
51
|
|
|
@@ -155,6 +156,13 @@ var defaultConfig6 = {
|
|
|
155
156
|
};
|
|
156
157
|
var syncpackConfig = configCreator(defaultConfig6);
|
|
157
158
|
|
|
159
|
+
// src/typescriptConfig.ts
|
|
160
|
+
var typescriptConfig_exports = {};
|
|
161
|
+
__export(typescriptConfig_exports, {
|
|
162
|
+
target: () => target
|
|
163
|
+
});
|
|
164
|
+
var target = "es2021";
|
|
165
|
+
|
|
158
166
|
// src/tsup.ts
|
|
159
167
|
var import_core = require("@babel/core");
|
|
160
168
|
var formatjsPlugin = {
|
|
@@ -199,7 +207,8 @@ var defaultConfig7 = {
|
|
|
199
207
|
banner: {
|
|
200
208
|
js: `/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */`
|
|
201
209
|
},
|
|
202
|
-
esbuildPlugins: [formatjsPlugin]
|
|
210
|
+
esbuildPlugins: [formatjsPlugin],
|
|
211
|
+
target
|
|
203
212
|
};
|
|
204
213
|
var tsupConfig = configCreator(defaultConfig7);
|
|
205
214
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -210,5 +219,6 @@ var tsupConfig = configCreator(defaultConfig7);
|
|
|
210
219
|
lintstagedConfig,
|
|
211
220
|
prettierConfig,
|
|
212
221
|
syncpackConfig,
|
|
213
|
-
tsupConfig
|
|
222
|
+
tsupConfig,
|
|
223
|
+
typescriptConfig
|
|
214
224
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/config",
|
|
3
|
-
"version": "1.32.
|
|
3
|
+
"version": "1.32.3",
|
|
4
4
|
"description": "Default configuration for packages.",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"tsconfig.json",
|
|
20
20
|
"tsconfig.test.json"
|
|
21
21
|
],
|
|
22
|
+
"sideEffects": false,
|
|
22
23
|
"typings": "dist/index.d.ts",
|
|
23
24
|
"dependencies": {
|
|
24
25
|
"@babel/core": "^7.23.9",
|
package/src/index.ts
CHANGED
package/src/tsup.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as typescriptConfig from './typescriptConfig';
|
|
1
2
|
import { Plugin, PluginBuild } from 'esbuild';
|
|
2
3
|
import { configCreator } from './configCreator';
|
|
3
4
|
import { transformAsync } from '@babel/core';
|
|
@@ -60,11 +61,13 @@ export const defaultConfig: Options = {
|
|
|
60
61
|
js: `/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */`,
|
|
61
62
|
},
|
|
62
63
|
esbuildPlugins: [formatjsPlugin],
|
|
64
|
+
target: typescriptConfig.target,
|
|
63
65
|
};
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
/**
|
|
66
68
|
* any on configCreator to avoid error "The inferred type of 'tsup' cannot
|
|
67
69
|
* be named without a reference to '.../node_modules/tsup'. This is likely not
|
|
68
70
|
* portable. A type annotation is necessary."
|
|
69
71
|
*/
|
|
70
|
-
any
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
|
+
export const tsupConfig = configCreator<any>(defaultConfig);
|
package/tsconfig.json
CHANGED
|
@@ -15,9 +15,12 @@
|
|
|
15
15
|
* without a bundler, set `moduleResolution` to `NodeNext`.
|
|
16
16
|
*/
|
|
17
17
|
"moduleResolution": "Bundler",
|
|
18
|
-
"target": "ESNext",
|
|
19
18
|
"module": "ESNext",
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* `target` to `es2021` because Node.js 20 supports ES2021 features.
|
|
21
|
+
* https://node.green/#ES2021
|
|
22
|
+
*/
|
|
23
|
+
"target": "es2021",
|
|
21
24
|
"declaration": true,
|
|
22
25
|
"sourceMap": true,
|
|
23
26
|
"strict": true,
|