@mrgrain/cdk-esbuild 2.1.0 → 3.0.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/.jsii +2695 -887
- package/.projenrc.ts +12 -20
- package/API.md +17 -17
- package/CHANGELOG.md +349 -0
- package/README.md +22 -20
- package/SECURITY.md +6 -5
- package/lib/asset.d.ts +2 -2
- package/lib/asset.js +8 -7
- package/lib/bundler.d.ts +1 -1
- package/lib/bundler.js +5 -5
- package/lib/code.d.ts +4 -3
- package/lib/code.js +6 -6
- package/lib/inline-code.d.ts +1 -1
- package/lib/inline-code.js +6 -6
- package/lib/source.d.ts +2 -2
- package/lib/source.js +6 -6
- package/package.json +13 -30
package/.projenrc.ts
CHANGED
|
@@ -59,7 +59,7 @@ const project = new AwsCdkConstructLibrary({
|
|
|
59
59
|
packageManager: NodePackageManager.NPM,
|
|
60
60
|
npmDistTag: 'latest',
|
|
61
61
|
defaultReleaseBranch: 'main',
|
|
62
|
-
majorVersion:
|
|
62
|
+
majorVersion: 3,
|
|
63
63
|
releaseTrigger: release.ReleaseTrigger.manual(),
|
|
64
64
|
catalog: {
|
|
65
65
|
twitter: '@mrgrain',
|
|
@@ -67,27 +67,19 @@ const project = new AwsCdkConstructLibrary({
|
|
|
67
67
|
workflowContainerImage: 'jsii/superchain:1-buster-slim-node14',
|
|
68
68
|
|
|
69
69
|
// Dependencies
|
|
70
|
-
cdkVersion: '
|
|
71
|
-
|
|
72
|
-
'
|
|
73
|
-
'@aws-cdk/aws-s3',
|
|
74
|
-
'@aws-cdk/aws-s3-assets',
|
|
75
|
-
'@aws-cdk/aws-s3-deployment',
|
|
76
|
-
'@aws-cdk/aws-synthetics',
|
|
77
|
-
'@aws-cdk/core',
|
|
78
|
-
],
|
|
79
|
-
cdkTestDependencies: [
|
|
80
|
-
'@aws-cdk/assert',
|
|
81
|
-
'@aws-cdk/aws-lambda',
|
|
82
|
-
'@aws-cdk/aws-s3',
|
|
83
|
-
'@aws-cdk/aws-s3-assets',
|
|
84
|
-
'@aws-cdk/aws-s3-deployment',
|
|
85
|
-
'@aws-cdk/aws-synthetics',
|
|
86
|
-
'@aws-cdk/core',
|
|
70
|
+
cdkVersion: '2.0.0',
|
|
71
|
+
peerDeps: [
|
|
72
|
+
'aws-cdk-lib@^2.0.0',
|
|
87
73
|
],
|
|
74
|
+
cdkDependencies: [],
|
|
75
|
+
cdkTestDependencies: [],
|
|
76
|
+
cdkAssert: false,
|
|
88
77
|
devDeps: [
|
|
78
|
+
'@aws-cdk/aws-synthetics-alpha',
|
|
89
79
|
'@types/eslint',
|
|
90
|
-
'
|
|
80
|
+
'aws-cdk-lib@2.0.0',
|
|
81
|
+
'constructs@10.0.5',
|
|
82
|
+
'esbuild@^0.14.0',
|
|
91
83
|
'ts-morph',
|
|
92
84
|
],
|
|
93
85
|
|
|
@@ -118,7 +110,7 @@ const project = new AwsCdkConstructLibrary({
|
|
|
118
110
|
|
|
119
111
|
const packageJson = project.tryFindObjectFile('package.json');
|
|
120
112
|
packageJson?.addOverride('optionalDependencies', {
|
|
121
|
-
esbuild: '^0.
|
|
113
|
+
esbuild: '^0.14.0',
|
|
122
114
|
});
|
|
123
115
|
packageJson?.addOverride('jest.testPathIgnorePatterns.1', '/examples/');
|
|
124
116
|
|
package/API.md
CHANGED
|
@@ -791,7 +791,7 @@ const codeConfig: CodeConfig = { ... }
|
|
|
791
791
|
public readonly s3Location: Location;
|
|
792
792
|
```
|
|
793
793
|
|
|
794
|
-
- *Type:* [
|
|
794
|
+
- *Type:* [`aws-cdk-lib.aws_s3.Location`](#aws-cdk-lib.aws_s3.Location)
|
|
795
795
|
|
|
796
796
|
The location of the code in S3.
|
|
797
797
|
|
|
@@ -1563,7 +1563,7 @@ E.g. `src/index.ts`.
|
|
|
1563
1563
|
public readonly image: DockerImage;
|
|
1564
1564
|
```
|
|
1565
1565
|
|
|
1566
|
-
- *Type:* [
|
|
1566
|
+
- *Type:* [`aws-cdk-lib.DockerImage`](#aws-cdk-lib.DockerImage)
|
|
1567
1567
|
|
|
1568
1568
|
---
|
|
1569
1569
|
|
|
@@ -1573,7 +1573,7 @@ public readonly image: DockerImage;
|
|
|
1573
1573
|
public readonly local: ILocalBundling;
|
|
1574
1574
|
```
|
|
1575
1575
|
|
|
1576
|
-
- *Type:* [
|
|
1576
|
+
- *Type:* [`aws-cdk-lib.ILocalBundling`](#aws-cdk-lib.ILocalBundling)
|
|
1577
1577
|
|
|
1578
1578
|
Implementation of `ILocalBundling` interface, responsible for calling esbuild functions.
|
|
1579
1579
|
|
|
@@ -1764,7 +1764,7 @@ new JavaScriptAsset(scope: Construct, id: string, props: AssetProps)
|
|
|
1764
1764
|
|
|
1765
1765
|
##### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptAsset.parameter.scope"></a>
|
|
1766
1766
|
|
|
1767
|
-
- *Type:* [
|
|
1767
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
1768
1768
|
|
|
1769
1769
|
---
|
|
1770
1770
|
|
|
@@ -1829,7 +1829,7 @@ public bind(scope: Construct)
|
|
|
1829
1829
|
|
|
1830
1830
|
###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptCode.parameter.scope"></a>
|
|
1831
1831
|
|
|
1832
|
-
- *Type:* [
|
|
1832
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
1833
1833
|
|
|
1834
1834
|
---
|
|
1835
1835
|
|
|
@@ -1841,13 +1841,13 @@ public bindToResource(resource: CfnResource, options?: ResourceBindOptions)
|
|
|
1841
1841
|
|
|
1842
1842
|
###### `resource`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptCode.parameter.resource"></a>
|
|
1843
1843
|
|
|
1844
|
-
- *Type:* [
|
|
1844
|
+
- *Type:* [`aws-cdk-lib.CfnResource`](#aws-cdk-lib.CfnResource)
|
|
1845
1845
|
|
|
1846
1846
|
---
|
|
1847
1847
|
|
|
1848
1848
|
###### `options`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptCode.parameter.options"></a>
|
|
1849
1849
|
|
|
1850
|
-
- *Type:* [
|
|
1850
|
+
- *Type:* [`aws-cdk-lib.aws_lambda.ResourceBindOptions`](#aws-cdk-lib.aws_lambda.ResourceBindOptions)
|
|
1851
1851
|
|
|
1852
1852
|
---
|
|
1853
1853
|
|
|
@@ -1871,7 +1871,7 @@ Determines whether this Code is inline code or not.
|
|
|
1871
1871
|
|
|
1872
1872
|
### JavaScriptSource <a name="@mrgrain/cdk-esbuild.JavaScriptSource"></a>
|
|
1873
1873
|
|
|
1874
|
-
- *Implements:* [
|
|
1874
|
+
- *Implements:* [`aws-cdk-lib.aws_s3_deployment.ISource`](#aws-cdk-lib.aws_s3_deployment.ISource)
|
|
1875
1875
|
|
|
1876
1876
|
#### Initializers <a name="@mrgrain/cdk-esbuild.JavaScriptSource.Initializer"></a>
|
|
1877
1877
|
|
|
@@ -1903,13 +1903,13 @@ public bind(scope: Construct, context?: DeploymentSourceContext)
|
|
|
1903
1903
|
|
|
1904
1904
|
###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptSource.parameter.scope"></a>
|
|
1905
1905
|
|
|
1906
|
-
- *Type:* [
|
|
1906
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
1907
1907
|
|
|
1908
1908
|
---
|
|
1909
1909
|
|
|
1910
1910
|
###### `context`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptSource.parameter.context"></a>
|
|
1911
1911
|
|
|
1912
|
-
- *Type:* [
|
|
1912
|
+
- *Type:* [`aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext`](#aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext)
|
|
1913
1913
|
|
|
1914
1914
|
---
|
|
1915
1915
|
|
|
@@ -1943,7 +1943,7 @@ new TypeScriptAsset(scope: Construct, id: string, props: AssetProps)
|
|
|
1943
1943
|
|
|
1944
1944
|
##### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptAsset.parameter.scope"></a>
|
|
1945
1945
|
|
|
1946
|
-
- *Type:* [
|
|
1946
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
1947
1947
|
|
|
1948
1948
|
---
|
|
1949
1949
|
|
|
@@ -2008,7 +2008,7 @@ public bind(scope: Construct)
|
|
|
2008
2008
|
|
|
2009
2009
|
###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptCode.parameter.scope"></a>
|
|
2010
2010
|
|
|
2011
|
-
- *Type:* [
|
|
2011
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
2012
2012
|
|
|
2013
2013
|
---
|
|
2014
2014
|
|
|
@@ -2020,13 +2020,13 @@ public bindToResource(resource: CfnResource, options?: ResourceBindOptions)
|
|
|
2020
2020
|
|
|
2021
2021
|
###### `resource`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptCode.parameter.resource"></a>
|
|
2022
2022
|
|
|
2023
|
-
- *Type:* [
|
|
2023
|
+
- *Type:* [`aws-cdk-lib.CfnResource`](#aws-cdk-lib.CfnResource)
|
|
2024
2024
|
|
|
2025
2025
|
---
|
|
2026
2026
|
|
|
2027
2027
|
###### `options`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptCode.parameter.options"></a>
|
|
2028
2028
|
|
|
2029
|
-
- *Type:* [
|
|
2029
|
+
- *Type:* [`aws-cdk-lib.aws_lambda.ResourceBindOptions`](#aws-cdk-lib.aws_lambda.ResourceBindOptions)
|
|
2030
2030
|
|
|
2031
2031
|
---
|
|
2032
2032
|
|
|
@@ -2050,7 +2050,7 @@ Determines whether this Code is inline code or not.
|
|
|
2050
2050
|
|
|
2051
2051
|
### TypeScriptSource <a name="@mrgrain/cdk-esbuild.TypeScriptSource"></a>
|
|
2052
2052
|
|
|
2053
|
-
- *Implements:* [
|
|
2053
|
+
- *Implements:* [`aws-cdk-lib.aws_s3_deployment.ISource`](#aws-cdk-lib.aws_s3_deployment.ISource)
|
|
2054
2054
|
|
|
2055
2055
|
#### Initializers <a name="@mrgrain/cdk-esbuild.TypeScriptSource.Initializer"></a>
|
|
2056
2056
|
|
|
@@ -2082,13 +2082,13 @@ public bind(scope: Construct, context?: DeploymentSourceContext)
|
|
|
2082
2082
|
|
|
2083
2083
|
###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptSource.parameter.scope"></a>
|
|
2084
2084
|
|
|
2085
|
-
- *Type:* [
|
|
2085
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
2086
2086
|
|
|
2087
2087
|
---
|
|
2088
2088
|
|
|
2089
2089
|
###### `context`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptSource.parameter.context"></a>
|
|
2090
2090
|
|
|
2091
|
-
- *Type:* [
|
|
2091
|
+
- *Type:* [`aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext`](#aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext)
|
|
2092
2092
|
|
|
2093
2093
|
---
|
|
2094
2094
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
## [3.0.0-rc.1](https://github.com/mrgrain/cdk-esbuild/compare/v2.2.0...v3.0.0-rc.1) (2021-12-09)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* package now requires AWS CDK v2
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* upgrade to AWS CDK v2 ([c83b3e4](https://github.com/mrgrain/cdk-esbuild/commit/c83b3e47ad5d6d325a1ca1fa4e450bd92d7276d2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* remove imports from aws-cdk-lib/core ([68ee09a](https://github.com/mrgrain/cdk-esbuild/commit/68ee09ab7dbf9cf5d0e8e8ca9eda5ea24fedae69))
|
|
17
|
+
|
|
18
|
+
## [1.133.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.132.0...v1.133.0) (2021-11-21)
|
|
19
|
+
|
|
20
|
+
## [1.132.0](https://github.com/mrgrain/cdk-esbuild/compare/v2.0.0...v1.132.0) (2021-11-21)
|
|
21
|
+
|
|
22
|
+
## [1.131.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.130.0...v1.131.0) (2021-11-07)
|
|
23
|
+
|
|
24
|
+
## [1.130.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.129.0...v1.130.0) (2021-11-07)
|
|
25
|
+
|
|
26
|
+
## [3.0.0-rc.0](https://github.com/mrgrain/cdk-esbuild/compare/v2.2.0...v3.0.0-rc.0) (2021-12-04)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### ⚠ BREAKING CHANGES
|
|
30
|
+
|
|
31
|
+
* package now requires AWS CDK v2
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* upgrade to AWS CDK v2 ([134caa8](https://github.com/mrgrain/cdk-esbuild/commit/134caa8848708a132c28d9140d2d569f90a2b178))
|
|
36
|
+
|
|
37
|
+
## [2.2.0](https://github.com/mrgrain/cdk-esbuild/compare/v2.1.0...v2.2.0) (2021-12-04)
|
|
38
|
+
|
|
39
|
+
**This release contains an upgrade of esbuild with backwards-incompatible changes.** This is inline with the versioning strategy for this package, which is to release esbuild upgrades with minor versions as long as esbuild has not reached version 1.0.0. The backwards-incompatible changes are fairly obscure this time around, but please make sure to read the [0.14.0 release notes](https://github.com/evanw/esbuild/releases/tag/v0.14.0).
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
- upgrade esbuild to [^0.14.0](https://github.com/evanw/esbuild/releases/tag/v0.14.0) ([#143](https://github.com/mrgrain/cdk-esbuild/issues/143)) ([4568b92](https://github.com/mrgrain/cdk-esbuild/commit/4568b92011a3e38f23d85998dcbbca1afa06918e))
|
|
44
|
+
- **examples/esbuild-with-plugins:** example of how to use the escape hatch to run esbuild with plugins ([#142](https://github.com/mrgrain/cdk-esbuild/issues/142)) ([0876f0e](https://github.com/mrgrain/cdk-esbuild/commit/0876f0e4d4bd65a792deef8adf43229568ab899b))
|
|
45
|
+
|
|
46
|
+
## [2.1.0](https://github.com/mrgrain/cdk-esbuild/compare/v2.0.0...v2.1.0) (2021-11-25)
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
- escape hatch to provide a custom build or transform function ([#141](https://github.com/mrgrain/cdk-esbuild/issues/141)) ([aacfac1](https://github.com/mrgrain/cdk-esbuild/commit/aacfac1b71f1de78fbfdc1161c6e8cf32fd0629e))
|
|
51
|
+
- `Inline*Code` now takes `TransformerProps` as second parameter, passing in `TransformOptions` is still supported but deprecated ([#141](https://github.com/mrgrain/cdk-esbuild/issues/141)) ([aacfac1](https://github.com/mrgrain/cdk-esbuild/commit/aacfac1b71f1de78fbfdc1161c6e8cf32fd0629e))
|
|
52
|
+
|
|
1
53
|
## [2.0.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.129.0...v2.0.0) (2021-11-07)
|
|
2
54
|
|
|
3
55
|
### ⚠ BREAKING CHANGES
|
|
@@ -20,3 +72,300 @@
|
|
|
20
72
|
- Synthesize `esbuild` types from source ([#117](https://github.com/mrgrain/cdk-esbuild/issues/117)) ([af44d55](https://github.com/mrgrain/cdk-esbuild/commit/af44d55e97db6fd8fbda916eb0f25dae55513cba))
|
|
21
73
|
|
|
22
74
|
- Generated docs now contain links to esbuild documentation ([#123](https://github.com/mrgrain/cdk-esbuild/issues/123)) ([95f2fd0](https://github.com/mrgrain/cdk-esbuild/commit/95f2fd07330cf9624dd05f23345bfe0f5754fc57))
|
|
75
|
+
|
|
76
|
+
## [1.133.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.132.0...v1.133.0) (2021-11-21)
|
|
77
|
+
|
|
78
|
+
- **This is a release on the legacy v1 branch. Please upgrade to v2 as soon as possible.**
|
|
79
|
+
- works with cdk-1.133.0
|
|
80
|
+
|
|
81
|
+
### ⛔ EXTREMELY IMPORTANT NOTICE FOR USERS WHO HAVE NOT UPGRADE TO v2 OF THIS PACKAGE
|
|
82
|
+
|
|
83
|
+
**tl;dr No more "versioned" release on this legacy branch.**
|
|
84
|
+
|
|
85
|
+
Until now, I have release a new version of this package every time a new CDK version was released. Even if no updates where necessary. This practice will stop with this release and I will only release a new version on the legacy v1 branch, if an update is required for compatibility. **Please upgrade to v2 of this package as soon as possible!**
|
|
86
|
+
|
|
87
|
+
[**Upgrading instructions to v2 of this package**](https://github.com/mrgrain/cdk-esbuild#migrating-to-v2)
|
|
88
|
+
|
|
89
|
+
If you're using the tag `cdk-v1`, you will already receive the latest stable v2 release. If you're using a versioned tag (e.g. `cdk-1.29.0`), this tag format is deprecated and release have not been tagged for a while now.
|
|
90
|
+
|
|
91
|
+
## [1.132.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.131.0...v1.132.0) (2021-11-21)
|
|
92
|
+
|
|
93
|
+
- works with cdk-1.132.0
|
|
94
|
+
|
|
95
|
+
### ⚠ IMPORTANT NOTICE
|
|
96
|
+
|
|
97
|
+
This is a release on the legacy v1 branch. Please upgrade to v2 as soon as possible.
|
|
98
|
+
|
|
99
|
+
If you're using the tag `cdk-v1`, you will already receive the latest stable v2 release. If you're using a versioned tag (e.g. `cdk-1.29.0`), this tag format is deprecated and future releases won't be tagged like this.
|
|
100
|
+
|
|
101
|
+
## [1.131.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.130.0...v1.131.0) (2021-11-07)
|
|
102
|
+
|
|
103
|
+
- works with cdk-1.131.0
|
|
104
|
+
|
|
105
|
+
### ⚠ IMPORTANT NOTICE
|
|
106
|
+
|
|
107
|
+
This is a release on the legacy v1 branch. Please upgrade to v2 as soon as possible.
|
|
108
|
+
|
|
109
|
+
If you're using the tag `cdk-v1`, you will already receive the latest stable v2 release. If you're using a versioned tag (e.g. `cdk-1.29.0`), this tag format is deprecated and future releases won't be tagged like this.
|
|
110
|
+
|
|
111
|
+
## [1.130.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.129.0...v1.130.0) (2021-11-07)
|
|
112
|
+
|
|
113
|
+
- works with cdk-1.130.0
|
|
114
|
+
|
|
115
|
+
### ⚠ IMPORTANT NOTICE
|
|
116
|
+
|
|
117
|
+
This is the first release on the legacy v1 branch. Please upgrade to v2 as soon as possible.
|
|
118
|
+
|
|
119
|
+
If you're using the tag `cdk-v1`, you will already receive the latest stable v2 release. If you're using a versioned tag (e.g. `cdk-1.29.0`), this tag format is deprecated and future releases won't be tagged like this.
|
|
120
|
+
|
|
121
|
+
## [1.129.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.128.0...v1.129.0) (2021-10-28)
|
|
122
|
+
|
|
123
|
+
### ⚠ IMPORTANT NOTICE
|
|
124
|
+
|
|
125
|
+
This will be the final release tagged with a specific version of AWS CDK (i.e. `cdk-1.29.0`). From now on, a single tag `cdk-v1` will point to the latest stable release for v1 of AWS CDK.
|
|
126
|
+
|
|
127
|
+
Please also note, that a new major version of this package already has a release candidate. Using the `cdk-v1` will result in BREAKING CHANGES once the new version is stable.
|
|
128
|
+
|
|
129
|
+
### Features
|
|
130
|
+
|
|
131
|
+
- works with cdk-1.129.0 ([d7631d4](https://github.com/mrgrain/cdk-esbuild/commit/d7631d4119e6ef66e0da02a35f9680196e94f124))
|
|
132
|
+
- deprecated Docker bundler ([6715463](https://github.com/mrgrain/cdk-esbuild/commit/6715463ee90f339ac261622597e39b2ee6c46d71))
|
|
133
|
+
|
|
134
|
+
## [1.128.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.127.0...v1.128.0) (2021-10-16)
|
|
135
|
+
|
|
136
|
+
- works with cdk-1.128.0
|
|
137
|
+
|
|
138
|
+
## [1.127.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.126.0...v1.127.0) (2021-10-09)
|
|
139
|
+
|
|
140
|
+
- works with cdk-1.127.0
|
|
141
|
+
- **example/website:** How to monitor a website with Synthetics ([621d2d4](https://github.com/mrgrain/cdk-esbuild/commit/621d2d4192da63fa385b76b59353ffe77023c38d))
|
|
142
|
+
|
|
143
|
+
## [1.126.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.126.0-beta.0...v1.126.0) (2021-10-09)
|
|
144
|
+
|
|
145
|
+
### Features
|
|
146
|
+
|
|
147
|
+
- works with cdk-1.126.0
|
|
148
|
+
- [Experimental] `Code` is now compatible with `@aws-cdk/aws-synthetics` ([#99](https://github.com/mrgrain/cdk-esbuild/issues/99)) ([f840300](https://github.com/mrgrain/cdk-esbuild/commit/f840300439f7175c46d173378d8e941b7dd80483))
|
|
149
|
+
|
|
150
|
+
## [1.125.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.124.0...v1.125.0) (2021-10-01)
|
|
151
|
+
|
|
152
|
+
### ⚠ BREAKING CHANGES
|
|
153
|
+
|
|
154
|
+
- `esbuild` released a breaking change to the tree shaking options and introduced a new way how platform-specific binaries are installed. Please check the esbuild v0.13.0 [release notes](https://github.com/evanw/esbuild/releases/tag/v0.12.0) for details.
|
|
155
|
+
|
|
156
|
+
### Features
|
|
157
|
+
|
|
158
|
+
- works with cdk-1.125.0
|
|
159
|
+
|
|
160
|
+
- upgrade `esbuild` minimum version to ^0.13.0 ([3d0b5ee](https://github.com/mrgrain/cdk-esbuild/commit/3d0b5ee5c01b7edcf7042a728932a0e1ce722d3c))
|
|
161
|
+
|
|
162
|
+
## [1.124.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.123.0...v1.124.0) (2021-10-01)
|
|
163
|
+
|
|
164
|
+
- works with cdk-1.124.0
|
|
165
|
+
|
|
166
|
+
## [1.123.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.122.0...v1.123.0) (2021-09-22)
|
|
167
|
+
|
|
168
|
+
- works with cdk-1.123.0
|
|
169
|
+
|
|
170
|
+
## [1.122.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.121.0...v1.122.0) (2021-09-12)
|
|
171
|
+
|
|
172
|
+
- works with cdk-1.122.0
|
|
173
|
+
|
|
174
|
+
## [1.121.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.120.0...v1.121.0) (2021-09-12)
|
|
175
|
+
|
|
176
|
+
- works with cdk-1.121.0
|
|
177
|
+
|
|
178
|
+
## [1.120.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.119.0...v1.120.0) (2021-09-12)
|
|
179
|
+
|
|
180
|
+
- works with cdk-1.120.0
|
|
181
|
+
|
|
182
|
+
## [1.119.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.118.0...v1.119.0) (2021-09-12)
|
|
183
|
+
|
|
184
|
+
- works with cdk-1.119.0
|
|
185
|
+
|
|
186
|
+
## [1.118.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.117.0...v1.118.0) (2021-09-12)
|
|
187
|
+
|
|
188
|
+
- works with cdk-1.118.0
|
|
189
|
+
|
|
190
|
+
### Bug Fixes
|
|
191
|
+
|
|
192
|
+
- fix error handling type issue in latest tsc version ([b5e36e2](https://github.com/mrgrain/cdk-esbuild/commit/b5e36e27481706ea5a7ac5f8c05d74418b07c125))
|
|
193
|
+
|
|
194
|
+
## [1.117.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.116.0...v1.117.0) (2021-08-08)
|
|
195
|
+
|
|
196
|
+
- works with cdk-1.117.0
|
|
197
|
+
|
|
198
|
+
## [1.116.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.115.0...v1.116.0) (2021-08-08)
|
|
199
|
+
|
|
200
|
+
- works with cdk-1.116.0
|
|
201
|
+
|
|
202
|
+
## [1.115.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.114.0...v1.115.0) (2021-08-08)
|
|
203
|
+
|
|
204
|
+
- works with cdk-1.115.0
|
|
205
|
+
|
|
206
|
+
## [1.114.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.113.0...v1.114.0) (2021-08-08)
|
|
207
|
+
|
|
208
|
+
- works with cdk-1.114.0
|
|
209
|
+
|
|
210
|
+
## [1.113.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.112.0...v1.113.0) (2021-08-08)
|
|
211
|
+
|
|
212
|
+
- works with cdk-1.113.0
|
|
213
|
+
|
|
214
|
+
## [1.112.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.111.0...v1.112.0) (2021-08-08)
|
|
215
|
+
|
|
216
|
+
- works with cdk-1.112.0
|
|
217
|
+
|
|
218
|
+
## [1.111.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.110.0...v1.111.0) (2021-08-08)
|
|
219
|
+
|
|
220
|
+
- works with cdk-1.111.0
|
|
221
|
+
|
|
222
|
+
## [1.110.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.109.0...v1.110.0) (2021-06-24)
|
|
223
|
+
|
|
224
|
+
- works with cdk-1.110.0
|
|
225
|
+
|
|
226
|
+
## [1.109.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.108.0...v1.109.0) (2021-06-24)
|
|
227
|
+
|
|
228
|
+
- works with cdk-1.109.0
|
|
229
|
+
|
|
230
|
+
## [1.108.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.107.0...v1.108.0) (2021-06-09)
|
|
231
|
+
|
|
232
|
+
- works with cdk-1.108.0
|
|
233
|
+
|
|
234
|
+
## [1.107.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.106.0...v1.107.0) (2021-06-03)
|
|
235
|
+
|
|
236
|
+
- works with cdk-1.107.0
|
|
237
|
+
|
|
238
|
+
## [1.106.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.105.0...v1.106.0) (2021-05-31)
|
|
239
|
+
|
|
240
|
+
- works with cdk-1.106.0
|
|
241
|
+
|
|
242
|
+
## [1.105.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.104.0...v1.105.0) (2021-05-19)
|
|
243
|
+
|
|
244
|
+
- works with cdk-1.105.0
|
|
245
|
+
|
|
246
|
+
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
247
|
+
|
|
248
|
+
- upgraded esbuild to [v0.12.0](https://github.com/evanw/esbuild/releases/tag/v0.12.0) which contains backwards-incompatible changes (mostly related to CSS bundling)
|
|
249
|
+
|
|
250
|
+
## [1.104.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.103.0...v1.104.0) (2021-05-19)
|
|
251
|
+
|
|
252
|
+
- works with cdk-1.104.0 ([fb0de78](https://github.com/mrgrain/cdk-esbuild/commit/fb0de78faf29815045822b8e80b2bbb07b8f7cbf))
|
|
253
|
+
|
|
254
|
+
## [1.103.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.102.0...v1.103.0) (2021-05-13)
|
|
255
|
+
|
|
256
|
+
- works with cdk-1.103.0
|
|
257
|
+
|
|
258
|
+
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
259
|
+
|
|
260
|
+
- removed deprecated `forceDockerBundling` and `localBundling` ([cc40b90](https://github.com/mrgrain/cdk-esbuild/commit/cc40b900acd8cba725e31db0a79cd3f8b711277e))
|
|
261
|
+
|
|
262
|
+
## [1.102.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.101.0...v1.102.0) (2021-05-04)
|
|
263
|
+
|
|
264
|
+
- works with cdk-1.102.0 ([c616c1b](https://github.com/mrgrain/cdk-esbuild/commit/c616c1ba07a9bdd11f3dc3369b1335918458800f))
|
|
265
|
+
|
|
266
|
+
### Features
|
|
267
|
+
|
|
268
|
+
- new high-level constructs prop `bundlerPriority` to replace deprecated `forceDockerBundling` ([cc4c933](https://github.com/mrgrain/cdk-esbuild/commit/cc4c93376cf3a8628edd696fe9fa8f65a09c7e21))
|
|
269
|
+
- **examples/lambda:** added new complete example for lambda function ([f8ca3c0](https://github.com/mrgrain/cdk-esbuild/commit/f8ca3c093a11f1d56b9f08cd0a4f3b3eaecd5690))
|
|
270
|
+
|
|
271
|
+
### Bug Fixes
|
|
272
|
+
|
|
273
|
+
- **examples/website:** changed start command to work with latest esbuild versions ([45b4c91](https://github.com/mrgrain/cdk-esbuild/commit/45b4c91b454a9520e3aca4ff66ed75abc2ea7d4a))
|
|
274
|
+
|
|
275
|
+
## [1.101.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.100.0...v1.101.0) (2021-05-01)
|
|
276
|
+
|
|
277
|
+
- works with cdk-1.101.0
|
|
278
|
+
|
|
279
|
+
### Features
|
|
280
|
+
|
|
281
|
+
- pretty print esbuild build errors and warnings when using local bundler ([7f15bed](https://github.com/mrgrain/cdk-esbuild/commit/7f15bedbdfb619c2d0767bc37458108e01c3a85e))
|
|
282
|
+
- pretty print esbuild transform errors and warnings ([1eeeb10](https://github.com/mrgrain/cdk-esbuild/commit/1eeeb10ca6b1e46452c55792d28429986eb4b09f))
|
|
283
|
+
- set bundling priority explicitly, deprecating `localBundling` in favour of `priority` ([425665a](https://github.com/mrgrain/cdk-esbuild/commit/425665a2f8f20bb557119e79e3354a4d9d696d24))
|
|
284
|
+
|
|
285
|
+
## [1.100.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.100.0-beta.1...v1.100.0) (2021-05-01)
|
|
286
|
+
|
|
287
|
+
- no changes, cdk version constraints are now less strict
|
|
288
|
+
|
|
289
|
+
## [1.99.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.98.0...v1.99.0) (2021-04-19)
|
|
290
|
+
|
|
291
|
+
- update to cdk-1.99.0 ([cfffb19](https://github.com/mrgrain/cdk-esbuild/commit/cfffb1901f8567ea81de3e7f746d8cffd50b4bcc))
|
|
292
|
+
|
|
293
|
+
## [1.98.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.97.0...v1.98.0) (2021-04-13)
|
|
294
|
+
|
|
295
|
+
- update to cdk-1.98.0 ([0165256](https://github.com/mrgrain/cdk-esbuild/commit/0165256d26a2b24b45b17cb747f63eff26c983d1))
|
|
296
|
+
|
|
297
|
+
## [1.97.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.96.0...v1.97.0) (2021-04-11)
|
|
298
|
+
|
|
299
|
+
- update to cdk-1.97.0 ([fedb40a](https://github.com/mrgrain/cdk-esbuild/commit/fedb40a3098cd3b2de5b113d79a2edd185789fde))
|
|
300
|
+
|
|
301
|
+
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
302
|
+
|
|
303
|
+
- esbuild minimum version updated to `^0.11.0` which includes [breaking changes re how some files are interpreted](https://github.com/evanw/esbuild/releases/tag/v0.10.0) as well as [updated behaviour for entry points](https://github.com/evanw/esbuild/releases/tag/v0.11.0); please check esbuild's change log ([35c9046](https://github.com/mrgrain/cdk-esbuild/commit/35c904666415797eb5e5f09add47edfe2979303e))
|
|
304
|
+
- use esbuild's handling of `process.env.NODE_ENV`, notably the value will now be set to `development` unless [minification](https://esbuild.github.io/api/#minify) is enabled ([04bc5ed](https://github.com/mrgrain/cdk-esbuild/commit/04bc5edb1eb40b42499ffb9dfd78dac28fea7602))
|
|
305
|
+
|
|
306
|
+
### Features
|
|
307
|
+
|
|
308
|
+
- support object maps for entry points ([62a4431](https://github.com/mrgrain/cdk-esbuild/commit/62a4431572a4b32acd45c569405d19244b1aa76a))
|
|
309
|
+
|
|
310
|
+
## [1.96.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.95.0...v1.96.0) (2021-04-11)
|
|
311
|
+
|
|
312
|
+
- update to cdk-1.96.0 ([ae26510](https://github.com/mrgrain/cdk-esbuild/commit/ae2651026617646833303f0b9259d564765273d5))
|
|
313
|
+
|
|
314
|
+
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
315
|
+
|
|
316
|
+
- removed deprecated `projectRoot` prop, please use `buildOptions.absWorkingPath` instead ([40e7ab0](https://github.com/mrgrain/cdk-esbuild/commit/40e7ab0ccd6fa52727f548168cbbc05afcfe4b16))
|
|
317
|
+
|
|
318
|
+
## [1.95.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.94.1...v1.95.0) (2021-03-28)
|
|
319
|
+
|
|
320
|
+
- update to cdk-1.95.0 ([0a98ef3](https://github.com/mrgrain/cdk-esbuild/commit/0a98ef311d92e1366f535bf18d7a5f10ac6ad02a))
|
|
321
|
+
|
|
322
|
+
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
323
|
+
|
|
324
|
+
- exported `TypeScriptAsset` & `JavaScriptAsset` are now implementing `s3.Asset` and replace the previously deprecated aliases for code classes of the same name; replace any previous use with `TypeScriptCode` & `JavaScriptCode` for lambda functions ([9b86eab](https://github.com/mrgrain/cdk-esbuild/commit/9b86eab91f82e66088a25248d7a4c754dbe73d85))
|
|
325
|
+
|
|
326
|
+
### Features
|
|
327
|
+
|
|
328
|
+
- added various InlineCode constructs using the transform api ([6ef1c97](https://github.com/mrgrain/cdk-esbuild/commit/6ef1c9756f22256c008e1f9725ea3b5b5a176e3c))
|
|
329
|
+
- support added for `outfile` build option ([90ef5ec](https://github.com/mrgrain/cdk-esbuild/commit/90ef5ecb5906e0f2fc76a933b9f0067f1aae6428))
|
|
330
|
+
|
|
331
|
+
### [1.94.1](https://github.com/mrgrain/cdk-esbuild/compare/v1.94.0...v1.94.1) (2021-03-17)
|
|
332
|
+
|
|
333
|
+
### Bug Fixes
|
|
334
|
+
|
|
335
|
+
- change cdk version constraints to work with patches ([fa0fa5f](https://github.com/mrgrain/cdk-esbuild/commit/fa0fa5fbdf608b14faf7a5e6132016fb6f2e393e))
|
|
336
|
+
|
|
337
|
+
## [1.94.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.93.1...v1.94.0) (2021-03-16)
|
|
338
|
+
|
|
339
|
+
- update to cdk-1.94.0 ([1623339](https://github.com/mrgrain/cdk-esbuild/commit/162333930a7534277c5ce4318f81df1fc954fe5e))
|
|
340
|
+
|
|
341
|
+
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
342
|
+
|
|
343
|
+
- deprecated ~~`TypeScriptAsset`~~ & ~~`JavaScriptAsset`~~ in favour of `TypeScriptCode` & `JavaScriptCode` ([f31074e](https://github.com/mrgrain/cdk-esbuild/commit/f31074eeeca039dc847f199eeff88313b61605a1))
|
|
344
|
+
- deprecated ~~`projectRoot`~~ in favour of `buildOptions.absWorkDir` ([ef7ae23](https://github.com/mrgrain/cdk-esbuild/commit/ef7ae237827e381fa2708d67a2d68214a33ab41b)) \
|
|
345
|
+
Now `absWorkDir` will take priority, then `projectRoot`. If neither are provided it falls back to the current working directory, which is esbuild's default behaviour. \
|
|
346
|
+
**The automatic project root detection has been removed.**
|
|
347
|
+
- upgraded esbuild dependency requirement to `^0.9.0` which [contains breaking changes](https://github.com/evanw/esbuild/releases/tag/v0.9.0) ([f27d987](https://github.com/mrgrain/cdk-esbuild/commit/f27d987183034d4fbf88905769d8cd7d3f93db4a))
|
|
348
|
+
|
|
349
|
+
### Features
|
|
350
|
+
|
|
351
|
+
- set sensible defaults for website deployment ([a7a925d](https://github.com/mrgrain/cdk-esbuild/commit/a7a925da367d88184058719a56af55882e7c7aff))
|
|
352
|
+
- new `copyDir` prop to copy additional files into the output ([1dccb25](https://github.com/mrgrain/cdk-esbuild/commit/1dccb254c189500dc48371eeeeed0545c3116863))
|
|
353
|
+
- support for multiple `entryPoints` ([e41757b](https://github.com/mrgrain/cdk-esbuild/commit/e41757bb634d24d4c45ecf98ba981d28df258ce6))
|
|
354
|
+
- `bundleOptions.outdir` can now be provided as an additional path prefix for rendered files in the auto-generated cdk output directory ([9be0f62](https://github.com/mrgrain/cdk-esbuild/commit/9be0f626460b5fd1c4bfa131a5f57124bbdb4129))
|
|
355
|
+
|
|
356
|
+
## [1.93.1](https://github.com/mrgrain/cdk-esbuild/compare/v1.93.0...v1.93.1) (2021-03-12)
|
|
357
|
+
|
|
358
|
+
Required release to make version available on npm.
|
|
359
|
+
|
|
360
|
+
## [1.93.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.92.0...v1.93.0) (2021-03-12)
|
|
361
|
+
|
|
362
|
+
- update to cdk-1.93.0 ([2dd043b](https://github.com/mrgrain/cdk-esbuild/commit/2dd043b49b606dc6ebcf13c435a5665f5028fce5))
|
|
363
|
+
|
|
364
|
+
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
365
|
+
|
|
366
|
+
- `projectRoot` auto detection now searches upwards from the entry point, instead of current working directory
|
|
367
|
+
- deprecated ~~`TypeScriptAsset`~~ & ~~`JavaScriptAsset`~~ in favour of `TypeScriptCode` & `JavaScriptCode` ([f31074e](https://github.com/mrgrain/cdk-esbuild/commit/f31074eeeca039dc847f199eeff88313b61605a1))
|
|
368
|
+
|
|
369
|
+
### Features
|
|
370
|
+
|
|
371
|
+
- added implementation of S3 deployment source which can be used for static website deployment ([f31074e](https://github.com/mrgrain/cdk-esbuild/commit/f31074eeeca039dc847f199eeff88313b61605a1))
|
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
_CDK constructs for [esbuild](https://github.com/evanw/esbuild), an extremely fast JavaScript bundler_
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> ⚠️ This is the documentation for the version compatible with AWS CDK v2. For the previous, AWS CDK v1 compatible release, see [cdk-esbuild@v2](https://github.com/mrgrain/cdk-esbuild/tree/v2)
|
|
6
|
+
|
|
7
|
+
[Getting started](#getting-started) | [Migrating to v3](#migrating-to-v3) |
|
|
6
8
|
[Documentation](#documentation) | [API Reference](#api-reference) | [Versioning](#versioning)
|
|
7
9
|
|
|
8
10
|
## Why?
|
|
@@ -25,13 +27,13 @@ Notably upgrades of the _esbuild_ minimum version requirement will be introduced
|
|
|
25
27
|
Install `cdk-esbuild`:
|
|
26
28
|
|
|
27
29
|
```
|
|
28
|
-
npm install @mrgrain/cdk-esbuild
|
|
30
|
+
npm install @mrgrain/cdk-esbuild@^3.0.0
|
|
29
31
|
```
|
|
30
32
|
|
|
31
33
|
If _peer_ and _optional dependencies_ are not installed automatically (e.g. when using npm v4-6), please use this command to install all of them:
|
|
32
34
|
|
|
33
35
|
```
|
|
34
|
-
npm install @mrgrain/cdk-esbuild esbuild
|
|
36
|
+
npm install @mrgrain/cdk-esbuild@^3.0.0 esbuild
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
### AWS Lambda: Serverless function
|
|
@@ -147,6 +149,8 @@ For these situations, this package offers an escape hatch to bypass regular the
|
|
|
147
149
|
|
|
148
150
|
### Custom build function
|
|
149
151
|
|
|
152
|
+
> 💡 See [Using esbuild with plugins](examples/esbuild-with-plugins) for a complete working example of a custom build function using this escape hatch.
|
|
153
|
+
|
|
150
154
|
Constructs that result in starting a build, take a `buildFn` as optional prop. While the defined type for this function is `any`, it must implement the same signature as esbuild's `buildSync` function.
|
|
151
155
|
|
|
152
156
|
```ts
|
|
@@ -185,28 +189,30 @@ Instead of esbuild, the provided function will be invoked with the calculated tr
|
|
|
185
189
|
|
|
186
190
|
Failures have to cause a `TransformFailure` exception in order to be fully handled.
|
|
187
191
|
|
|
188
|
-
## Migrating to
|
|
189
|
-
|
|
190
|
-
The main changes in cdk-esbuild v2 are:
|
|
192
|
+
## Migrating to v3
|
|
191
193
|
|
|
192
|
-
-
|
|
193
|
-
- Deprecated properties and classes have been removed, most notably the previous support for bundling via a Docker container. The implementation had a few issues that cannot be easily resolved. However more generic support for custom executables might arrive in later versions.
|
|
194
|
-
- `esbuild` is now installed as an optional dependency. It's not optional at all, but this is a ramification of using `jsii`. In practice this will have no impact on most people.
|
|
195
|
-
- Interfaces have been streamlined and the names and setup of internal types have been changed. In the unlikely case that someone was relying on these, upgrading will be straight forward.
|
|
194
|
+
The release of cdk-esbuild v3 brings compatibility with AWS CDK v2. Furthermore all deprecated properties and classes have been removed. In particular `InlineCode` classes now take `TransformerProps` as second parameter instead of transform options.
|
|
196
195
|
|
|
197
196
|
### Upgrading
|
|
198
197
|
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
202
|
-
-
|
|
198
|
+
- This version requires AWS CDK v2. Follow the [official migration guide](https://docs.aws.amazon.com/cdk/latest/guide/work-with-cdk-v2.html) to upgrade.
|
|
199
|
+
- Update the package dependency to v3: `npm install --save @mrgrain/cdk-esbuild@^3.0.0`
|
|
200
|
+
- `esbuild` is installed as an optional dependency. If your setup does not automatically install optional dependencies, make sure to add it as an explicit dependency.
|
|
201
|
+
- Any use of `InlineCode` variations has to be updated. Previously the second parameter was either of type `TransformerProps` or `TransformOptions`. Now it must be `TransformerProps`.\
|
|
202
|
+
If the passed value is of type `TransformOptions`, turn it into the correct type like this:
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
const oldOptions: TransformOptions = {...}
|
|
206
|
+
|
|
207
|
+
new InlineTypeScriptCode('// inline code', {
|
|
208
|
+
transformOptions: oldOptions
|
|
209
|
+
});
|
|
210
|
+
```
|
|
203
211
|
|
|
204
212
|
## Versioning
|
|
205
213
|
|
|
206
214
|
This package _mostly_ follows [Semantic Versioning](https://semver.org/), with the exception of upgrades to `esbuild`. These will be released as **minor versions** and often include breaking changes from `esbuild`.
|
|
207
215
|
|
|
208
|
-
Although great care is taken to avoid this, all features marked with `@stability experimental` may change with minor versions. The flag is only applied to new and experimental features and internal classes.
|
|
209
|
-
|
|
210
216
|
### Npm Tags
|
|
211
217
|
|
|
212
218
|
Some users prefer to use tags over version ranges. The following stable tags are available for use:
|
|
@@ -223,10 +229,6 @@ These tags also exist, but usage is strongly not recommended:
|
|
|
223
229
|
|
|
224
230
|
## Future releases
|
|
225
231
|
|
|
226
|
-
### AWS CDK v2
|
|
227
|
-
|
|
228
|
-
The monolithic version 2 of CDK (aka Mono-CDK) is on the horizon. A new major release of this package will be marked alongside CDK. Support for AWS CDK v1.x.x will be continued, however no new features will be added.
|
|
229
|
-
|
|
230
232
|
### Stable esbuild
|
|
231
233
|
|
|
232
234
|
Once `esbuild` has reached a stable version 1.0, a new major version will be released for _all_ breaking changes, including updates to minimum (peer) dependencies.
|