@bearei/tsconfig 0.0.0-stage → 2.0.0-dev.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/CHANGELOG.md +29 -0
- package/LICENSE +21 -0
- package/README.md +47 -2
- package/README.zh-CN.md +46 -0
- package/base.json +8 -0
- package/node.json +24 -0
- package/package.json +44 -3
- package/react-native.json +13 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## 2.0.0-dev.3 — 2026-10-27
|
|
8
|
+
|
|
9
|
+
Development snapshot published under the `next` dist-tag to verify the unified release pipeline
|
|
10
|
+
across all Bearei repositories: the artifact is pulled back from the registry, re-verified and
|
|
11
|
+
attached to the GitHub release. It matches the 2.0.0 scope documented below and leaves the
|
|
12
|
+
`latest` dist-tag unchanged.
|
|
13
|
+
|
|
14
|
+
Install it with `yarn add @bearei/tsconfig@next` or pin `@bearei/tsconfig@2.0.0-dev.3`.
|
|
15
|
+
|
|
16
|
+
## 2.0.0-dev.2 — 2026-10-27
|
|
17
|
+
|
|
18
|
+
Development snapshot published under the `next` dist-tag to verify the npm trusted publishing
|
|
19
|
+
pipeline. It matches the 2.0.0 scope documented below and leaves the `latest` dist-tag unchanged.
|
|
20
|
+
|
|
21
|
+
Install it with `yarn add @bearei/tsconfig@next` or pin `@bearei/tsconfig@2.0.0-dev.2`.
|
|
22
|
+
|
|
23
|
+
## 2.0.0 — 2026-10-26
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- `base.json` with the interop and library-check options shared by every Bearei project.
|
|
28
|
+
- `node.json` for NestJS and Node libraries, moving the previous `@bearei/nest` compiler options into a reusable preset.
|
|
29
|
+
- `react-native.json` for React Native projects, extending `@react-native/typescript-config` with the Bearei decorator, library and `verbatimModuleSyntax` settings.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Bearei
|
|
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/README.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @bearei/tsconfig
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shared TypeScript presets for Bearei projects. Extend a preset by path; no build step is involved.
|
|
4
|
+
|
|
5
|
+
| Preset | Use for |
|
|
6
|
+
| ------------------- | -------------------------------------- |
|
|
7
|
+
| `base.json` | Interop and library-check defaults |
|
|
8
|
+
| `node.json` | NestJS / Node libraries and services |
|
|
9
|
+
| `react-native.json` | React Native and React Native Web apps |
|
|
10
|
+
|
|
11
|
+
English | [中文](./README.zh-CN.md)
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn add -D @bearei/tsconfig typescript
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Node:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"extends": "@bearei/tsconfig/node.json"
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
React Native:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
yarn add -D @react-native/typescript-config
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"extends": ["@react-native/typescript-config", "@bearei/tsconfig/react-native.json"],
|
|
36
|
+
"compilerOptions": {
|
|
37
|
+
"types": ["nativewind/types", "jest", "node"]
|
|
38
|
+
},
|
|
39
|
+
"include": ["**/*.ts", "**/*.tsx"]
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The React Native config stays in the consuming project so the preset resolves it from the same
|
|
44
|
+
`node_modules` tree as the app. Later entries in `extends` win, so the Bearei preset overrides only
|
|
45
|
+
the options it owns.
|
|
46
|
+
|
|
47
|
+
`include`, `exclude` and project-specific `types` stay in the consuming project. The presets only
|
|
48
|
+
cover options that must not drift between projects.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @bearei/tsconfig
|
|
2
|
+
|
|
3
|
+
Bearei 项目的共享 TypeScript 预设。按路径 `extends` 即可,不需要构建。
|
|
4
|
+
|
|
5
|
+
| 预设 | 适用场景 |
|
|
6
|
+
| ------------------- | ------------------------------------- |
|
|
7
|
+
| `base.json` | 互操作与库检查的公共默认值 |
|
|
8
|
+
| `node.json` | NestJS / Node 库与服务 |
|
|
9
|
+
| `react-native.json` | React Native 与 React Native Web 应用 |
|
|
10
|
+
|
|
11
|
+
[English](./README.md) | 中文
|
|
12
|
+
|
|
13
|
+
## 使用
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn add -D @bearei/tsconfig typescript
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Node:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"extends": "@bearei/tsconfig/node.json"
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
React Native:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
yarn add -D @react-native/typescript-config
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"extends": ["@react-native/typescript-config", "@bearei/tsconfig/react-native.json"],
|
|
36
|
+
"compilerOptions": {
|
|
37
|
+
"types": ["nativewind/types", "jest", "node"]
|
|
38
|
+
},
|
|
39
|
+
"include": ["**/*.ts", "**/*.tsx"]
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
React Native 的官方配置留在使用方,这样预设与应用从同一棵 `node_modules` 解析它。`extends`
|
|
44
|
+
数组中靠后的配置优先,因此 Bearei 预设只会覆盖自己负责的选项。
|
|
45
|
+
|
|
46
|
+
`include`、`exclude` 与项目特有的 `types` 留在使用方。预设只收口那些不允许在项目之间漂移的选项。
|
package/base.json
ADDED
package/node.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"display": "Bearei Node",
|
|
4
|
+
"extends": "./base.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"allowSyntheticDefaultImports": true,
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"emitDecoratorMetadata": true,
|
|
9
|
+
"experimentalDecorators": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"incremental": true,
|
|
12
|
+
"module": "NodeNext",
|
|
13
|
+
"moduleResolution": "NodeNext",
|
|
14
|
+
"noFallthroughCasesInSwitch": false,
|
|
15
|
+
"noImplicitAny": false,
|
|
16
|
+
"removeComments": true,
|
|
17
|
+
"sourceMap": true,
|
|
18
|
+
"strict": true,
|
|
19
|
+
"strictBindCallApply": false,
|
|
20
|
+
"strictNullChecks": true,
|
|
21
|
+
"strictPropertyInitialization": false,
|
|
22
|
+
"target": "ES2022"
|
|
23
|
+
}
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bearei/tsconfig",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "2.0.0-dev.3",
|
|
4
|
+
"description": "Shared TypeScript configurations for Bearei projects",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"bearei",
|
|
7
|
+
"tsconfig",
|
|
8
|
+
"typescript"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/bear-ei/config/tree/main/packages/tsconfig#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/bear-ei/config/issues"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/bear-ei/config.git",
|
|
17
|
+
"directory": "packages/tsconfig"
|
|
18
|
+
},
|
|
19
|
+
"author": "bearei <bear_ei@outlook.com>",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"files": [
|
|
22
|
+
"base.json",
|
|
23
|
+
"node.json",
|
|
24
|
+
"react-native.json"
|
|
25
|
+
],
|
|
26
|
+
"exports": {
|
|
27
|
+
"./base.json": "./base.json",
|
|
28
|
+
"./node.json": "./node.json",
|
|
29
|
+
"./package.json": "./package.json",
|
|
30
|
+
"./react-native.json": "./react-native.json"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=20"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@react-native/typescript-config": ">=0.76",
|
|
37
|
+
"typescript": ">=5.5"
|
|
38
|
+
},
|
|
39
|
+
"peerDependenciesMeta": {
|
|
40
|
+
"@react-native/typescript-config": {
|
|
41
|
+
"optional": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
}
|
|
6
47
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"display": "Bearei React Native",
|
|
4
|
+
"extends": "./base.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"emitDecoratorMetadata": true,
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
9
|
+
"strictNullChecks": true,
|
|
10
|
+
"strictPropertyInitialization": false,
|
|
11
|
+
"verbatimModuleSyntax": true
|
|
12
|
+
}
|
|
13
|
+
}
|