@langri-sha/projen-project 0.6.1 → 0.7.0
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.json +24 -1
- package/CHANGELOG.md +14 -2
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +16 -3
- package/lib/index.js.map +1 -1
- package/package.json +8 -7
- package/src/index.ts +33 -6
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,30 @@
|
|
|
2
2
|
"name": "@langri-sha/projen-project",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 15 May 2024 06:46:11 GMT",
|
|
6
|
+
"version": "0.7.0",
|
|
7
|
+
"tag": "@langri-sha/projen-project_v0.7.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "email not defined",
|
|
12
|
+
"package": "@langri-sha/projen-project",
|
|
13
|
+
"commit": "92c7d4c9ac50342a39af3fc029307a2899f0ae34",
|
|
14
|
+
"comment": "chore(deps): chore(deps): update dependency projen to v0.81.11"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"minor": [
|
|
18
|
+
{
|
|
19
|
+
"author": "filip.dupanovic@gmail.com",
|
|
20
|
+
"package": "@langri-sha/projen-project",
|
|
21
|
+
"commit": "92c7d4c9ac50342a39af3fc029307a2899f0ae34",
|
|
22
|
+
"comment": "feat(projen-project): Add support for configuring TypeScript\""
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"date": "Tue, 14 May 2024 20:41:06 GMT",
|
|
6
29
|
"version": "0.6.1",
|
|
7
30
|
"tag": "@langri-sha/projen-project_v0.6.1",
|
|
8
31
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
# Change Log - @langri-sha/projen-project
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 15 May 2024 06:46:11 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.7.0
|
|
8
|
+
|
|
9
|
+
Wed, 15 May 2024 06:46:11 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- feat(projen-project): Add support for configuring TypeScript" (filip.dupanovic@gmail.com)
|
|
14
|
+
|
|
15
|
+
### Patches
|
|
16
|
+
|
|
17
|
+
- chore(deps): chore(deps): update dependency projen to v0.81.11 (email not defined)
|
|
18
|
+
|
|
7
19
|
## 0.6.1
|
|
8
20
|
|
|
9
|
-
Tue, 14 May 2024 20:
|
|
21
|
+
Tue, 14 May 2024 20:41:06 GMT
|
|
10
22
|
|
|
11
23
|
### Patches
|
|
12
24
|
|
package/lib/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { type EditorConfigOptions } from '@langri-sha/projen-editorconfig';
|
|
|
5
5
|
import { type CodeownersOptions } from '@langri-sha/projen-codeowners';
|
|
6
6
|
import { type RenovateOptions } from '@langri-sha/projen-renovate';
|
|
7
7
|
import { type HuskyOptions } from '@langri-sha/projen-husky';
|
|
8
|
+
import { TypeScriptConfig, type TypeScriptConfigOptions } from '@langri-sha/projen-typescript-config';
|
|
8
9
|
export interface ProjectOptions extends Omit<BaseProjectOptions, 'renovatebot' | 'renovatebotOptions'> {
|
|
9
10
|
beachballConfig?: BeachballConfig;
|
|
10
11
|
codeownersOptions?: CodeownersOptions;
|
|
@@ -18,12 +19,13 @@ export interface ProjectOptions extends Omit<BaseProjectOptions, 'renovatebot' |
|
|
|
18
19
|
huskyOptions?: HuskyOptions;
|
|
19
20
|
renovateOptions?: RenovateOptions;
|
|
20
21
|
lintSynthesizedOptions?: LintSynthesizedOptions;
|
|
22
|
+
typeScriptConfigOptions?: TypeScriptConfigOptions;
|
|
21
23
|
withTerraform?: boolean;
|
|
22
|
-
withTypeScript?: boolean;
|
|
23
24
|
workspaces?: string[];
|
|
24
25
|
}
|
|
25
26
|
export declare class Project extends BaseProject {
|
|
26
27
|
#private;
|
|
28
|
+
typeScriptConfig?: TypeScriptConfig;
|
|
27
29
|
constructor(options: ProjectOptions);
|
|
28
30
|
}
|
|
29
31
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,KAAK,cAAc,IAAI,kBAAkB,EAG1C,MAAM,QAAQ,CAAA;AAGf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,KAAK,cAAc,IAAI,kBAAkB,EAG1C,MAAM,QAAQ,CAAA;AAGf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC7B,MAAM,sCAAsC,CAAA;AAE7C,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,aAAa,GAAG,oBAAoB,CAAC;IAItE,eAAe,CAAC,EAAE,eAAe,CAAA;IAKjC,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IAErC;;OAEG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;IAEzC;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAA;IAK3B,eAAe,CAAC,EAAE,eAAe,CAAA;IAKjC,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;IAK/C,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;IAKjD,aAAa,CAAC,EAAE,OAAO,CAAA;IAKvB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB;AAED,qBAAa,OAAQ,SAAQ,WAAW;;IACtC,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;gBAEvB,OAAO,EAAE,cAAc;CA8JpC"}
|
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _Project_instances, _Project_configureBeachball, _Project_configureCodeowners, _Project_configureDefaultTask, _Project_configureEditorConfig, _Project_configureHusky, _Project_configureLintSynthesized, _Project_configureRenovate, _Project_createPnpmWorkspaces;
|
|
6
|
+
var _Project_instances, _Project_configureBeachball, _Project_configureCodeowners, _Project_configureDefaultTask, _Project_configureEditorConfig, _Project_configureHusky, _Project_configureLintSynthesized, _Project_configureRenovate, _Project_configureTypeScript, _Project_createPnpmWorkspaces;
|
|
7
7
|
import { Project as BaseProject, TextFile, YamlFile, } from 'projen';
|
|
8
8
|
import * as R from 'ramda';
|
|
9
9
|
import { LintSynthesized, } from '@langri-sha/projen-lint-synthesized';
|
|
@@ -11,6 +11,7 @@ import { EditorConfig, } from '@langri-sha/projen-editorconfig';
|
|
|
11
11
|
import { Codeowners, } from '@langri-sha/projen-codeowners';
|
|
12
12
|
import { Renovate } from '@langri-sha/projen-renovate';
|
|
13
13
|
import { Husky } from '@langri-sha/projen-husky';
|
|
14
|
+
import { TypeScriptConfig, } from '@langri-sha/projen-typescript-config';
|
|
14
15
|
export class Project extends BaseProject {
|
|
15
16
|
constructor(options) {
|
|
16
17
|
super({
|
|
@@ -26,6 +27,7 @@ export class Project extends BaseProject {
|
|
|
26
27
|
this.tasks.removeTask('post-compile');
|
|
27
28
|
this.tasks.removeTask('pre-compile');
|
|
28
29
|
this.tasks.removeTask('watch');
|
|
30
|
+
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureTypeScript).call(this, options);
|
|
29
31
|
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureBeachball).call(this, options);
|
|
30
32
|
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureCodeowners).call(this, options);
|
|
31
33
|
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureDefaultTask).call(this);
|
|
@@ -61,6 +63,7 @@ _Project_instances = new WeakSet(), _Project_configureBeachball = function _Proj
|
|
|
61
63
|
]) {
|
|
62
64
|
file.addLine(line);
|
|
63
65
|
}
|
|
66
|
+
this.typeScriptConfig?.addFile('beachball.config.js');
|
|
64
67
|
}, _Project_configureCodeowners = function _Project_configureCodeowners({ codeownersOptions }) {
|
|
65
68
|
if (!codeownersOptions) {
|
|
66
69
|
return;
|
|
@@ -109,6 +112,16 @@ _Project_instances = new WeakSet(), _Project_configureBeachball = function _Proj
|
|
|
109
112
|
reviewersFromCodeOwners: true,
|
|
110
113
|
};
|
|
111
114
|
new Renovate(this, deepMerge(defaults, renovateOptions));
|
|
115
|
+
}, _Project_configureTypeScript = function _Project_configureTypeScript({ typeScriptConfigOptions }) {
|
|
116
|
+
if (!typeScriptConfigOptions) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const defaults = {
|
|
120
|
+
config: {
|
|
121
|
+
extends: '@langri-sha/tsconfig',
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
this.typeScriptConfig = new TypeScriptConfig(this, deepMerge(defaults, typeScriptConfigOptions));
|
|
112
125
|
}, _Project_createPnpmWorkspaces = function _Project_createPnpmWorkspaces({ workspaces }) {
|
|
113
126
|
if (!workspaces) {
|
|
114
127
|
return;
|
|
@@ -121,7 +134,7 @@ _Project_instances = new WeakSet(), _Project_configureBeachball = function _Proj
|
|
|
121
134
|
},
|
|
122
135
|
});
|
|
123
136
|
};
|
|
124
|
-
const getGitIgnoreOptions = ({ huskyOptions,
|
|
137
|
+
const getGitIgnoreOptions = ({ huskyOptions, typeScriptConfigOptions, withTerraform, ...options }) => ({
|
|
125
138
|
...options.gitIgnoreOptions,
|
|
126
139
|
ignorePatterns: [
|
|
127
140
|
...`
|
|
@@ -139,7 +152,7 @@ const getGitIgnoreOptions = ({ huskyOptions, withTerraform, withTypeScript, ...o
|
|
|
139
152
|
${withTerraform ? '!.terraform.lock.hcl' : ''}
|
|
140
153
|
*.db
|
|
141
154
|
*.log
|
|
142
|
-
${
|
|
155
|
+
${typeScriptConfigOptions ? '*.tsbuildinfo' : ''}
|
|
143
156
|
|
|
144
157
|
!.github/
|
|
145
158
|
${huskyOptions ? '!.husky/' : ''}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,OAAO,IAAI,WAAW,EAEtB,QAAQ,EACR,QAAQ,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sBAAsB,CAAC,CAAC,CAAC,EAAE;;;MAG3C,uBAAuB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE;;;MAG9C,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;;MAE9B,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,SAAS,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;;KAE7E;aACE,KAAK,CAAC,IAAI,CAAC;aACX,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;aAChC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QAC1C,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,cAAc,IAAI,EAAE,CAAC;KACpD;CACF,CAAC,CAAA;AAEF,MAAM,SAAS,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langri-sha/projen-project",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
"prepublishOnly": "rm -rf lib; tsc --project tsconfig.build.json"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@langri-sha/projen-codeowners": "0.2.
|
|
12
|
-
"@langri-sha/projen-editorconfig": "0.3.
|
|
13
|
-
"@langri-sha/projen-husky": "0.1.
|
|
14
|
-
"@langri-sha/projen-lint-synthesized": "0.2.
|
|
15
|
-
"@langri-sha/projen-renovate": "0.2.
|
|
11
|
+
"@langri-sha/projen-codeowners": "0.2.2",
|
|
12
|
+
"@langri-sha/projen-editorconfig": "0.3.3",
|
|
13
|
+
"@langri-sha/projen-husky": "0.1.2",
|
|
14
|
+
"@langri-sha/projen-lint-synthesized": "0.2.4",
|
|
15
|
+
"@langri-sha/projen-renovate": "0.2.2",
|
|
16
|
+
"@langri-sha/projen-typescript-config": "0.2.0",
|
|
16
17
|
"beachball": "2.43.1",
|
|
17
18
|
"ramda": "0.30.0"
|
|
18
19
|
},
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
"@langri-sha/jest-test": "0.7.1",
|
|
21
22
|
"@langri-sha/tsconfig": "0.9.0",
|
|
22
23
|
"@types/ramda": "0.30.0",
|
|
23
|
-
"projen": "0.81.
|
|
24
|
+
"projen": "0.81.11"
|
|
24
25
|
},
|
|
25
26
|
"peerDependencies": {
|
|
26
27
|
"projen": "^0.81.1",
|
package/src/index.ts
CHANGED
|
@@ -22,6 +22,10 @@ import {
|
|
|
22
22
|
} from '@langri-sha/projen-codeowners'
|
|
23
23
|
import { Renovate, type RenovateOptions } from '@langri-sha/projen-renovate'
|
|
24
24
|
import { Husky, type HuskyOptions } from '@langri-sha/projen-husky'
|
|
25
|
+
import {
|
|
26
|
+
TypeScriptConfig,
|
|
27
|
+
type TypeScriptConfigOptions,
|
|
28
|
+
} from '@langri-sha/projen-typescript-config'
|
|
25
29
|
|
|
26
30
|
export interface ProjectOptions
|
|
27
31
|
extends Omit<BaseProjectOptions, 'renovatebot' | 'renovatebotOptions'> {
|
|
@@ -56,14 +60,14 @@ export interface ProjectOptions
|
|
|
56
60
|
lintSynthesizedOptions?: LintSynthesizedOptions
|
|
57
61
|
|
|
58
62
|
/*
|
|
59
|
-
*
|
|
63
|
+
* Configure TypeScript.
|
|
60
64
|
*/
|
|
61
|
-
|
|
65
|
+
typeScriptConfigOptions?: TypeScriptConfigOptions
|
|
62
66
|
|
|
63
67
|
/*
|
|
64
|
-
* Whether to use
|
|
68
|
+
* Whether to use Terrafom.
|
|
65
69
|
*/
|
|
66
|
-
|
|
70
|
+
withTerraform?: boolean
|
|
67
71
|
|
|
68
72
|
/*
|
|
69
73
|
* PNPM workspaces to generate.
|
|
@@ -72,6 +76,8 @@ export interface ProjectOptions
|
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
export class Project extends BaseProject {
|
|
79
|
+
typeScriptConfig?: TypeScriptConfig
|
|
80
|
+
|
|
75
81
|
constructor(options: ProjectOptions) {
|
|
76
82
|
super({
|
|
77
83
|
...options,
|
|
@@ -87,6 +93,8 @@ export class Project extends BaseProject {
|
|
|
87
93
|
this.tasks.removeTask('pre-compile')
|
|
88
94
|
this.tasks.removeTask('watch')
|
|
89
95
|
|
|
96
|
+
this.#configureTypeScript(options)
|
|
97
|
+
|
|
90
98
|
this.#configureBeachball(options)
|
|
91
99
|
this.#configureCodeowners(options)
|
|
92
100
|
this.#configureDefaultTask()
|
|
@@ -125,6 +133,8 @@ export class Project extends BaseProject {
|
|
|
125
133
|
]) {
|
|
126
134
|
file.addLine(line)
|
|
127
135
|
}
|
|
136
|
+
|
|
137
|
+
this.typeScriptConfig?.addFile('beachball.config.js')
|
|
128
138
|
}
|
|
129
139
|
|
|
130
140
|
#configureCodeowners({ codeownersOptions }: ProjectOptions) {
|
|
@@ -196,6 +206,23 @@ export class Project extends BaseProject {
|
|
|
196
206
|
new Renovate(this, deepMerge(defaults, renovateOptions))
|
|
197
207
|
}
|
|
198
208
|
|
|
209
|
+
#configureTypeScript({ typeScriptConfigOptions }: ProjectOptions) {
|
|
210
|
+
if (!typeScriptConfigOptions) {
|
|
211
|
+
return
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const defaults: TypeScriptConfigOptions = {
|
|
215
|
+
config: {
|
|
216
|
+
extends: '@langri-sha/tsconfig',
|
|
217
|
+
},
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
this.typeScriptConfig = new TypeScriptConfig(
|
|
221
|
+
this,
|
|
222
|
+
deepMerge(defaults, typeScriptConfigOptions),
|
|
223
|
+
)
|
|
224
|
+
}
|
|
225
|
+
|
|
199
226
|
#createPnpmWorkspaces({ workspaces }: ProjectOptions) {
|
|
200
227
|
if (!workspaces) {
|
|
201
228
|
return
|
|
@@ -213,8 +240,8 @@ export class Project extends BaseProject {
|
|
|
213
240
|
|
|
214
241
|
const getGitIgnoreOptions = ({
|
|
215
242
|
huskyOptions,
|
|
243
|
+
typeScriptConfigOptions,
|
|
216
244
|
withTerraform,
|
|
217
|
-
withTypeScript,
|
|
218
245
|
...options
|
|
219
246
|
}: ProjectOptions): ProjectOptions['gitIgnoreOptions'] => ({
|
|
220
247
|
...options.gitIgnoreOptions,
|
|
@@ -234,7 +261,7 @@ const getGitIgnoreOptions = ({
|
|
|
234
261
|
${withTerraform ? '!.terraform.lock.hcl' : ''}
|
|
235
262
|
*.db
|
|
236
263
|
*.log
|
|
237
|
-
${
|
|
264
|
+
${typeScriptConfigOptions ? '*.tsbuildinfo' : ''}
|
|
238
265
|
|
|
239
266
|
!.github/
|
|
240
267
|
${huskyOptions ? '!.husky/' : ''}
|