@langri-sha/projen-project 0.3.0 → 0.4.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 +30 -1
- package/CHANGELOG.md +15 -2
- package/lib/index.d.ts +20 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +134 -0
- package/lib/index.js.map +1 -0
- package/package.json +12 -10
- package/src/index.ts +1 -2
- package/src/__snapshots__/index.test.ts.snap +0 -407
- package/src/index.test.ts +0 -57
- package/tsconfig.json +0 -14
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,36 @@
|
|
|
2
2
|
"name": "@langri-sha/projen-project",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 03 May 2024 10:44:32 GMT",
|
|
6
|
+
"version": "0.4.0",
|
|
7
|
+
"tag": "@langri-sha/projen-project_v0.4.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "filip.dupanovic@gmail.com",
|
|
12
|
+
"package": "@langri-sha/projen-project",
|
|
13
|
+
"commit": "68e384490ef3496631d9e74f059a50a466179b5d",
|
|
14
|
+
"comment": "fix(workspace): Revise build command"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"minor": [
|
|
18
|
+
{
|
|
19
|
+
"author": "filip.dupanovic@gmail.com",
|
|
20
|
+
"package": "@langri-sha/projen-project",
|
|
21
|
+
"commit": "976a3bb428390ade32e6a6a4332d335d4a39915b",
|
|
22
|
+
"comment": "feat(project): Configure package build"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"author": "filip.dupanovic@gmail.com",
|
|
26
|
+
"package": "@langri-sha/projen-project",
|
|
27
|
+
"commit": "19c7d9169fbe48b285e96250fbe4f2e73396979b",
|
|
28
|
+
"comment": "feat(project): Add workspace output ignore patterns"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"date": "Wed, 01 May 2024 23:11:18 GMT",
|
|
6
35
|
"version": "0.3.0",
|
|
7
36
|
"tag": "@langri-sha/projen-project_v0.3.0",
|
|
8
37
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
# Change Log - @langri-sha/projen-project
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 03 May 2024 10:44:32 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.4.0
|
|
8
|
+
|
|
9
|
+
Fri, 03 May 2024 10:44:32 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- feat(project): Configure package build (filip.dupanovic@gmail.com)
|
|
14
|
+
- feat(project): Add workspace output ignore patterns (filip.dupanovic@gmail.com)
|
|
15
|
+
|
|
16
|
+
### Patches
|
|
17
|
+
|
|
18
|
+
- fix(workspace): Revise build command (filip.dupanovic@gmail.com)
|
|
19
|
+
|
|
7
20
|
## 0.3.0
|
|
8
21
|
|
|
9
|
-
Wed, 01 May 2024 23:11:
|
|
22
|
+
Wed, 01 May 2024 23:11:18 GMT
|
|
10
23
|
|
|
11
24
|
### Minor changes
|
|
12
25
|
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Project as BaseProject, type ProjectOptions as BaseProjectOptions } from 'projen';
|
|
2
|
+
import { type BeachballConfig } from 'beachball';
|
|
3
|
+
import { type LintSynthesizedOptions } from '@langri-sha/projen-lint-synthesized';
|
|
4
|
+
import { type EditorConfigOptions } from '@langri-sha/projen-editorconfig';
|
|
5
|
+
export interface ProjectOptions extends BaseProjectOptions {
|
|
6
|
+
beachballConfig?: BeachballConfig;
|
|
7
|
+
/**
|
|
8
|
+
* EditorConfig options.
|
|
9
|
+
*/
|
|
10
|
+
editorConfigOptions?: EditorConfigOptions;
|
|
11
|
+
lintSynthesizedOptions?: LintSynthesizedOptions;
|
|
12
|
+
withTerraform?: boolean;
|
|
13
|
+
withTypeScript?: boolean;
|
|
14
|
+
workspaces?: string[];
|
|
15
|
+
}
|
|
16
|
+
export declare class Project extends BaseProject {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(options: ProjectOptions);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;AAExC,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IAIxD,eAAe,CAAC,EAAE,eAAe,CAAA;IAEjC;;OAEG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;IAKzC,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;IAI/C,aAAa,CAAC,EAAE,OAAO,CAAA;IAKvB,cAAc,CAAC,EAAE,OAAO,CAAA;IAKxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB;AAED,qBAAa,OAAQ,SAAQ,WAAW;;gBAC1B,OAAO,EAAE,cAAc;CAwGpC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
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
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _Project_instances, _Project_configureBeachball, _Project_configureDefaultTask, _Project_configureLintSynthesized, _Project_configureEditorConfig, _Project_createPnpmWorkspaces;
|
|
7
|
+
import { Project as BaseProject, TextFile, YamlFile, } from 'projen';
|
|
8
|
+
import * as R from 'ramda';
|
|
9
|
+
import { LintSynthesized, } from '@langri-sha/projen-lint-synthesized';
|
|
10
|
+
import { EditorConfig, } from '@langri-sha/projen-editorconfig';
|
|
11
|
+
export class Project extends BaseProject {
|
|
12
|
+
constructor(options) {
|
|
13
|
+
super({
|
|
14
|
+
...options,
|
|
15
|
+
gitIgnoreOptions: getGitIgnoreOptions(options),
|
|
16
|
+
});
|
|
17
|
+
_Project_instances.add(this);
|
|
18
|
+
// Clean up tasks not required at top-level.
|
|
19
|
+
this.tasks.removeTask('build');
|
|
20
|
+
this.tasks.removeTask('compile');
|
|
21
|
+
this.tasks.removeTask('eject');
|
|
22
|
+
this.tasks.removeTask('package');
|
|
23
|
+
this.tasks.removeTask('post-compile');
|
|
24
|
+
this.tasks.removeTask('pre-compile');
|
|
25
|
+
this.tasks.removeTask('watch');
|
|
26
|
+
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureBeachball).call(this, options);
|
|
27
|
+
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureDefaultTask).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureEditorConfig).call(this, options);
|
|
29
|
+
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureLintSynthesized).call(this, options);
|
|
30
|
+
__classPrivateFieldGet(this, _Project_instances, "m", _Project_createPnpmWorkspaces).call(this, options);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
_Project_instances = new WeakSet(), _Project_configureBeachball = function _Project_configureBeachball({ beachballConfig }) {
|
|
34
|
+
if (!beachballConfig) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const options = deepMerge(beachballConfig, {
|
|
38
|
+
branch: 'origin/main',
|
|
39
|
+
gitTags: false,
|
|
40
|
+
ignorePatterns: [
|
|
41
|
+
'*.test.*',
|
|
42
|
+
'.*/**',
|
|
43
|
+
'__snapshots__/',
|
|
44
|
+
'dist/',
|
|
45
|
+
'node_modules/',
|
|
46
|
+
],
|
|
47
|
+
});
|
|
48
|
+
const file = new TextFile(this, 'beachball.config.js', {
|
|
49
|
+
readonly: true,
|
|
50
|
+
marker: true,
|
|
51
|
+
});
|
|
52
|
+
for (const line of [
|
|
53
|
+
`/** @type {import('beachball').BeachballConfig} */`,
|
|
54
|
+
`module.exports = ${JSON.stringify(options, null, 2)}`,
|
|
55
|
+
]) {
|
|
56
|
+
file.addLine(line);
|
|
57
|
+
}
|
|
58
|
+
}, _Project_configureDefaultTask = function _Project_configureDefaultTask() {
|
|
59
|
+
this.tasks
|
|
60
|
+
.tryFind('default')
|
|
61
|
+
?.exec(`node --loader ts-node/esm .projenrc.mts`);
|
|
62
|
+
}, _Project_configureLintSynthesized = function _Project_configureLintSynthesized({ lintSynthesizedOptions }) {
|
|
63
|
+
new LintSynthesized(this, lintSynthesizedOptions ?? {
|
|
64
|
+
'*.{js,jsx,ts,tsx}': 'pnpm eslint --fix',
|
|
65
|
+
'*': 'pnpm prettier --write --ignore-unknown',
|
|
66
|
+
});
|
|
67
|
+
}, _Project_configureEditorConfig = function _Project_configureEditorConfig({ editorConfigOptions }) {
|
|
68
|
+
if (!editorConfigOptions) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const defaults = {
|
|
72
|
+
'*': {
|
|
73
|
+
// eslint-disable-next-line unicorn/text-encoding-identifier-case
|
|
74
|
+
charset: 'utf-8',
|
|
75
|
+
end_of_line: 'lf',
|
|
76
|
+
indent_style: 'space',
|
|
77
|
+
indent_size: 2,
|
|
78
|
+
insert_final_newline: true,
|
|
79
|
+
trim_trailing_whitespace: true,
|
|
80
|
+
},
|
|
81
|
+
Dockerfile: {
|
|
82
|
+
indent_style: 'tab',
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
new EditorConfig(this, deepMerge(editorConfigOptions ?? {}, defaults));
|
|
86
|
+
}, _Project_createPnpmWorkspaces = function _Project_createPnpmWorkspaces({ workspaces }) {
|
|
87
|
+
if (!workspaces) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
new YamlFile(this, 'pnpm-workspace.yaml', {
|
|
91
|
+
readonly: true,
|
|
92
|
+
marker: true,
|
|
93
|
+
obj: {
|
|
94
|
+
packages: workspaces,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
const getGitIgnoreOptions = ({ withTerraform, withTypeScript, ...options }) => ({
|
|
99
|
+
...options.gitIgnoreOptions,
|
|
100
|
+
ignorePatterns: [
|
|
101
|
+
...`
|
|
102
|
+
.*
|
|
103
|
+
!.babelrc
|
|
104
|
+
!.dockerignore
|
|
105
|
+
!.editorconfig
|
|
106
|
+
!.eslintignore
|
|
107
|
+
!.eslintrc.js
|
|
108
|
+
!.gitattributes
|
|
109
|
+
!.gitignore
|
|
110
|
+
!.gitkeep
|
|
111
|
+
!.husky
|
|
112
|
+
!.npmignore
|
|
113
|
+
!.openssl
|
|
114
|
+
!.prettierignore
|
|
115
|
+
!.projenrc*
|
|
116
|
+
${withTerraform ? '!.terraform.lock.hcl' : ''}
|
|
117
|
+
*.db
|
|
118
|
+
*.log
|
|
119
|
+
${withTypeScript ? '*.tsbuildinfo' : ''}
|
|
120
|
+
|
|
121
|
+
!.github/
|
|
122
|
+
!.husky/
|
|
123
|
+
!.projen/
|
|
124
|
+
${options.workspaces?.map((workspace) => `${workspace}/lib/`).join('\n') ?? ''}
|
|
125
|
+
node_modules/
|
|
126
|
+
`
|
|
127
|
+
.split('\n')
|
|
128
|
+
.map((pattern) => pattern.trim())
|
|
129
|
+
.filter((pattern) => pattern.length > 0),
|
|
130
|
+
...(options.gitIgnoreOptions?.ignorePatterns ?? []),
|
|
131
|
+
],
|
|
132
|
+
});
|
|
133
|
+
const deepMerge = R.mergeDeepWith(R.concat);
|
|
134
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,OAAO,IAAI,WAAW,EAEtB,QAAQ,EACR,QAAQ,GACT,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,CAAC,MAAM,OAAO,CAAA;AAG1B,OAAO,EACL,eAAe,GAEhB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,YAAY,GAEb,MAAM,iCAAiC,CAAA;AAiCxC,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC,YAAY,OAAuB;QACjC,KAAK,CAAC;YACJ,GAAG,OAAO;YACV,gBAAgB,EAAE,mBAAmB,CAAC,OAAO,CAAC;SAC/C,CAAC,CAAA;;QAEF,4CAA4C;QAC5C,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QAC9B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;QAChC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QAC9B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;QAChC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAA;QACrC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;QACpC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QAE9B,uBAAA,IAAI,uDAAoB,MAAxB,IAAI,EAAqB,OAAO,CAAC,CAAA;QACjC,uBAAA,IAAI,yDAAsB,MAA1B,I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C,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,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langri-sha/projen-project",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "
|
|
6
|
+
"main": "dist/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@langri-sha/projen-editorconfig": "0.2.0",
|
|
9
|
-
"@langri-sha/projen-lint-synthesized": "0.1.1",
|
|
10
8
|
"beachball": "2.43.1",
|
|
11
|
-
"ramda": "0.29.1"
|
|
9
|
+
"ramda": "0.29.1",
|
|
10
|
+
"@langri-sha/projen-editorconfig": "0.3.0",
|
|
11
|
+
"@langri-sha/projen-lint-synthesized": "0.2.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@langri-sha/jest-test": "0.2.0",
|
|
15
|
-
"@langri-sha/tsconfig": "0.2.0",
|
|
16
14
|
"@types/ramda": "0.29.12",
|
|
17
|
-
"projen": "0.81.1"
|
|
15
|
+
"projen": "0.81.1",
|
|
16
|
+
"@langri-sha/jest-test": "0.7.0",
|
|
17
|
+
"@langri-sha/tsconfig": "0.9.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"projen": "^0.81.1",
|
|
@@ -22,5 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
25
|
+
},
|
|
26
|
+
"scripts": {},
|
|
27
|
+
"types": "dist/index.d.ts"
|
|
28
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`defaults 1`] = `
|
|
4
|
-
{
|
|
5
|
-
".gitignore": "# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
|
6
|
-
.*
|
|
7
|
-
!.babelrc
|
|
8
|
-
!.dockerignore
|
|
9
|
-
!.editorconfig
|
|
10
|
-
!.eslintignore
|
|
11
|
-
!.eslintrc.js
|
|
12
|
-
!.gitattributes
|
|
13
|
-
!.gitignore
|
|
14
|
-
!.gitkeep
|
|
15
|
-
!.husky
|
|
16
|
-
!.npmignore
|
|
17
|
-
!.openssl
|
|
18
|
-
!.prettierignore
|
|
19
|
-
!.projenrc*
|
|
20
|
-
*.db
|
|
21
|
-
*.log
|
|
22
|
-
!.github/
|
|
23
|
-
!.husky/
|
|
24
|
-
!.projen/
|
|
25
|
-
dist/
|
|
26
|
-
local/
|
|
27
|
-
node_modules/
|
|
28
|
-
!/.gitattributes
|
|
29
|
-
!/.projen/tasks.json
|
|
30
|
-
!/.projen/deps.json
|
|
31
|
-
!/.projen/files.json
|
|
32
|
-
",
|
|
33
|
-
".projen/files.json": {
|
|
34
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
35
|
-
"files": [
|
|
36
|
-
".gitattributes",
|
|
37
|
-
".gitignore",
|
|
38
|
-
".projen/deps.json",
|
|
39
|
-
".projen/files.json",
|
|
40
|
-
".projen/tasks.json",
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
".projen/tasks.json": {
|
|
44
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
45
|
-
"tasks": {
|
|
46
|
-
"default": {
|
|
47
|
-
"description": "Synthesize project files",
|
|
48
|
-
"name": "default",
|
|
49
|
-
"steps": [
|
|
50
|
-
{
|
|
51
|
-
"exec": "node --loader ts-node/esm .projenrc.mts",
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
"test": {
|
|
56
|
-
"description": "Run tests",
|
|
57
|
-
"name": "test",
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
}
|
|
62
|
-
`;
|
|
63
|
-
|
|
64
|
-
exports[`with Beachball configuration 1`] = `
|
|
65
|
-
{
|
|
66
|
-
".gitignore": "# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
|
67
|
-
.*
|
|
68
|
-
!.babelrc
|
|
69
|
-
!.dockerignore
|
|
70
|
-
!.editorconfig
|
|
71
|
-
!.eslintignore
|
|
72
|
-
!.eslintrc.js
|
|
73
|
-
!.gitattributes
|
|
74
|
-
!.gitignore
|
|
75
|
-
!.gitkeep
|
|
76
|
-
!.husky
|
|
77
|
-
!.npmignore
|
|
78
|
-
!.openssl
|
|
79
|
-
!.prettierignore
|
|
80
|
-
!.projenrc*
|
|
81
|
-
*.db
|
|
82
|
-
*.log
|
|
83
|
-
!.github/
|
|
84
|
-
!.husky/
|
|
85
|
-
!.projen/
|
|
86
|
-
dist/
|
|
87
|
-
local/
|
|
88
|
-
node_modules/
|
|
89
|
-
!/.gitattributes
|
|
90
|
-
!/.projen/tasks.json
|
|
91
|
-
!/.projen/deps.json
|
|
92
|
-
!/.projen/files.json
|
|
93
|
-
!/beachball.config.js
|
|
94
|
-
",
|
|
95
|
-
".projen/files.json": {
|
|
96
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
97
|
-
"files": [
|
|
98
|
-
".gitattributes",
|
|
99
|
-
".gitignore",
|
|
100
|
-
".projen/deps.json",
|
|
101
|
-
".projen/files.json",
|
|
102
|
-
".projen/tasks.json",
|
|
103
|
-
"beachball.config.js",
|
|
104
|
-
],
|
|
105
|
-
},
|
|
106
|
-
".projen/tasks.json": {
|
|
107
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
108
|
-
"tasks": {
|
|
109
|
-
"default": {
|
|
110
|
-
"description": "Synthesize project files",
|
|
111
|
-
"name": "default",
|
|
112
|
-
"steps": [
|
|
113
|
-
{
|
|
114
|
-
"exec": "node --loader ts-node/esm .projenrc.mts",
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
},
|
|
118
|
-
"test": {
|
|
119
|
-
"description": "Run tests",
|
|
120
|
-
"name": "test",
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
"beachball.config.js": "/** @type {import('beachball').BeachballConfig} */
|
|
125
|
-
module.exports = {
|
|
126
|
-
"branch": "origin/main",
|
|
127
|
-
"gitTags": false,
|
|
128
|
-
"ignorePatterns": [
|
|
129
|
-
"*.test.*",
|
|
130
|
-
".*/**",
|
|
131
|
-
"__snapshots__/",
|
|
132
|
-
"dist/",
|
|
133
|
-
"node_modules/"
|
|
134
|
-
]
|
|
135
|
-
}",
|
|
136
|
-
}
|
|
137
|
-
`;
|
|
138
|
-
|
|
139
|
-
exports[`with EditorConfig options 1`] = `
|
|
140
|
-
{
|
|
141
|
-
".editorconfig": "# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
|
142
|
-
|
|
143
|
-
root=true
|
|
144
|
-
|
|
145
|
-
[*]
|
|
146
|
-
charset=utf-8
|
|
147
|
-
end_of_line=lf
|
|
148
|
-
indent_style=space
|
|
149
|
-
indent_size=2
|
|
150
|
-
insert_final_newline=true
|
|
151
|
-
trim_trailing_whitespace=true
|
|
152
|
-
|
|
153
|
-
[Dockerfile]
|
|
154
|
-
indent_style=tab
|
|
155
|
-
",
|
|
156
|
-
".gitignore": "# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
|
157
|
-
.*
|
|
158
|
-
!.babelrc
|
|
159
|
-
!.dockerignore
|
|
160
|
-
!.editorconfig
|
|
161
|
-
!.eslintignore
|
|
162
|
-
!.eslintrc.js
|
|
163
|
-
!.gitattributes
|
|
164
|
-
!.gitignore
|
|
165
|
-
!.gitkeep
|
|
166
|
-
!.husky
|
|
167
|
-
!.npmignore
|
|
168
|
-
!.openssl
|
|
169
|
-
!.prettierignore
|
|
170
|
-
!.projenrc*
|
|
171
|
-
*.db
|
|
172
|
-
*.log
|
|
173
|
-
!.github/
|
|
174
|
-
!.husky/
|
|
175
|
-
!.projen/
|
|
176
|
-
dist/
|
|
177
|
-
local/
|
|
178
|
-
node_modules/
|
|
179
|
-
!/.gitattributes
|
|
180
|
-
!/.projen/tasks.json
|
|
181
|
-
!/.projen/deps.json
|
|
182
|
-
!/.projen/files.json
|
|
183
|
-
!/.editorconfig
|
|
184
|
-
",
|
|
185
|
-
".projen/files.json": {
|
|
186
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
187
|
-
"files": [
|
|
188
|
-
".editorconfig",
|
|
189
|
-
".gitattributes",
|
|
190
|
-
".gitignore",
|
|
191
|
-
".projen/deps.json",
|
|
192
|
-
".projen/files.json",
|
|
193
|
-
".projen/tasks.json",
|
|
194
|
-
],
|
|
195
|
-
},
|
|
196
|
-
".projen/tasks.json": {
|
|
197
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
198
|
-
"tasks": {
|
|
199
|
-
"default": {
|
|
200
|
-
"description": "Synthesize project files",
|
|
201
|
-
"name": "default",
|
|
202
|
-
"steps": [
|
|
203
|
-
{
|
|
204
|
-
"exec": "node --loader ts-node/esm .projenrc.mts",
|
|
205
|
-
},
|
|
206
|
-
],
|
|
207
|
-
},
|
|
208
|
-
"test": {
|
|
209
|
-
"description": "Run tests",
|
|
210
|
-
"name": "test",
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
},
|
|
214
|
-
}
|
|
215
|
-
`;
|
|
216
|
-
|
|
217
|
-
exports[`with Terraform enabled 1`] = `
|
|
218
|
-
{
|
|
219
|
-
".gitignore": "# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
|
220
|
-
.*
|
|
221
|
-
!.babelrc
|
|
222
|
-
!.dockerignore
|
|
223
|
-
!.editorconfig
|
|
224
|
-
!.eslintignore
|
|
225
|
-
!.eslintrc.js
|
|
226
|
-
!.gitattributes
|
|
227
|
-
!.gitignore
|
|
228
|
-
!.gitkeep
|
|
229
|
-
!.husky
|
|
230
|
-
!.npmignore
|
|
231
|
-
!.openssl
|
|
232
|
-
!.prettierignore
|
|
233
|
-
!.projenrc*
|
|
234
|
-
!.terraform.lock.hcl
|
|
235
|
-
*.db
|
|
236
|
-
*.log
|
|
237
|
-
!.github/
|
|
238
|
-
!.husky/
|
|
239
|
-
!.projen/
|
|
240
|
-
dist/
|
|
241
|
-
local/
|
|
242
|
-
node_modules/
|
|
243
|
-
!/.gitattributes
|
|
244
|
-
!/.projen/tasks.json
|
|
245
|
-
!/.projen/deps.json
|
|
246
|
-
!/.projen/files.json
|
|
247
|
-
",
|
|
248
|
-
".projen/files.json": {
|
|
249
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
250
|
-
"files": [
|
|
251
|
-
".gitattributes",
|
|
252
|
-
".gitignore",
|
|
253
|
-
".projen/deps.json",
|
|
254
|
-
".projen/files.json",
|
|
255
|
-
".projen/tasks.json",
|
|
256
|
-
],
|
|
257
|
-
},
|
|
258
|
-
".projen/tasks.json": {
|
|
259
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
260
|
-
"tasks": {
|
|
261
|
-
"default": {
|
|
262
|
-
"description": "Synthesize project files",
|
|
263
|
-
"name": "default",
|
|
264
|
-
"steps": [
|
|
265
|
-
{
|
|
266
|
-
"exec": "node --loader ts-node/esm .projenrc.mts",
|
|
267
|
-
},
|
|
268
|
-
],
|
|
269
|
-
},
|
|
270
|
-
"test": {
|
|
271
|
-
"description": "Run tests",
|
|
272
|
-
"name": "test",
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
}
|
|
277
|
-
`;
|
|
278
|
-
|
|
279
|
-
exports[`with TypeScript enabled 1`] = `
|
|
280
|
-
{
|
|
281
|
-
".gitignore": "# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
|
282
|
-
.*
|
|
283
|
-
!.babelrc
|
|
284
|
-
!.dockerignore
|
|
285
|
-
!.editorconfig
|
|
286
|
-
!.eslintignore
|
|
287
|
-
!.eslintrc.js
|
|
288
|
-
!.gitattributes
|
|
289
|
-
!.gitignore
|
|
290
|
-
!.gitkeep
|
|
291
|
-
!.husky
|
|
292
|
-
!.npmignore
|
|
293
|
-
!.openssl
|
|
294
|
-
!.prettierignore
|
|
295
|
-
!.projenrc*
|
|
296
|
-
*.db
|
|
297
|
-
*.log
|
|
298
|
-
*.tsbuildinfo
|
|
299
|
-
!.github/
|
|
300
|
-
!.husky/
|
|
301
|
-
!.projen/
|
|
302
|
-
dist/
|
|
303
|
-
local/
|
|
304
|
-
node_modules/
|
|
305
|
-
!/.gitattributes
|
|
306
|
-
!/.projen/tasks.json
|
|
307
|
-
!/.projen/deps.json
|
|
308
|
-
!/.projen/files.json
|
|
309
|
-
",
|
|
310
|
-
".projen/files.json": {
|
|
311
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
312
|
-
"files": [
|
|
313
|
-
".gitattributes",
|
|
314
|
-
".gitignore",
|
|
315
|
-
".projen/deps.json",
|
|
316
|
-
".projen/files.json",
|
|
317
|
-
".projen/tasks.json",
|
|
318
|
-
],
|
|
319
|
-
},
|
|
320
|
-
".projen/tasks.json": {
|
|
321
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
322
|
-
"tasks": {
|
|
323
|
-
"default": {
|
|
324
|
-
"description": "Synthesize project files",
|
|
325
|
-
"name": "default",
|
|
326
|
-
"steps": [
|
|
327
|
-
{
|
|
328
|
-
"exec": "node --loader ts-node/esm .projenrc.mts",
|
|
329
|
-
},
|
|
330
|
-
],
|
|
331
|
-
},
|
|
332
|
-
"test": {
|
|
333
|
-
"description": "Run tests",
|
|
334
|
-
"name": "test",
|
|
335
|
-
},
|
|
336
|
-
},
|
|
337
|
-
},
|
|
338
|
-
}
|
|
339
|
-
`;
|
|
340
|
-
|
|
341
|
-
exports[`with workspaces 1`] = `
|
|
342
|
-
{
|
|
343
|
-
".gitignore": "# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
|
344
|
-
.*
|
|
345
|
-
!.babelrc
|
|
346
|
-
!.dockerignore
|
|
347
|
-
!.editorconfig
|
|
348
|
-
!.eslintignore
|
|
349
|
-
!.eslintrc.js
|
|
350
|
-
!.gitattributes
|
|
351
|
-
!.gitignore
|
|
352
|
-
!.gitkeep
|
|
353
|
-
!.husky
|
|
354
|
-
!.npmignore
|
|
355
|
-
!.openssl
|
|
356
|
-
!.prettierignore
|
|
357
|
-
!.projenrc*
|
|
358
|
-
*.db
|
|
359
|
-
*.log
|
|
360
|
-
!.github/
|
|
361
|
-
!.husky/
|
|
362
|
-
!.projen/
|
|
363
|
-
dist/
|
|
364
|
-
local/
|
|
365
|
-
node_modules/
|
|
366
|
-
!/.gitattributes
|
|
367
|
-
!/.projen/tasks.json
|
|
368
|
-
!/.projen/deps.json
|
|
369
|
-
!/.projen/files.json
|
|
370
|
-
!/pnpm-workspace.yaml
|
|
371
|
-
",
|
|
372
|
-
".projen/files.json": {
|
|
373
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
374
|
-
"files": [
|
|
375
|
-
".gitattributes",
|
|
376
|
-
".gitignore",
|
|
377
|
-
".projen/deps.json",
|
|
378
|
-
".projen/files.json",
|
|
379
|
-
".projen/tasks.json",
|
|
380
|
-
"pnpm-workspace.yaml",
|
|
381
|
-
],
|
|
382
|
-
},
|
|
383
|
-
".projen/tasks.json": {
|
|
384
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
|
|
385
|
-
"tasks": {
|
|
386
|
-
"default": {
|
|
387
|
-
"description": "Synthesize project files",
|
|
388
|
-
"name": "default",
|
|
389
|
-
"steps": [
|
|
390
|
-
{
|
|
391
|
-
"exec": "node --loader ts-node/esm .projenrc.mts",
|
|
392
|
-
},
|
|
393
|
-
],
|
|
394
|
-
},
|
|
395
|
-
"test": {
|
|
396
|
-
"description": "Run tests",
|
|
397
|
-
"name": "test",
|
|
398
|
-
},
|
|
399
|
-
},
|
|
400
|
-
},
|
|
401
|
-
"pnpm-workspace.yaml": "# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
|
402
|
-
|
|
403
|
-
packages:
|
|
404
|
-
- packages/*
|
|
405
|
-
",
|
|
406
|
-
}
|
|
407
|
-
`;
|
package/src/index.test.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { synthSnapshot } from 'projen/lib/util/synth'
|
|
2
|
-
import { expect, test } from '@langri-sha/jest-test'
|
|
3
|
-
|
|
4
|
-
import { Project } from './index'
|
|
5
|
-
|
|
6
|
-
test('defaults', () => {
|
|
7
|
-
const project = new Project({
|
|
8
|
-
name: 'test-project',
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
expect(synthSnapshot(project)).toMatchSnapshot()
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
test('with Beachball configuration', () => {
|
|
15
|
-
const project = new Project({
|
|
16
|
-
name: 'test-project',
|
|
17
|
-
beachballConfig: {},
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
expect(synthSnapshot(project)).toMatchSnapshot()
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
test('with EditorConfig options', () => {
|
|
24
|
-
const project = new Project({
|
|
25
|
-
name: 'test-project',
|
|
26
|
-
editorConfigOptions: {},
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
expect(synthSnapshot(project)).toMatchSnapshot()
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
test('with Terraform enabled', () => {
|
|
33
|
-
const project = new Project({
|
|
34
|
-
name: 'test-project',
|
|
35
|
-
withTerraform: true,
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
expect(synthSnapshot(project)).toMatchSnapshot()
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
test('with TypeScript enabled', () => {
|
|
42
|
-
const project = new Project({
|
|
43
|
-
name: 'test-project',
|
|
44
|
-
withTypeScript: true,
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
expect(synthSnapshot(project)).toMatchSnapshot()
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
test('with workspaces', () => {
|
|
51
|
-
const project = new Project({
|
|
52
|
-
name: 'test-project',
|
|
53
|
-
workspaces: ['packages/*'],
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
expect(synthSnapshot(project)).toMatchSnapshot()
|
|
57
|
-
})
|
package/tsconfig.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
-
"extends": "@langri-sha/tsconfig/project.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"baseUrl": ".",
|
|
6
|
-
"outDir": ".tsbuild"
|
|
7
|
-
},
|
|
8
|
-
"references": [
|
|
9
|
-
{ "path": "../jest-test" },
|
|
10
|
-
{ "path": "../projen-editorconfig" },
|
|
11
|
-
{ "path": "../projen-lint-synthesized" },
|
|
12
|
-
{ "path": "../tsconfig" }
|
|
13
|
-
]
|
|
14
|
-
}
|