-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.projenrc.ts
95 lines (83 loc) · 2.41 KB
/
.projenrc.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import { typescript, github, javascript, ReleasableCommits } from "projen";
const projectUrl = "https://github.com/libreworks/db-provision-pgsql";
const project = new typescript.TypeScriptProject({
name: "db-provision-pgsql",
description:
"Provisions a PostgreSQL database and schema with logins and grants",
keywords: [
"database",
"postgresql",
"login",
"grant",
"authentication",
"authorization",
],
authorName: "LibreWorks Contributors",
authorUrl: `${projectUrl}/contributors`,
authorOrganization: true,
license: "MIT",
repository: `${projectUrl}.git`,
homepage: "https://libreworks.github.io/db-provision-pgsql/",
bugsUrl: `${projectUrl}/issues`,
deps: ["pg"],
devDeps: ["@jest/globals", "@types/pg", "tsx"],
minNodeVersion: "18.0.0",
workflowNodeVersion: "22",
tsconfig: {
compilerOptions: {
moduleResolution: javascript.TypeScriptModuleResolution.NODE16,
module: "node16",
lib: ["DOM", "ES2022"],
target: "es2022",
},
},
projenrcTs: true,
prettier: true,
codeCov: true,
docgen: true,
jestOptions: {
jestConfig: {
extensionsToTreatAsEsm: [".ts"],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
},
},
tsJestOptions: {
transformPattern: "^.+\\.ts$",
transformOptions: {
useESM: true,
},
},
majorVersion: 0,
defaultReleaseBranch: "main",
githubOptions: {
projenCredentials: github.GithubCredentials.fromApp({}),
pullRequestLintOptions: {
semanticTitleOptions: { types: ["feat", "fix", "chore", "docs"] },
},
},
autoApproveOptions: {
// Anyone with write access to this repository can have auto-approval.
allowedUsernames: [],
},
depsUpgradeOptions: {
workflowOptions: {
labels: ["auto-approve"],
schedule: javascript.UpgradeDependenciesSchedule.WEEKLY,
},
},
releasableCommits: ReleasableCommits.featuresAndFixes(),
releaseToNpm: true,
packageName: "@libreworks/db-provision-pgsql",
npmAccess: javascript.NpmAccess.PUBLIC,
npmignore: ["docs"],
});
project.package.file.addOverride("type", "module");
project.package.file.addOverride("private", false);
project.testTask.env("NODE_OPTIONS", "--experimental-vm-modules");
const [{ exec: projenrcCommand = "" }] = project.defaultTask!.steps;
project.defaultTask!.reset(
projenrcCommand.replace("ts-node", "tsx").replace("--project", "--tsconfig"),
);
project.synth();