aws-delivlib 14.4.0 → 14.4.1
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/.gitattributes +1 -1
- package/.projenrc.ts +130 -0
- package/package.json +3 -2
package/.gitattributes
CHANGED
package/.projenrc.ts
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { typescript } from 'projen';
|
|
2
|
+
|
|
3
|
+
const project = new typescript.TypeScriptProject({
|
|
4
|
+
name: 'aws-delivlib',
|
|
5
|
+
projenrcTs: true,
|
|
6
|
+
description: 'A fabulous library for defining continuous pipelines for building, testing and releasing code libraries.',
|
|
7
|
+
repository: 'https://github.com/cdklabs/aws-delivlib.git',
|
|
8
|
+
defaultReleaseBranch: 'main',
|
|
9
|
+
authorName: 'Amazon Web Services',
|
|
10
|
+
authorUrl: 'https://aws.amazon.com',
|
|
11
|
+
minNodeVersion: '16.14.0',
|
|
12
|
+
keywords: [
|
|
13
|
+
'aws-cdk',
|
|
14
|
+
'continuous-delivery',
|
|
15
|
+
'continuous-integration',
|
|
16
|
+
'ci-cd',
|
|
17
|
+
],
|
|
18
|
+
deps: ['changelog-parser'],
|
|
19
|
+
depsUpgradeOptions: {
|
|
20
|
+
exclude: ['aws-cdk-lib', 'constructs'],
|
|
21
|
+
},
|
|
22
|
+
devDeps: [
|
|
23
|
+
'@types/aws-lambda',
|
|
24
|
+
'@types/fs-extra',
|
|
25
|
+
'@types/tar',
|
|
26
|
+
'@types/adm-zip',
|
|
27
|
+
'@types/follow-redirects',
|
|
28
|
+
'aws-cdk',
|
|
29
|
+
'jest-create-mock-instance',
|
|
30
|
+
'constructs',
|
|
31
|
+
'aws-cdk-lib',
|
|
32
|
+
'standard-version',
|
|
33
|
+
'ts-jest',
|
|
34
|
+
'typescript',
|
|
35
|
+
'aws-sdk',
|
|
36
|
+
'aws-sdk-mock',
|
|
37
|
+
'node-ical@0.15.1', // need to pin due to https://github.com/axios/axios/issues/5101
|
|
38
|
+
'rrule',
|
|
39
|
+
'esbuild',
|
|
40
|
+
'fs-extra',
|
|
41
|
+
'tar',
|
|
42
|
+
'adm-zip',
|
|
43
|
+
'JSONStream',
|
|
44
|
+
'follow-redirects',
|
|
45
|
+
'minipass@3.2.1', // temporary (hopefully) workaround for https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/60901
|
|
46
|
+
],
|
|
47
|
+
peerDeps: [
|
|
48
|
+
'constructs',
|
|
49
|
+
'aws-cdk-lib',
|
|
50
|
+
],
|
|
51
|
+
srcdir: 'lib',
|
|
52
|
+
testdir: 'lib/__tests__',
|
|
53
|
+
|
|
54
|
+
pullRequestTemplate: false,
|
|
55
|
+
autoApproveOptions: {
|
|
56
|
+
allowedUsernames: ['cdklabs-automation'],
|
|
57
|
+
secret: 'GITHUB_TOKEN',
|
|
58
|
+
},
|
|
59
|
+
autoApproveUpgrades: true,
|
|
60
|
+
releaseToNpm: true,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// trick projen so that it doesn't override the version in package.json
|
|
64
|
+
project.tasks.addEnvironment('RELEASE', '1');
|
|
65
|
+
|
|
66
|
+
project.gitignore.exclude('cdk.out');
|
|
67
|
+
project.gitignore.exclude('pipeline/*.js');
|
|
68
|
+
project.gitignore.exclude('pipeline/*.d.ts');
|
|
69
|
+
project.setScript('cdk', 'npx cdk');
|
|
70
|
+
|
|
71
|
+
const integDiff = project.addTask('integ:diff');
|
|
72
|
+
integDiff.exec('/bin/bash ./lib/__tests__/run-test.sh');
|
|
73
|
+
|
|
74
|
+
const integUpdate = project.addTask('integ:update');
|
|
75
|
+
integUpdate.exec('/bin/bash ./lib/__tests__/run-test.sh update');
|
|
76
|
+
|
|
77
|
+
// Need to run with UTC TZ, or else node-ical does very wrong things with timestamps and fails tests...
|
|
78
|
+
project.testTask.env('TZ', 'UTC');
|
|
79
|
+
project.testTask.spawn(integDiff);
|
|
80
|
+
|
|
81
|
+
// Run yarn install in the github publisher directory
|
|
82
|
+
const buildGithubPublisher = project.addTask('build:publishing/github');
|
|
83
|
+
buildGithubPublisher.exec('yarn install --frozen-lockfile', { cwd: 'lib/publishing/github' });
|
|
84
|
+
buildGithubPublisher.exec('yarn tsc --build', { cwd: 'lib/publishing/github' });
|
|
85
|
+
project.compileTask.prependSpawn(buildGithubPublisher);
|
|
86
|
+
// Exclude the publisher from the root tsconfig, but add a reference to it
|
|
87
|
+
project.tsconfig?.addExclude('lib/publishing/github');
|
|
88
|
+
project.tsconfig?.file.addOverride('references', [{ path: 'lib/publishing/github' }]);
|
|
89
|
+
|
|
90
|
+
const compileCustomResourceHandlers = project.addTask('compile:custom-resource-handlers');
|
|
91
|
+
compileCustomResourceHandlers.exec('/bin/bash ./build-custom-resource-handlers.sh');
|
|
92
|
+
|
|
93
|
+
project.compileTask.prependSpawn(compileCustomResourceHandlers);
|
|
94
|
+
|
|
95
|
+
project.gitignore.include('lib/package-integrity/handler/JSONStream.d.ts');
|
|
96
|
+
const bundlePackageIntegrity = project.addTask('bundle:package-integrity', {
|
|
97
|
+
description: 'Bundle the package integrity script',
|
|
98
|
+
exec: [
|
|
99
|
+
'esbuild',
|
|
100
|
+
'--bundle',
|
|
101
|
+
'lib/package-integrity/handler/validate.js',
|
|
102
|
+
'--target="node14"',
|
|
103
|
+
'--platform="node"',
|
|
104
|
+
'--outfile="lib/package-integrity/handler/validate.bundle.js"',
|
|
105
|
+
'--sourcemap=inline',
|
|
106
|
+
].join(' '),
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
project.compileTask.spawn(bundlePackageIntegrity);
|
|
110
|
+
|
|
111
|
+
// The npmignore file includes original source files, which is undesirable.
|
|
112
|
+
project.npmignore?.exclude(
|
|
113
|
+
'/lib/**/*.ts',
|
|
114
|
+
);
|
|
115
|
+
project.npmignore?.include(
|
|
116
|
+
'/lib/**/*.d.ts',
|
|
117
|
+
'/lib/**/node_modules/**',
|
|
118
|
+
);
|
|
119
|
+
// Also includes other undesirable assets.
|
|
120
|
+
project.npmignore?.exclude(
|
|
121
|
+
'/lib/__tests__/',
|
|
122
|
+
'tsconfig.json',
|
|
123
|
+
'tsconfig.dev.json',
|
|
124
|
+
'tsconfig.tsbuildinfo',
|
|
125
|
+
'/build-*.sh',
|
|
126
|
+
'cdk.out/',
|
|
127
|
+
'cdk.json',
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
project.synth();
|
package/package.json
CHANGED
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"standard-version": "^9",
|
|
72
72
|
"tar": "^6.1.15",
|
|
73
73
|
"ts-jest": "^29.1.0",
|
|
74
|
+
"ts-node": "^10.9.1",
|
|
74
75
|
"typescript": "~4.9.5"
|
|
75
76
|
},
|
|
76
77
|
"peerDependencies": {
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
},
|
|
92
93
|
"main": "lib/index.js",
|
|
93
94
|
"license": "Apache-2.0",
|
|
94
|
-
"version": "14.4.
|
|
95
|
+
"version": "14.4.1",
|
|
95
96
|
"jest": {
|
|
96
97
|
"testMatch": [
|
|
97
98
|
"**/lib/__tests__/**/?(*.)+(spec|test).js?(x)"
|
|
@@ -128,5 +129,5 @@
|
|
|
128
129
|
"snapshotResolver": "./.projen/jest-snapshot-resolver.js"
|
|
129
130
|
},
|
|
130
131
|
"types": "lib/index.d.ts",
|
|
131
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.
|
|
132
|
+
"//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"."
|
|
132
133
|
}
|