@sapphire/ts-config 5.0.2-next.a4da5c44.0 → 5.0.2-next.a6c61efd

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 CHANGED
@@ -7,7 +7,6 @@
7
7
  **TypeScript configuration for all Sapphire Community repositories.**
8
8
 
9
9
  [![GitHub](https://img.shields.io/github/license/sapphiredev/utilities)](https://github.com/sapphiredev/utilities/blob/main/LICENSE.md)
10
- [![codecov](https://codecov.io/gh/sapphiredev/utilities/branch/main/graph/badge.svg?token=OEGIV6RFDO)](https://codecov.io/gh/sapphiredev/utilities)
11
10
  [![npm bundle size](https://img.shields.io/bundlephobia/min/@sapphire/ts-config?logo=webpack&style=flat-square)](https://bundlephobia.com/result?p=@sapphire/ts-config)
12
11
  [![npm](https://img.shields.io/npm/v/@sapphire/ts-config?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@sapphire/ts-config)
13
12
 
@@ -15,16 +14,15 @@
15
14
 
16
15
  **Table of Contents**
17
16
 
18
- - [@sapphire/ts-config](#sapphirets-config)
19
- - [Installation](#installation)
20
- - [Usage](#usage)
21
- - [Base](#base)
22
- - [Extra Strict](#extra-strict)
23
- - [Decorators](#decorators)
24
- - [Verbatim](#verbatim)
25
- - [Bundler](#bundler)
26
- - [Buy us some doughnuts](#buy-us-some-doughnuts)
27
- - [Contributors](#contributors)
17
+ - [Installation](#installation)
18
+ - [Usage](#usage)
19
+ - [Base](#base)
20
+ - [Extra Strict](#extra-strict)
21
+ - [Decorators](#decorators)
22
+ - [Verbatim](#verbatim)
23
+ - [Bundler](#bundler)
24
+ - [Buy us some doughnuts](#buy-us-some-doughnuts)
25
+ - [Contributors](#contributors)
28
26
 
29
27
  ## Installation
30
28
 
@@ -41,24 +39,24 @@ npm install --save-dev @sapphire/ts-config
41
39
  This package ships a couple of different sets of tsconfig, they should be used in an array of
42
40
  `extends` in your `tsconfig.json` file. The supported configs are:
43
41
 
44
- - `@sapphire/ts-config/base` -> This is identical to `@sapphire/ts-config`
45
- - `@sapphire/ts-config/extra-strict`
46
- - `@sapphire/ts-config/decorators`
47
- - `@sapphire/ts-config/verbatim`
42
+ - `@sapphire/ts-config/base` -> This is identical to `@sapphire/ts-config`
43
+ - `@sapphire/ts-config/extra-strict`
44
+ - `@sapphire/ts-config/decorators`
45
+ - `@sapphire/ts-config/verbatim`
48
46
 
49
47
  You should always start with the base config, regardless of what other configs you choose.
50
48
  Next you can opt-in to the other configs.
51
49
 
52
50
  Finally you should configure your package.json properly based on what kind of package you are writing
53
51
 
54
- - For CJS packages you should add `"type": "commonjs"` to your `package.json`
55
- - For ESM packages you should add `"type": "module"` to your `package.json`
56
- - For a package that is going to be used by both CJS and ESM then you should not add any `"type"` to your `package.json`
57
- - Note that if you intend to compile for both your best option is to compile
58
- for CJS from TypeScript, then use [`gen-esm-wrapper`](https://github.com/addaleax/gen-esm-wrapper) to transform your
59
- input file to ESM compatible exports. This is also what we do for our Sapphire packages.
60
- - Note also that in this case you should not enable `@sapphire/ts-config/verbatim`, because it will not work without
61
- a `"type"` specified in `package.json`
52
+ - For CJS packages you should add `"type": "commonjs"` to your `package.json`
53
+ - For ESM packages you should add `"type": "module"` to your `package.json`
54
+ - For a package that is going to be used by both CJS and ESM then you should not add any `"type"` to your `package.json`
55
+ - Note that if you intend to compile for both your best option is to compile
56
+ for CJS from TypeScript, then use [`gen-esm-wrapper`](https://github.com/addaleax/gen-esm-wrapper) to transform your
57
+ input file to ESM compatible exports. This is also what we do for our Sapphire packages.
58
+ - Note also that in this case you should not enable `@sapphire/ts-config/verbatim`, because it will not work without
59
+ a `"type"` specified in `package.json`
62
60
 
63
61
  Next we will go over the different configs and what they do.
64
62
 
@@ -67,18 +65,18 @@ Next we will go over the different configs and what they do.
67
65
  The base config (`@sapphire/ts-config`, or `@sapphire/ts-config/base`) is the default config with options set up in
68
66
  such a way that it will suite nearly all projects.
69
67
 
70
- You can view the content of this tsconfig [here](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/src/tsconfig.json)
68
+ You can view the content of this tsconfig [here](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/tsconfig.json)
71
69
 
72
70
  ### Extra Strict
73
71
 
74
72
  You should include this config if you want to extra strict checking. This configures the following compiler options:
75
73
 
76
- - [`allowUnreachableCode` to `false`](https://www.typescriptlang.org/tsconfig#allowUnreachableCode)
77
- - [`allowUnusedLabels` to `false`](https://www.typescriptlang.org/tsconfig#allowUnusedLabels)
78
- - [`exactOptionalPropertyTypes` to `false`](https://www.typescriptlang.org/tsconfig#exactOptionalPropertyTypes)
79
- - [`noImplicitOverride` to `true`](https://www.typescriptlang.org/tsconfig#noImplicitOverride)
74
+ - [`allowUnreachableCode` to `false`](https://www.typescriptlang.org/tsconfig#allowUnreachableCode)
75
+ - [`allowUnusedLabels` to `false`](https://www.typescriptlang.org/tsconfig#allowUnusedLabels)
76
+ - [`exactOptionalPropertyTypes` to `false`](https://www.typescriptlang.org/tsconfig#exactOptionalPropertyTypes)
77
+ - [`noImplicitOverride` to `true`](https://www.typescriptlang.org/tsconfig#noImplicitOverride)
80
78
 
81
- You can view the content of this tsconfig [here](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/src/extra-strict.json)
79
+ You can view the content of this tsconfig [here](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/extra-strict.json)
82
80
 
83
81
  ### Decorators
84
82
 
@@ -89,10 +87,10 @@ you are using decorators. Packages such as `@sapphire/decorators` rely on this c
89
87
 
90
88
  This enables the following compiler options:
91
89
 
92
- - [experimentalDecorators](https://www.typescriptlang.org/tsconfig#experimentalDecorators)
93
- - [emitDecoratorMetadata](https://www.typescriptlang.org/tsconfig#emitDecoratorMetadata)
90
+ - [experimentalDecorators](https://www.typescriptlang.org/tsconfig#experimentalDecorators)
91
+ - [emitDecoratorMetadata](https://www.typescriptlang.org/tsconfig#emitDecoratorMetadata)
94
92
 
95
- You can view the content of this tsconfig [here](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/src/decorators.json)
93
+ You can view the content of this tsconfig [here](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config//decorators.json)
96
94
 
97
95
  ### Verbatim
98
96
 
@@ -103,9 +101,9 @@ See the TypeScript documentation for more information.
103
101
 
104
102
  This enables the following compiler options:
105
103
 
106
- - [verbatimModuleSyntax](https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax)
104
+ - [verbatimModuleSyntax](https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax)
107
105
 
108
- You can view the content of this tsconfig [here](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/src/verbatim.json)
106
+ You can view the content of this tsconfig [here](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/verbatim.json)
109
107
 
110
108
  ### Bundler
111
109
 
@@ -115,10 +113,10 @@ config sets [`moduleResolution` to `Bundler`][moduleResolution] and [`module` to
115
113
 
116
114
  This configures the following compiler options:
117
115
 
118
- - [`moduleResolution` to `Bundler`][moduleResolution]
119
- - [`module` to `ES2022`][module]
116
+ - [`moduleResolution` to `Bundler`][moduleResolution]
117
+ - [`module` to `ES2022`][module]
120
118
 
121
- You can view the content of this tsconfig [here](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/src/bundler.json)
119
+ You can view the content of this tsconfig [here](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/bundler.json)
122
120
 
123
121
  ## Buy us some doughnuts
124
122
 
package/package.json CHANGED
@@ -1,42 +1,9 @@
1
1
  {
2
2
  "name": "@sapphire/ts-config",
3
- "version": "5.0.2-next.a4da5c44.0",
3
+ "version": "5.0.2-next.a6c61efd",
4
4
  "description": "Shareable TypeScript configuration for the Sapphire Community",
5
5
  "author": "@sapphire",
6
6
  "license": "MIT",
7
- "main": "src/tsconfig.json",
8
- "exports": {
9
- ".": {
10
- "types": "./src/tsconfig.json",
11
- "import": "./src/tsconfig.json",
12
- "require": "./src/tsconfig.json"
13
- },
14
- "./base": {
15
- "types": "./src/tsconfig.json",
16
- "import": "./src/tsconfig.json",
17
- "require": "./src/tsconfig.json"
18
- },
19
- "./decorators": {
20
- "types": "./src/decorators.json",
21
- "import": "./src/decorators.json",
22
- "require": "./src/decorators.json"
23
- },
24
- "./extra-strict": {
25
- "types": "./src/extra-strict.json",
26
- "import": "./src/extra-strict.json",
27
- "require": "./src/extra-strict.json"
28
- },
29
- "./verbatim": {
30
- "types": "./src/verbatim.json",
31
- "import": "./src/verbatim.json",
32
- "require": "./src/verbatim.json"
33
- },
34
- "./bundler": {
35
- "types": "./src/bundler.json",
36
- "import": "./src/bundler.json",
37
- "require": "./src/bundler.json"
38
- }
39
- },
40
7
  "sideEffects": false,
41
8
  "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/ts-config",
42
9
  "scripts": {
@@ -47,11 +14,13 @@
47
14
  "check-update": "cliff-jumper --dry-run"
48
15
  },
49
16
  "dependencies": {
50
- "tslib": "^2.6.2",
51
- "typescript": "^5.4.4"
17
+ "tslib": "^2.8.1",
18
+ "typescript": "~5.4.5"
52
19
  },
53
20
  "files": [
54
- "src",
21
+ "*.json",
22
+ "!tests/**",
23
+ "!tsconfig.eslint.json",
55
24
  "UPGRADING-*.md"
56
25
  ],
57
26
  "engines": {
@@ -80,11 +49,11 @@
80
49
  "access": "public"
81
50
  },
82
51
  "devDependencies": {
83
- "@favware/cliff-jumper": "^3.0.1",
84
- "@sapphire/eslint-config": "^5.0.4",
85
- "@sapphire/eslint-plugin-result": "^2.0.3",
86
- "@vitest/coverage-v8": "^1.4.0",
87
- "typedoc-json-parser": "^9.0.1",
88
- "vitest": "^1.4.0"
52
+ "@favware/cliff-jumper": "^6.0.0",
53
+ "@sapphire/eslint-config": "^5.0.6",
54
+ "@sapphire/eslint-plugin-result": "^2.0.4",
55
+ "@vitest/coverage-v8": "^3.2.4",
56
+ "typedoc-json-parser": "^10.2.0",
57
+ "vitest": "^3.2.4"
89
58
  }
90
59
  }
File without changes
File without changes
File without changes
File without changes
File without changes