@mrgrain/cdk-esbuild 3.5.0 → 3.7.2
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 -0
- package/.jsii +581 -355
- package/.projenrc.ts +63 -24
- package/API.md +463 -179
- package/CHANGELOG.md +400 -0
- package/README.md +16 -6
- package/lib/asset.d.ts +20 -6
- package/lib/asset.js +33 -18
- package/lib/bundler.d.ts +44 -6
- package/lib/bundler.js +31 -14
- package/lib/code.d.ts +83 -27
- package/lib/code.js +85 -24
- package/lib/esbuild-types.d.ts +7 -4
- package/lib/esbuild-types.js +1 -1
- package/lib/esbuild-wrapper.d.ts +0 -1
- package/lib/formatMessages.d.ts +0 -1
- package/lib/index.d.ts +4 -5
- package/lib/index.js +3 -1
- package/lib/inline-code.d.ts +0 -1
- package/lib/inline-code.js +4 -4
- package/lib/source.d.ts +81 -6
- package/lib/source.js +84 -8
- package/package.json +13 -16
- package/lib/asset.d.ts.map +0 -1
- package/lib/bundler.d.ts.map +0 -1
- package/lib/code.d.ts.map +0 -1
- package/lib/esbuild-types.d.ts.map +0 -1
- package/lib/esbuild-wrapper.d.ts.map +0 -1
- package/lib/formatMessages.d.ts.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/inline-code.d.ts.map +0 -1
- package/lib/source.d.ts.map +0 -1
- package/projenrc/TypeScriptSourceFile.ts +0 -50
- package/releasetag.txt +0 -1
- package/version.txt +0 -1
package/.projenrc.ts
CHANGED
|
@@ -2,10 +2,11 @@ import {
|
|
|
2
2
|
awscdk,
|
|
3
3
|
javascript,
|
|
4
4
|
JsonFile,
|
|
5
|
-
release,
|
|
6
5
|
vscode,
|
|
7
6
|
} from 'projen';
|
|
7
|
+
import { ReleaseTrigger } from 'projen/lib/release';
|
|
8
8
|
import { SourceFile } from 'ts-morph';
|
|
9
|
+
import { tagOnNpm } from './projenrc/release';
|
|
9
10
|
import { TypeScriptSourceFile } from './projenrc/TypeScriptSourceFile';
|
|
10
11
|
|
|
11
12
|
const project = new awscdk.AwsCdkConstructLibrary({
|
|
@@ -19,7 +20,7 @@ const project = new awscdk.AwsCdkConstructLibrary({
|
|
|
19
20
|
|
|
20
21
|
// Project info
|
|
21
22
|
name: '@mrgrain/cdk-esbuild',
|
|
22
|
-
repositoryUrl: '
|
|
23
|
+
repositoryUrl: 'https://github.com/mrgrain/cdk-esbuild',
|
|
23
24
|
description:
|
|
24
25
|
'CDK constructs for esbuild, an extremely fast JavaScript bundler',
|
|
25
26
|
homepage: 'https://github.com/mrgrain/cdk-esbuild',
|
|
@@ -55,17 +56,15 @@ const project = new awscdk.AwsCdkConstructLibrary({
|
|
|
55
56
|
coveragePathIgnorePatterns: ['/node_modules/', '/examples/'],
|
|
56
57
|
},
|
|
57
58
|
},
|
|
58
|
-
eslintOptions: {
|
|
59
|
-
lintProjenRc: false,
|
|
60
|
-
dirs: ['src', 'projenrc', '.projenrc.ts'],
|
|
61
|
-
},
|
|
62
59
|
|
|
63
60
|
// Release
|
|
64
61
|
packageManager: javascript.NodePackageManager.NPM,
|
|
65
62
|
npmDistTag: 'latest',
|
|
66
63
|
defaultReleaseBranch: 'main',
|
|
67
64
|
majorVersion: 3,
|
|
68
|
-
releaseTrigger:
|
|
65
|
+
releaseTrigger: {
|
|
66
|
+
isContinuous: false,
|
|
67
|
+
} as ReleaseTrigger,
|
|
69
68
|
catalog: {
|
|
70
69
|
twitter: '@mrgrain',
|
|
71
70
|
},
|
|
@@ -93,7 +92,6 @@ const project = new awscdk.AwsCdkConstructLibrary({
|
|
|
93
92
|
'cdk.out',
|
|
94
93
|
'.cdk.staging',
|
|
95
94
|
'examples/template',
|
|
96
|
-
'!/.github/workflows/manual-release.yml',
|
|
97
95
|
'!/examples/**',
|
|
98
96
|
],
|
|
99
97
|
npmignore: [
|
|
@@ -108,9 +106,66 @@ const project = new awscdk.AwsCdkConstructLibrary({
|
|
|
108
106
|
'/examples',
|
|
109
107
|
'PUBLISHING.md',
|
|
110
108
|
'.vscode',
|
|
109
|
+
'projenrc',
|
|
111
110
|
],
|
|
112
111
|
});
|
|
113
112
|
|
|
113
|
+
// test against latest versions
|
|
114
|
+
const REPO_TEMP_DIRECTORY = '.repo';
|
|
115
|
+
project.buildWorkflow?.addPostBuildJob('test-latest-versions', {
|
|
116
|
+
runsOn: ['ubuntu-latest'],
|
|
117
|
+
permissions: {},
|
|
118
|
+
tools: {
|
|
119
|
+
node: { version: '18.x' },
|
|
120
|
+
},
|
|
121
|
+
steps: [
|
|
122
|
+
{
|
|
123
|
+
name: 'Prepare Repository',
|
|
124
|
+
run: `mv ${project.artifactsDirectory} ${'.repo'}`,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'Bump CDK versions',
|
|
128
|
+
run: `cd ${REPO_TEMP_DIRECTORY} && npx npm-check-updates -u "/^(@aws-cdk|aws-cdk)/"`,
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'Install Dependencies',
|
|
132
|
+
run: `cd ${REPO_TEMP_DIRECTORY} && ${project.package.installAndUpdateLockfileCommand}`,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'Run tests',
|
|
136
|
+
run: `cd ${REPO_TEMP_DIRECTORY} && ${project.runTaskCommand(project.testTask)}`,
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// release only via manual trigger
|
|
142
|
+
project.release?.publisher?.publishToGit({
|
|
143
|
+
changelogFile: 'dist/dist/changelog.md',
|
|
144
|
+
versionFile: 'dist/dist/version.txt',
|
|
145
|
+
releaseTagFile: 'dist/dist/releasetag.txt',
|
|
146
|
+
projectChangelogFile: 'CHANGELOG.md',
|
|
147
|
+
gitBranch: 'main',
|
|
148
|
+
});
|
|
149
|
+
project.tryFindObjectFile('.github/workflows/release.yml')?.addToArray(
|
|
150
|
+
'jobs.release.steps',
|
|
151
|
+
{
|
|
152
|
+
name: 'Publish tag',
|
|
153
|
+
run: 'npx projen publish:git',
|
|
154
|
+
},
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
// add additional tags on npm
|
|
158
|
+
project.tryFindObjectFile('.github/workflows/release.yml')?.addToArray(
|
|
159
|
+
'jobs.release_npm.steps',
|
|
160
|
+
tagOnNpm(project.package.packageName, ['cdk-v2', 'unstable', 'next']),
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
// eslint
|
|
164
|
+
project.eslint?.addRules({
|
|
165
|
+
'@typescript-eslint/member-ordering': 'off',
|
|
166
|
+
});
|
|
167
|
+
project.eslint?.addIgnorePattern('examples/');
|
|
168
|
+
|
|
114
169
|
|
|
115
170
|
// VSCode config
|
|
116
171
|
new JsonFile(project, '.vscode/extensions.json', {
|
|
@@ -153,22 +208,6 @@ new vscode.VsCode(project).launchConfiguration.addConfiguration({
|
|
|
153
208
|
project.tryFindObjectFile('package.json')?.addOverride('optionalDependencies', {
|
|
154
209
|
esbuild: '^0.14.0',
|
|
155
210
|
});
|
|
156
|
-
project.tryFindObjectFile('package.json')?.addOverride('overrides', {
|
|
157
|
-
'@types/prettier': '2.6.0',
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
project.eslint?.addRules({
|
|
161
|
-
'@typescript-eslint/member-ordering': 'off',
|
|
162
|
-
});
|
|
163
|
-
project.eslint?.addOverride({
|
|
164
|
-
files: ['projenrc/*.ts'],
|
|
165
|
-
rules: {
|
|
166
|
-
'@typescript-eslint/no-require-imports': 'off',
|
|
167
|
-
'import/no-extraneous-dependencies': 'off',
|
|
168
|
-
},
|
|
169
|
-
});
|
|
170
|
-
project.eslint?.addIgnorePattern('examples/');
|
|
171
|
-
project.eslint?.addIgnorePattern('!projenrc/*.ts');
|
|
172
211
|
|
|
173
212
|
new TypeScriptSourceFile(project, 'src/esbuild-types.ts', {
|
|
174
213
|
source: 'node_modules/esbuild/lib/main.d.ts',
|