|
1 | | -import { Vitest } from '@nikovirtala/projen-vitest' |
2 | | -import { Biome } from 'projen-biome' |
| 1 | +import { Vitest } from "@nikovirtala/projen-vitest"; |
| 2 | +import { GithubCredentials } from "projen/lib/github"; |
| 3 | +import { NodePackageManager } from "projen/lib/javascript"; |
3 | 4 | import { |
4 | | - HybridModule, |
5 | | - publishToRegistries, |
6 | | -} from 'projen-cdktf-hybrid-construct' |
7 | | -import { GithubCredentials } from 'projen/lib/github' |
8 | | -import { NodePackageManager } from 'projen/lib/javascript' |
| 5 | + HybridModule, |
| 6 | + publishToRegistries, |
| 7 | +} from "projen-cdktf-hybrid-construct"; |
| 8 | + |
9 | 9 | const project = new HybridModule({ |
10 | | - author: 'Hi-Fi', |
11 | | - authorAddress: '[email protected]', |
12 | | - defaultReleaseBranch: 'main', |
13 | | - packageManager: NodePackageManager.NPM, |
14 | | - devDeps: [ |
15 | | - 'projen-cdktf-hybrid-construct', |
16 | | - '@aws-sdk/client-ecs', |
17 | | - '@nikovirtala/projen-vitest', |
18 | | - 'projen-biome', |
19 | | - ], |
20 | | - license: 'MIT', |
21 | | - jsiiVersion: '~5.8.0', |
22 | | - constructVersion: '10.4.2', |
23 | | - name: 'terraform-cdk-serverless-github-actions-runner-controller', |
24 | | - projenrcTs: true, |
25 | | - projenCredentials: GithubCredentials.fromPersonalAccessToken({ |
26 | | - secret: 'GITHUB_TOKEN', |
27 | | - }), |
28 | | - depsUpgradeOptions: { |
29 | | - workflow: false, |
30 | | - }, |
31 | | - renovatebot: true, |
32 | | - renovatebotOptions: { |
33 | | - overrideConfig: { |
34 | | - lockFileMaintenance: { enabled: true }, |
35 | | - }, |
36 | | - }, |
37 | | - repositoryUrl: |
38 | | - 'https://github.com/Hi-Fi/terraform-cdk-serverless-github-actions-runner-controller.git', |
39 | | - peerDeps: [ |
40 | | - '@cdktf/provider-azurerm', |
41 | | - '@cdktf/provider-random', |
42 | | - '@cdktf/provider-aws', |
43 | | - '@cdktf/provider-google', |
44 | | - '@cdktf/provider-null', |
45 | | - ], |
46 | | - ...publishToRegistries({ |
47 | | - name: 'serverless-github-actions-runner-controller', |
48 | | - namespace: 'hi-fi', |
49 | | - registries: ['npm'], |
50 | | - }), |
51 | | - // use Vitest instead |
52 | | - jest: false, |
53 | | - // use Biome instead |
54 | | - eslint: false, |
55 | | - prettier: false, |
56 | | - testdir: 'tests', |
57 | | - // cdktfVersion: "0.20.0", /* Minimum target version of this library. */ |
58 | | - // constructExamples: undefined, /* If set a construct examples folder will be created. */ |
59 | | - // deps: [], /* Runtime dependencies of this module. */ |
60 | | - // description: undefined, /* The description is just a string that helps people understand the purpose of the package. */ |
61 | | - // packageName: undefined, /* The "name" in package.json. */ |
62 | | - // terraformExamples: undefined, /* If set a terraform examples folder will be created. */ |
63 | | -}) |
| 10 | + author: "Hi-Fi", |
| 11 | + authorAddress: "[email protected]", |
| 12 | + defaultReleaseBranch: "main", |
| 13 | + packageManager: NodePackageManager.NPM, |
| 14 | + devDeps: [ |
| 15 | + "projen-cdktf-hybrid-construct", |
| 16 | + "@aws-sdk/client-ecs", |
| 17 | + "@nikovirtala/projen-vitest", |
| 18 | + ], |
| 19 | + license: "MIT", |
| 20 | + jsiiVersion: "~5.8.0", |
| 21 | + constructVersion: "10.4.2", |
| 22 | + name: "terraform-cdk-serverless-github-actions-runner-controller", |
| 23 | + projenrcTs: true, |
| 24 | + projenCredentials: GithubCredentials.fromPersonalAccessToken({ |
| 25 | + secret: "GITHUB_TOKEN", |
| 26 | + }), |
| 27 | + depsUpgradeOptions: { |
| 28 | + workflow: false, |
| 29 | + }, |
| 30 | + renovatebot: true, |
| 31 | + renovatebotOptions: { |
| 32 | + overrideConfig: { |
| 33 | + lockFileMaintenance: { enabled: true }, |
| 34 | + }, |
| 35 | + }, |
| 36 | + repositoryUrl: |
| 37 | + "https://github.com/Hi-Fi/terraform-cdk-serverless-github-actions-runner-controller.git", |
| 38 | + peerDeps: [ |
| 39 | + "@cdktf/provider-azurerm", |
| 40 | + "@cdktf/provider-random", |
| 41 | + "@cdktf/provider-aws", |
| 42 | + "@cdktf/provider-google", |
| 43 | + "@cdktf/provider-null", |
| 44 | + ], |
| 45 | + ...publishToRegistries({ |
| 46 | + name: "serverless-github-actions-runner-controller", |
| 47 | + namespace: "hi-fi", |
| 48 | + registries: ["npm"], |
| 49 | + }), |
| 50 | + // use Vitest instead |
| 51 | + jest: false, |
| 52 | + // use Biome instead |
| 53 | + eslint: false, |
| 54 | + prettier: false, |
| 55 | + biome: true, |
| 56 | + testdir: "tests", |
| 57 | + // cdktfVersion: "0.20.0", /* Minimum target version of this library. */ |
| 58 | + // constructExamples: undefined, /* If set a construct examples folder will be created. */ |
| 59 | + // deps: [], /* Runtime dependencies of this module. */ |
| 60 | + // description: undefined, /* The description is just a string that helps people understand the purpose of the package. */ |
| 61 | + // packageName: undefined, /* The "name" in package.json. */ |
| 62 | + // terraformExamples: undefined, /* If set a terraform examples folder will be created. */ |
| 63 | +}); |
64 | 64 |
|
65 | 65 | project.github?.actions.set( |
66 | | - 'hashicorp/setup-terraform', |
67 | | - 'hashicorp/setup-terraform@v3', |
68 | | -) |
| 66 | + "hashicorp/setup-terraform", |
| 67 | + "hashicorp/setup-terraform@v3", |
| 68 | +); |
69 | 69 |
|
70 | | -new Vitest(project) |
71 | | -new Biome(project, { |
72 | | - formatter: true, |
73 | | - linter: true, |
74 | | - organizeImports: true, |
75 | | -}) |
| 70 | +new Vitest(project); |
76 | 71 |
|
77 | 72 | // Update actions |
78 | 73 |
|
79 | 74 | project.github?.actions.set( |
80 | | - 'actions/upload-artifact', |
81 | | - |
82 | | -) |
| 75 | + "actions/upload-artifact", |
| 76 | + |
| 77 | +); |
83 | 78 |
|
84 | 79 | project.github?.actions.set( |
85 | | - 'amannn/action-semantic-pull-request', |
86 | | - |
87 | | -) |
| 80 | + "amannn/action-semantic-pull-request", |
| 81 | + |
| 82 | +); |
88 | 83 |
|
89 | | -project.synth() |
| 84 | +project.package.addPackageResolutions("[email protected]"); |
| 85 | +project.synth(); |
0 commit comments