@mrgrain/cdk-esbuild 2.0.0 → 2.1.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/.gitattributes +21 -21
- package/.jsii +184 -42
- package/.projenrc.ts +18 -0
- package/API.md +163 -21
- package/CHANGELOG.md +11 -274
- package/README.md +55 -5
- package/lib/asset.js +5 -4
- package/lib/bundler.d.ts +13 -0
- package/lib/bundler.js +4 -3
- package/lib/code.js +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/inline-code.d.ts +50 -19
- package/lib/inline-code.js +51 -29
- package/lib/source.js +2 -2
- package/package.json +27 -26
package/API.md
CHANGED
|
@@ -13,6 +13,22 @@ import { AssetProps } from '@mrgrain/cdk-esbuild'
|
|
|
13
13
|
const assetProps: AssetProps = { ... }
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
##### `buildFn`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.AssetProps.property.buildFn"></a>
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
public readonly buildFn: any;
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- *Type:* `any`
|
|
23
|
+
- *Default:* esbuild.buildSync
|
|
24
|
+
|
|
25
|
+
Escape hatch to provide the bundler with a custom build function.
|
|
26
|
+
|
|
27
|
+
The function will receive the computed options from the bundler. It can use with these options as it wishes, however `outdir`/`outfile` must be respected to integrate with CDK.
|
|
28
|
+
Must throw a `BuildFailure` on failure to correctly inform the bundler.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
16
32
|
##### `buildOptions`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.AssetProps.property.buildOptions"></a>
|
|
17
33
|
|
|
18
34
|
```typescript
|
|
@@ -703,6 +719,22 @@ import { BundlerProps } from '@mrgrain/cdk-esbuild'
|
|
|
703
719
|
const bundlerProps: BundlerProps = { ... }
|
|
704
720
|
```
|
|
705
721
|
|
|
722
|
+
##### `buildFn`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.BundlerProps.property.buildFn"></a>
|
|
723
|
+
|
|
724
|
+
```typescript
|
|
725
|
+
public readonly buildFn: any;
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
- *Type:* `any`
|
|
729
|
+
- *Default:* esbuild.buildSync
|
|
730
|
+
|
|
731
|
+
Escape hatch to provide the bundler with a custom build function.
|
|
732
|
+
|
|
733
|
+
The function will receive the computed options from the bundler. It can use with these options as it wishes, however `outdir`/`outfile` must be respected to integrate with CDK.
|
|
734
|
+
Must throw a `BuildFailure` on failure to correctly inform the bundler.
|
|
735
|
+
|
|
736
|
+
---
|
|
737
|
+
|
|
706
738
|
##### `buildOptions`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.BundlerProps.property.buildOptions"></a>
|
|
707
739
|
|
|
708
740
|
```typescript
|
|
@@ -775,6 +807,22 @@ import { JavaScriptCodeProps } from '@mrgrain/cdk-esbuild'
|
|
|
775
807
|
const javaScriptCodeProps: JavaScriptCodeProps = { ... }
|
|
776
808
|
```
|
|
777
809
|
|
|
810
|
+
##### `buildFn`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptCodeProps.property.buildFn"></a>
|
|
811
|
+
|
|
812
|
+
```typescript
|
|
813
|
+
public readonly buildFn: any;
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
- *Type:* `any`
|
|
817
|
+
- *Default:* esbuild.buildSync
|
|
818
|
+
|
|
819
|
+
Escape hatch to provide the bundler with a custom build function.
|
|
820
|
+
|
|
821
|
+
The function will receive the computed options from the bundler. It can use with these options as it wishes, however `outdir`/`outfile` must be respected to integrate with CDK.
|
|
822
|
+
Must throw a `BuildFailure` on failure to correctly inform the bundler.
|
|
823
|
+
|
|
824
|
+
---
|
|
825
|
+
|
|
778
826
|
##### `buildOptions`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptCodeProps.property.buildOptions"></a>
|
|
779
827
|
|
|
780
828
|
```typescript
|
|
@@ -841,6 +889,22 @@ import { JavaScriptSourceProps } from '@mrgrain/cdk-esbuild'
|
|
|
841
889
|
const javaScriptSourceProps: JavaScriptSourceProps = { ... }
|
|
842
890
|
```
|
|
843
891
|
|
|
892
|
+
##### `buildFn`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptSourceProps.property.buildFn"></a>
|
|
893
|
+
|
|
894
|
+
```typescript
|
|
895
|
+
public readonly buildFn: any;
|
|
896
|
+
```
|
|
897
|
+
|
|
898
|
+
- *Type:* `any`
|
|
899
|
+
- *Default:* esbuild.buildSync
|
|
900
|
+
|
|
901
|
+
Escape hatch to provide the bundler with a custom build function.
|
|
902
|
+
|
|
903
|
+
The function will receive the computed options from the bundler. It can use with these options as it wishes, however `outdir`/`outfile` must be respected to integrate with CDK.
|
|
904
|
+
Must throw a `BuildFailure` on failure to correctly inform the bundler.
|
|
905
|
+
|
|
906
|
+
---
|
|
907
|
+
|
|
844
908
|
##### `buildOptions`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptSourceProps.property.buildOptions"></a>
|
|
845
909
|
|
|
846
910
|
```typescript
|
|
@@ -897,6 +961,48 @@ Defaults to a hash of all files in the resulting bundle.
|
|
|
897
961
|
|
|
898
962
|
---
|
|
899
963
|
|
|
964
|
+
### TransformerProps <a name="@mrgrain/cdk-esbuild.TransformerProps"></a>
|
|
965
|
+
|
|
966
|
+
#### Initializer <a name="[object Object].Initializer"></a>
|
|
967
|
+
|
|
968
|
+
```typescript
|
|
969
|
+
import { TransformerProps } from '@mrgrain/cdk-esbuild'
|
|
970
|
+
|
|
971
|
+
const transformerProps: TransformerProps = { ... }
|
|
972
|
+
```
|
|
973
|
+
|
|
974
|
+
##### `transformFn`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TransformerProps.property.transformFn"></a>
|
|
975
|
+
|
|
976
|
+
```typescript
|
|
977
|
+
public readonly transformFn: any;
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
- *Type:* `any`
|
|
981
|
+
- *Default:* esbuild.transformSync
|
|
982
|
+
|
|
983
|
+
Escape hatch to provide the bundler with a custom transform function.
|
|
984
|
+
|
|
985
|
+
The function will receive the computed options from the bundler. It can use with these options as it wishes, however a TransformResult must be returned to integrate with CDK.
|
|
986
|
+
Must throw a `TransformFailure` on failure to correctly inform the bundler.
|
|
987
|
+
|
|
988
|
+
---
|
|
989
|
+
|
|
990
|
+
##### `transformOptions`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TransformerProps.property.transformOptions"></a>
|
|
991
|
+
|
|
992
|
+
```typescript
|
|
993
|
+
public readonly transformOptions: TransformOptions;
|
|
994
|
+
```
|
|
995
|
+
|
|
996
|
+
- *Type:* [`@mrgrain/cdk-esbuild.TransformOptions`](#@mrgrain/cdk-esbuild.TransformOptions)
|
|
997
|
+
|
|
998
|
+
Transform options passed on to esbuild.
|
|
999
|
+
|
|
1000
|
+
Please refer to the esbuild Transform API docs for details.
|
|
1001
|
+
|
|
1002
|
+
> https://esbuild.github.io/api/#transform-api
|
|
1003
|
+
|
|
1004
|
+
---
|
|
1005
|
+
|
|
900
1006
|
### TransformOptions <a name="@mrgrain/cdk-esbuild.TransformOptions"></a>
|
|
901
1007
|
|
|
902
1008
|
#### Initializer <a name="[object Object].Initializer"></a>
|
|
@@ -1243,6 +1349,22 @@ import { TypeScriptCodeProps } from '@mrgrain/cdk-esbuild'
|
|
|
1243
1349
|
const typeScriptCodeProps: TypeScriptCodeProps = { ... }
|
|
1244
1350
|
```
|
|
1245
1351
|
|
|
1352
|
+
##### `buildFn`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptCodeProps.property.buildFn"></a>
|
|
1353
|
+
|
|
1354
|
+
```typescript
|
|
1355
|
+
public readonly buildFn: any;
|
|
1356
|
+
```
|
|
1357
|
+
|
|
1358
|
+
- *Type:* `any`
|
|
1359
|
+
- *Default:* esbuild.buildSync
|
|
1360
|
+
|
|
1361
|
+
Escape hatch to provide the bundler with a custom build function.
|
|
1362
|
+
|
|
1363
|
+
The function will receive the computed options from the bundler. It can use with these options as it wishes, however `outdir`/`outfile` must be respected to integrate with CDK.
|
|
1364
|
+
Must throw a `BuildFailure` on failure to correctly inform the bundler.
|
|
1365
|
+
|
|
1366
|
+
---
|
|
1367
|
+
|
|
1246
1368
|
##### `buildOptions`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptCodeProps.property.buildOptions"></a>
|
|
1247
1369
|
|
|
1248
1370
|
```typescript
|
|
@@ -1309,6 +1431,22 @@ import { TypeScriptSourceProps } from '@mrgrain/cdk-esbuild'
|
|
|
1309
1431
|
const typeScriptSourceProps: TypeScriptSourceProps = { ... }
|
|
1310
1432
|
```
|
|
1311
1433
|
|
|
1434
|
+
##### `buildFn`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptSourceProps.property.buildFn"></a>
|
|
1435
|
+
|
|
1436
|
+
```typescript
|
|
1437
|
+
public readonly buildFn: any;
|
|
1438
|
+
```
|
|
1439
|
+
|
|
1440
|
+
- *Type:* `any`
|
|
1441
|
+
- *Default:* esbuild.buildSync
|
|
1442
|
+
|
|
1443
|
+
Escape hatch to provide the bundler with a custom build function.
|
|
1444
|
+
|
|
1445
|
+
The function will receive the computed options from the bundler. It can use with these options as it wishes, however `outdir`/`outfile` must be respected to integrate with CDK.
|
|
1446
|
+
Must throw a `BuildFailure` on failure to correctly inform the bundler.
|
|
1447
|
+
|
|
1448
|
+
---
|
|
1449
|
+
|
|
1312
1450
|
##### `buildOptions`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptSourceProps.property.buildOptions"></a>
|
|
1313
1451
|
|
|
1314
1452
|
```typescript
|
|
@@ -1463,7 +1601,7 @@ An implementation of `lambda.InlineCode` using the esbuild Transform API. Inline
|
|
|
1463
1601
|
```typescript
|
|
1464
1602
|
import { InlineJavaScriptCode } from '@mrgrain/cdk-esbuild'
|
|
1465
1603
|
|
|
1466
|
-
new InlineJavaScriptCode(code: string,
|
|
1604
|
+
new InlineJavaScriptCode(code: string, props?: TransformOptions | TransformerProps)
|
|
1467
1605
|
```
|
|
1468
1606
|
|
|
1469
1607
|
##### `code`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.InlineJavaScriptCode.parameter.code"></a>
|
|
@@ -1474,14 +1612,15 @@ The inline code to be transformed.
|
|
|
1474
1612
|
|
|
1475
1613
|
---
|
|
1476
1614
|
|
|
1477
|
-
##### `
|
|
1615
|
+
##### `props`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.InlineJavaScriptCode.parameter.props"></a>
|
|
1478
1616
|
|
|
1479
|
-
- *Type:* [`@mrgrain/cdk-esbuild.TransformOptions`](#@mrgrain/cdk-esbuild.TransformOptions)
|
|
1617
|
+
- *Type:* [`@mrgrain/cdk-esbuild.TransformOptions`](#@mrgrain/cdk-esbuild.TransformOptions) | [`@mrgrain/cdk-esbuild.TransformerProps`](#@mrgrain/cdk-esbuild.TransformerProps)
|
|
1480
1618
|
|
|
1481
|
-
|
|
1619
|
+
Support for `TransformOptions` is deprecated. Please provide `TransformerProps`!
|
|
1482
1620
|
|
|
1483
|
-
|
|
1484
|
-
|
|
1621
|
+
Props to change the behaviour of the transformer.
|
|
1622
|
+
|
|
1623
|
+
Default values for `props.transformOptions`:
|
|
1485
1624
|
- `loader='js'`
|
|
1486
1625
|
|
|
1487
1626
|
> https://esbuild.github.io/api/#transform-api
|
|
@@ -1501,7 +1640,7 @@ An implementation of `lambda.InlineCode` using the esbuild Transform API. Inline
|
|
|
1501
1640
|
```typescript
|
|
1502
1641
|
import { InlineJsxCode } from '@mrgrain/cdk-esbuild'
|
|
1503
1642
|
|
|
1504
|
-
new InlineJsxCode(code: string,
|
|
1643
|
+
new InlineJsxCode(code: string, props?: TransformOptions | TransformerProps)
|
|
1505
1644
|
```
|
|
1506
1645
|
|
|
1507
1646
|
##### `code`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.InlineJsxCode.parameter.code"></a>
|
|
@@ -1512,13 +1651,14 @@ The inline code to be transformed.
|
|
|
1512
1651
|
|
|
1513
1652
|
---
|
|
1514
1653
|
|
|
1515
|
-
##### `
|
|
1654
|
+
##### `props`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.InlineJsxCode.parameter.props"></a>
|
|
1516
1655
|
|
|
1517
|
-
- *Type:* [`@mrgrain/cdk-esbuild.TransformOptions`](#@mrgrain/cdk-esbuild.TransformOptions)
|
|
1656
|
+
- *Type:* [`@mrgrain/cdk-esbuild.TransformOptions`](#@mrgrain/cdk-esbuild.TransformOptions) | [`@mrgrain/cdk-esbuild.TransformerProps`](#@mrgrain/cdk-esbuild.TransformerProps)
|
|
1518
1657
|
|
|
1519
|
-
|
|
1658
|
+
Support for `TransformOptions` is deprecated. Please provide `TransformerProps`!
|
|
1659
|
+
|
|
1660
|
+
Props to change the behaviour of the transformer.
|
|
1520
1661
|
|
|
1521
|
-
Please refer to the esbuild Transform API docs for details. \
|
|
1522
1662
|
Default values for `transformOptions`:
|
|
1523
1663
|
- `loader='jsx'`
|
|
1524
1664
|
|
|
@@ -1539,7 +1679,7 @@ An implementation of `lambda.InlineCode` using the esbuild Transform API. Inline
|
|
|
1539
1679
|
```typescript
|
|
1540
1680
|
import { InlineTsxCode } from '@mrgrain/cdk-esbuild'
|
|
1541
1681
|
|
|
1542
|
-
new InlineTsxCode(code: string,
|
|
1682
|
+
new InlineTsxCode(code: string, props?: TransformOptions | TransformerProps)
|
|
1543
1683
|
```
|
|
1544
1684
|
|
|
1545
1685
|
##### `code`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.InlineTsxCode.parameter.code"></a>
|
|
@@ -1550,13 +1690,14 @@ The inline code to be transformed.
|
|
|
1550
1690
|
|
|
1551
1691
|
---
|
|
1552
1692
|
|
|
1553
|
-
##### `
|
|
1693
|
+
##### `props`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.InlineTsxCode.parameter.props"></a>
|
|
1554
1694
|
|
|
1555
|
-
- *Type:* [`@mrgrain/cdk-esbuild.TransformOptions`](#@mrgrain/cdk-esbuild.TransformOptions)
|
|
1695
|
+
- *Type:* [`@mrgrain/cdk-esbuild.TransformOptions`](#@mrgrain/cdk-esbuild.TransformOptions) | [`@mrgrain/cdk-esbuild.TransformerProps`](#@mrgrain/cdk-esbuild.TransformerProps)
|
|
1556
1696
|
|
|
1557
|
-
|
|
1697
|
+
Support for `TransformOptions` is deprecated. Please provide `TransformerProps`!
|
|
1698
|
+
|
|
1699
|
+
Props to change the behaviour of the transformer.
|
|
1558
1700
|
|
|
1559
|
-
Please refer to the esbuild Transform API docs for details. \
|
|
1560
1701
|
Default values for `transformOptions`:
|
|
1561
1702
|
- `loader='tsx'`
|
|
1562
1703
|
|
|
@@ -1577,7 +1718,7 @@ An implementation of `lambda.InlineCode` using the esbuild Transform API. Inline
|
|
|
1577
1718
|
```typescript
|
|
1578
1719
|
import { InlineTypeScriptCode } from '@mrgrain/cdk-esbuild'
|
|
1579
1720
|
|
|
1580
|
-
new InlineTypeScriptCode(code: string,
|
|
1721
|
+
new InlineTypeScriptCode(code: string, props?: TransformOptions | TransformerProps)
|
|
1581
1722
|
```
|
|
1582
1723
|
|
|
1583
1724
|
##### `code`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.InlineTypeScriptCode.parameter.code"></a>
|
|
@@ -1588,13 +1729,14 @@ The inline code to be transformed.
|
|
|
1588
1729
|
|
|
1589
1730
|
---
|
|
1590
1731
|
|
|
1591
|
-
##### `
|
|
1732
|
+
##### `props`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.InlineTypeScriptCode.parameter.props"></a>
|
|
1592
1733
|
|
|
1593
|
-
- *Type:* [`@mrgrain/cdk-esbuild.TransformOptions`](#@mrgrain/cdk-esbuild.TransformOptions)
|
|
1734
|
+
- *Type:* [`@mrgrain/cdk-esbuild.TransformOptions`](#@mrgrain/cdk-esbuild.TransformOptions) | [`@mrgrain/cdk-esbuild.TransformerProps`](#@mrgrain/cdk-esbuild.TransformerProps)
|
|
1594
1735
|
|
|
1595
|
-
|
|
1736
|
+
Support for `TransformOptions` is deprecated. Please provide `TransformerProps`!
|
|
1737
|
+
|
|
1738
|
+
Props to change the behaviour of the transformer.
|
|
1596
1739
|
|
|
1597
|
-
Please refer to the esbuild Transform API docs for details. \
|
|
1598
1740
|
Default values for `transformOptions`:
|
|
1599
1741
|
- `loader='ts'`
|
|
1600
1742
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,285 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
## [2.0.0-rc.1](https://github.com/mrgrain/cdk-esbuild/compare/v2.0.0-rc.0...v2.0.0-rc.1) (2021-10-28)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
### Features
|
|
6
|
-
|
|
7
|
-
* generated docs for esbuild link to documentation ([#123](https://github.com/mrgrain/cdk-esbuild/issues/123)) ([95f2fd0](https://github.com/mrgrain/cdk-esbuild/commit/95f2fd07330cf9624dd05f23345bfe0f5754fc57))
|
|
8
|
-
|
|
9
|
-
## [2.0.0-rc.0](https://github.com/mrgrain/cdk-esbuild/compare/v2.0.0-alpha.5...v2.0.0-rc.0) (2021-10-24)
|
|
10
|
-
|
|
11
|
-
## [2.0.0-alpha.5](https://github.com/mrgrain/cdk-esbuild/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2021-10-23)
|
|
12
|
-
|
|
13
|
-
## [2.0.0-alpha.4](https://github.com/mrgrain/cdk-esbuild/compare/v2.0.0-alpha.2...v2.0.0-alpha.4) (2021-10-22)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Features
|
|
17
|
-
|
|
18
|
-
* synthesize esbuild types from source ([#117](https://github.com/mrgrain/cdk-esbuild/issues/117)) ([af44d55](https://github.com/mrgrain/cdk-esbuild/commit/af44d55e97db6fd8fbda916eb0f25dae55513cba))
|
|
19
|
-
|
|
20
|
-
## [2.0.0-alpha.2](https://github.com/mrgrain/cdk-esbuild/compare/v1.128.0...v2.0.0-alpha.2) (2021-10-17)
|
|
21
|
-
|
|
1
|
+
## [2.0.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.129.0...v2.0.0) (2021-11-07)
|
|
22
2
|
|
|
23
3
|
### ⚠ BREAKING CHANGES
|
|
24
4
|
|
|
25
|
-
|
|
26
|
-
that migration will be minimal, however probably not avoidable.
|
|
27
|
-
|
|
28
|
-
### Features
|
|
29
|
-
|
|
30
|
-
* jsii compatibility ([bdcba25](https://github.com/mrgrain/cdk-esbuild/commit/bdcba25981a3a32d36ba0054bfee5023b69b6497))
|
|
31
|
-
* jsii project with projen ([f0ff7cb](https://github.com/mrgrain/cdk-esbuild/commit/f0ff7cb07e73f4e7b936d218f8aad7a2d8aa21f4))
|
|
32
|
-
* more explict prop types ([680460a](https://github.com/mrgrain/cdk-esbuild/commit/680460a8ceabb5e45567784df8dca53ff974483c))
|
|
33
|
-
* reduce number of exported structs ([c6e0cde](https://github.com/mrgrain/cdk-esbuild/commit/c6e0cdea4a39e5909ab102e15b5c4ba5acd02d14))
|
|
34
|
-
|
|
35
|
-
## [1.129.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.128.0...v1.129.0) (2021-10-28)
|
|
5
|
+
- Major release of this package to make it JSII compatible (#114) ([727c78a](https://github.com/mrgrain/cdk-esbuild/commit/727c78aefa2079d0f561b8b664d75eb6c669e46b)), closes [#114](https://github.com/mrgrain/cdk-esbuild/issues/114) [#117](https://github.com/mrgrain/cdk-esbuild/issues/117) [#119](https://github.com/mrgrain/cdk-esbuild/issues/119) [#120](https://github.com/mrgrain/cdk-esbuild/issues/120) [#123](https://github.com/mrgrain/cdk-esbuild/issues/123)
|
|
36
6
|
|
|
37
|
-
|
|
7
|
+
- Deprecated features from v1 have been removed. Please see upgrading instructions below.
|
|
38
8
|
|
|
39
|
-
|
|
9
|
+
### Upgrading to v2
|
|
40
10
|
|
|
41
|
-
|
|
11
|
+
- Update the package dependency to v2: `npm install --save @mrgrain/cdk-esbuild@^2.0.0`
|
|
12
|
+
- `esbuild` is now installed as an optional dependency. If your setup does not automatically install optional dependencies, add it as an explicit dependency.
|
|
13
|
+
- Remove any use of `bundlerPriority`.
|
|
14
|
+
- Unstable construct `EsbuildBundling` has been renamed to `EsbuildBundler` and its interface has slightly changed. Like most other constructs, it now takes `entryPoints` as first parameter, with an optional `props` object as the second.
|
|
42
15
|
|
|
43
16
|
### Features
|
|
44
17
|
|
|
45
|
-
-
|
|
46
|
-
- deprecated Docker bundler ([6715463](https://github.com/mrgrain/cdk-esbuild/commit/6715463ee90f339ac261622597e39b2ee6c46d71))
|
|
47
|
-
|
|
48
|
-
## [1.128.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.127.0...v1.128.0) (2021-10-16)
|
|
49
|
-
|
|
50
|
-
- works with cdk-1.128.0
|
|
51
|
-
|
|
52
|
-
## [1.127.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.126.0...v1.127.0) (2021-10-09)
|
|
53
|
-
|
|
54
|
-
- works with cdk-1.127.0
|
|
55
|
-
- **example/website:** How to monitor a website with Synthetics ([621d2d4](https://github.com/mrgrain/cdk-esbuild/commit/621d2d4192da63fa385b76b59353ffe77023c38d))
|
|
56
|
-
|
|
57
|
-
## [1.126.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.126.0-beta.0...v1.126.0) (2021-10-09)
|
|
58
|
-
|
|
59
|
-
### Features
|
|
60
|
-
|
|
61
|
-
- works with cdk-1.126.0
|
|
62
|
-
- [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))
|
|
63
|
-
|
|
64
|
-
## [1.125.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.124.0...v1.125.0) (2021-10-01)
|
|
65
|
-
|
|
66
|
-
### ⚠ BREAKING CHANGES
|
|
67
|
-
|
|
68
|
-
- `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.
|
|
69
|
-
|
|
70
|
-
### Features
|
|
71
|
-
|
|
72
|
-
- works with cdk-1.125.0
|
|
73
|
-
|
|
74
|
-
- upgrade `esbuild` minimum version to ^0.13.0 ([3d0b5ee](https://github.com/mrgrain/cdk-esbuild/commit/3d0b5ee5c01b7edcf7042a728932a0e1ce722d3c))
|
|
75
|
-
|
|
76
|
-
## [1.124.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.123.0...v1.124.0) (2021-10-01)
|
|
77
|
-
|
|
78
|
-
- works with cdk-1.124.0
|
|
79
|
-
|
|
80
|
-
## [1.123.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.122.0...v1.123.0) (2021-09-22)
|
|
81
|
-
|
|
82
|
-
- works with cdk-1.123.0
|
|
83
|
-
|
|
84
|
-
## [1.122.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.121.0...v1.122.0) (2021-09-12)
|
|
85
|
-
|
|
86
|
-
- works with cdk-1.122.0
|
|
87
|
-
|
|
88
|
-
## [1.121.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.120.0...v1.121.0) (2021-09-12)
|
|
89
|
-
|
|
90
|
-
- works with cdk-1.121.0
|
|
91
|
-
|
|
92
|
-
## [1.120.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.119.0...v1.120.0) (2021-09-12)
|
|
93
|
-
|
|
94
|
-
- works with cdk-1.120.0
|
|
95
|
-
|
|
96
|
-
## [1.119.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.118.0...v1.119.0) (2021-09-12)
|
|
97
|
-
|
|
98
|
-
- works with cdk-1.119.0
|
|
99
|
-
|
|
100
|
-
## [1.118.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.117.0...v1.118.0) (2021-09-12)
|
|
101
|
-
|
|
102
|
-
- works with cdk-1.118.0
|
|
103
|
-
|
|
104
|
-
### Bug Fixes
|
|
105
|
-
|
|
106
|
-
- fix error handling type issue in latest tsc version ([b5e36e2](https://github.com/mrgrain/cdk-esbuild/commit/b5e36e27481706ea5a7ac5f8c05d74418b07c125))
|
|
107
|
-
|
|
108
|
-
## [1.117.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.116.0...v1.117.0) (2021-08-08)
|
|
109
|
-
|
|
110
|
-
- works with cdk-1.117.0
|
|
111
|
-
|
|
112
|
-
## [1.116.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.115.0...v1.116.0) (2021-08-08)
|
|
113
|
-
|
|
114
|
-
- works with cdk-1.116.0
|
|
115
|
-
|
|
116
|
-
## [1.115.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.114.0...v1.115.0) (2021-08-08)
|
|
117
|
-
|
|
118
|
-
- works with cdk-1.115.0
|
|
119
|
-
|
|
120
|
-
## [1.114.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.113.0...v1.114.0) (2021-08-08)
|
|
121
|
-
|
|
122
|
-
- works with cdk-1.114.0
|
|
123
|
-
|
|
124
|
-
## [1.113.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.112.0...v1.113.0) (2021-08-08)
|
|
125
|
-
|
|
126
|
-
- works with cdk-1.113.0
|
|
127
|
-
|
|
128
|
-
## [1.112.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.111.0...v1.112.0) (2021-08-08)
|
|
129
|
-
|
|
130
|
-
- works with cdk-1.112.0
|
|
131
|
-
|
|
132
|
-
## [1.111.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.110.0...v1.111.0) (2021-08-08)
|
|
133
|
-
|
|
134
|
-
- works with cdk-1.111.0
|
|
135
|
-
|
|
136
|
-
## [1.110.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.109.0...v1.110.0) (2021-06-24)
|
|
137
|
-
|
|
138
|
-
- works with cdk-1.110.0
|
|
139
|
-
|
|
140
|
-
## [1.109.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.108.0...v1.109.0) (2021-06-24)
|
|
141
|
-
|
|
142
|
-
- works with cdk-1.109.0
|
|
143
|
-
|
|
144
|
-
## [1.108.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.107.0...v1.108.0) (2021-06-09)
|
|
18
|
+
- JSII compatibility & v2 GA (#114) ([727c78a](https://github.com/mrgrain/cdk-esbuild/commit/727c78aefa2079d0f561b8b664d75eb6c669e46b)), closes [#114](https://github.com/mrgrain/cdk-esbuild/issues/114) [#117](https://github.com/mrgrain/cdk-esbuild/issues/117) [#119](https://github.com/mrgrain/cdk-esbuild/issues/119) [#120](https://github.com/mrgrain/cdk-esbuild/issues/120) [#123](https://github.com/mrgrain/cdk-esbuild/issues/123)
|
|
145
19
|
|
|
146
|
-
-
|
|
147
|
-
|
|
148
|
-
## [1.107.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.106.0...v1.107.0) (2021-06-03)
|
|
149
|
-
|
|
150
|
-
- works with cdk-1.107.0
|
|
151
|
-
|
|
152
|
-
## [1.106.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.105.0...v1.106.0) (2021-05-31)
|
|
153
|
-
|
|
154
|
-
- works with cdk-1.106.0
|
|
155
|
-
|
|
156
|
-
## [1.105.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.104.0...v1.105.0) (2021-05-19)
|
|
157
|
-
|
|
158
|
-
- works with cdk-1.105.0
|
|
159
|
-
|
|
160
|
-
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
161
|
-
|
|
162
|
-
- 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)
|
|
163
|
-
|
|
164
|
-
## [1.104.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.103.0...v1.104.0) (2021-05-19)
|
|
165
|
-
|
|
166
|
-
- works with cdk-1.104.0 ([fb0de78](https://github.com/mrgrain/cdk-esbuild/commit/fb0de78faf29815045822b8e80b2bbb07b8f7cbf))
|
|
167
|
-
|
|
168
|
-
## [1.103.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.102.0...v1.103.0) (2021-05-13)
|
|
169
|
-
|
|
170
|
-
- works with cdk-1.103.0
|
|
171
|
-
|
|
172
|
-
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
173
|
-
|
|
174
|
-
- removed deprecated `forceDockerBundling` and `localBundling` ([cc40b90](https://github.com/mrgrain/cdk-esbuild/commit/cc40b900acd8cba725e31db0a79cd3f8b711277e))
|
|
175
|
-
|
|
176
|
-
## [1.102.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.101.0...v1.102.0) (2021-05-04)
|
|
177
|
-
|
|
178
|
-
- works with cdk-1.102.0 ([c616c1b](https://github.com/mrgrain/cdk-esbuild/commit/c616c1ba07a9bdd11f3dc3369b1335918458800f))
|
|
179
|
-
|
|
180
|
-
### Features
|
|
181
|
-
|
|
182
|
-
- new high-level constructs prop `bundlerPriority` to replace deprecated `forceDockerBundling` ([cc4c933](https://github.com/mrgrain/cdk-esbuild/commit/cc4c93376cf3a8628edd696fe9fa8f65a09c7e21))
|
|
183
|
-
- **examples/lambda:** added new complete example for lambda function ([f8ca3c0](https://github.com/mrgrain/cdk-esbuild/commit/f8ca3c093a11f1d56b9f08cd0a4f3b3eaecd5690))
|
|
184
|
-
|
|
185
|
-
### Bug Fixes
|
|
186
|
-
|
|
187
|
-
- **examples/website:** changed start command to work with latest esbuild versions ([45b4c91](https://github.com/mrgrain/cdk-esbuild/commit/45b4c91b454a9520e3aca4ff66ed75abc2ea7d4a))
|
|
188
|
-
|
|
189
|
-
## [1.101.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.100.0...v1.101.0) (2021-05-01)
|
|
190
|
-
|
|
191
|
-
- works with cdk-1.101.0
|
|
192
|
-
|
|
193
|
-
### Features
|
|
194
|
-
|
|
195
|
-
- pretty print esbuild build errors and warnings when using local bundler ([7f15bed](https://github.com/mrgrain/cdk-esbuild/commit/7f15bedbdfb619c2d0767bc37458108e01c3a85e))
|
|
196
|
-
- pretty print esbuild transform errors and warnings ([1eeeb10](https://github.com/mrgrain/cdk-esbuild/commit/1eeeb10ca6b1e46452c55792d28429986eb4b09f))
|
|
197
|
-
- set bundling priority explicitly, deprecating `localBundling` in favour of `priority` ([425665a](https://github.com/mrgrain/cdk-esbuild/commit/425665a2f8f20bb557119e79e3354a4d9d696d24))
|
|
198
|
-
|
|
199
|
-
## [1.100.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.100.0-beta.1...v1.100.0) (2021-05-01)
|
|
200
|
-
|
|
201
|
-
- no changes, cdk version constraints are now less strict
|
|
202
|
-
|
|
203
|
-
## [1.99.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.98.0...v1.99.0) (2021-04-19)
|
|
204
|
-
|
|
205
|
-
- update to cdk-1.99.0 ([cfffb19](https://github.com/mrgrain/cdk-esbuild/commit/cfffb1901f8567ea81de3e7f746d8cffd50b4bcc))
|
|
206
|
-
|
|
207
|
-
## [1.98.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.97.0...v1.98.0) (2021-04-13)
|
|
208
|
-
|
|
209
|
-
- update to cdk-1.98.0 ([0165256](https://github.com/mrgrain/cdk-esbuild/commit/0165256d26a2b24b45b17cb747f63eff26c983d1))
|
|
210
|
-
|
|
211
|
-
## [1.97.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.96.0...v1.97.0) (2021-04-11)
|
|
212
|
-
|
|
213
|
-
- update to cdk-1.97.0 ([fedb40a](https://github.com/mrgrain/cdk-esbuild/commit/fedb40a3098cd3b2de5b113d79a2edd185789fde))
|
|
214
|
-
|
|
215
|
-
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
216
|
-
|
|
217
|
-
- 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))
|
|
218
|
-
- 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))
|
|
219
|
-
|
|
220
|
-
### Features
|
|
221
|
-
|
|
222
|
-
- support object maps for entry points ([62a4431](https://github.com/mrgrain/cdk-esbuild/commit/62a4431572a4b32acd45c569405d19244b1aa76a))
|
|
223
|
-
|
|
224
|
-
## [1.96.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.95.0...v1.96.0) (2021-04-11)
|
|
225
|
-
|
|
226
|
-
- update to cdk-1.96.0 ([ae26510](https://github.com/mrgrain/cdk-esbuild/commit/ae2651026617646833303f0b9259d564765273d5))
|
|
227
|
-
|
|
228
|
-
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
229
|
-
|
|
230
|
-
- removed deprecated `projectRoot` prop, please use `buildOptions.absWorkingPath` instead ([40e7ab0](https://github.com/mrgrain/cdk-esbuild/commit/40e7ab0ccd6fa52727f548168cbbc05afcfe4b16))
|
|
231
|
-
|
|
232
|
-
## [1.95.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.94.1...v1.95.0) (2021-03-28)
|
|
233
|
-
|
|
234
|
-
- update to cdk-1.95.0 ([0a98ef3](https://github.com/mrgrain/cdk-esbuild/commit/0a98ef311d92e1366f535bf18d7a5f10ac6ad02a))
|
|
235
|
-
|
|
236
|
-
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
237
|
-
|
|
238
|
-
- 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))
|
|
239
|
-
|
|
240
|
-
### Features
|
|
241
|
-
|
|
242
|
-
- added various InlineCode constructs using the transform api ([6ef1c97](https://github.com/mrgrain/cdk-esbuild/commit/6ef1c9756f22256c008e1f9725ea3b5b5a176e3c))
|
|
243
|
-
- support added for `outfile` build option ([90ef5ec](https://github.com/mrgrain/cdk-esbuild/commit/90ef5ecb5906e0f2fc76a933b9f0067f1aae6428))
|
|
244
|
-
|
|
245
|
-
### [1.94.1](https://github.com/mrgrain/cdk-esbuild/compare/v1.94.0...v1.94.1) (2021-03-17)
|
|
246
|
-
|
|
247
|
-
### Bug Fixes
|
|
248
|
-
|
|
249
|
-
- change cdk version constraints to work with patches ([fa0fa5f](https://github.com/mrgrain/cdk-esbuild/commit/fa0fa5fbdf608b14faf7a5e6132016fb6f2e393e))
|
|
250
|
-
|
|
251
|
-
## [1.94.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.93.1...v1.94.0) (2021-03-16)
|
|
252
|
-
|
|
253
|
-
- update to cdk-1.94.0 ([1623339](https://github.com/mrgrain/cdk-esbuild/commit/162333930a7534277c5ce4318f81df1fc954fe5e))
|
|
254
|
-
|
|
255
|
-
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
256
|
-
|
|
257
|
-
- deprecated ~~`TypeScriptAsset`~~ & ~~`JavaScriptAsset`~~ in favour of `TypeScriptCode` & `JavaScriptCode` ([f31074e](https://github.com/mrgrain/cdk-esbuild/commit/f31074eeeca039dc847f199eeff88313b61605a1))
|
|
258
|
-
- deprecated ~~`projectRoot`~~ in favour of `buildOptions.absWorkDir` ([ef7ae23](https://github.com/mrgrain/cdk-esbuild/commit/ef7ae237827e381fa2708d67a2d68214a33ab41b)) \
|
|
259
|
-
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. \
|
|
260
|
-
**The automatic project root detection has been removed.**
|
|
261
|
-
- 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))
|
|
262
|
-
|
|
263
|
-
### Features
|
|
264
|
-
|
|
265
|
-
- set sensible defaults for website deployment ([a7a925d](https://github.com/mrgrain/cdk-esbuild/commit/a7a925da367d88184058719a56af55882e7c7aff))
|
|
266
|
-
- new `copyDir` prop to copy additional files into the output ([1dccb25](https://github.com/mrgrain/cdk-esbuild/commit/1dccb254c189500dc48371eeeeed0545c3116863))
|
|
267
|
-
- support for multiple `entryPoints` ([e41757b](https://github.com/mrgrain/cdk-esbuild/commit/e41757bb634d24d4c45ecf98ba981d28df258ce6))
|
|
268
|
-
- `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))
|
|
269
|
-
|
|
270
|
-
## [1.93.1](https://github.com/mrgrain/cdk-esbuild/compare/v1.93.0...v1.93.1) (2021-03-12)
|
|
271
|
-
|
|
272
|
-
Required release to make version available on npm.
|
|
273
|
-
|
|
274
|
-
## [1.93.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.92.0...v1.93.0) (2021-03-12)
|
|
275
|
-
|
|
276
|
-
- update to cdk-1.93.0 ([2dd043b](https://github.com/mrgrain/cdk-esbuild/commit/2dd043b49b606dc6ebcf13c435a5665f5028fce5))
|
|
277
|
-
|
|
278
|
-
### ⚠️ BREAKING CHANGES TO EXPERIMENTAL FEATURES
|
|
279
|
-
|
|
280
|
-
- `projectRoot` auto detection now searches upwards from the entry point, instead of current working directory
|
|
281
|
-
- deprecated ~~`TypeScriptAsset`~~ & ~~`JavaScriptAsset`~~ in favour of `TypeScriptCode` & `JavaScriptCode` ([f31074e](https://github.com/mrgrain/cdk-esbuild/commit/f31074eeeca039dc847f199eeff88313b61605a1))
|
|
282
|
-
|
|
283
|
-
### Features
|
|
20
|
+
- Synthesize `esbuild` types from source ([#117](https://github.com/mrgrain/cdk-esbuild/issues/117)) ([af44d55](https://github.com/mrgrain/cdk-esbuild/commit/af44d55e97db6fd8fbda916eb0f25dae55513cba))
|
|
284
21
|
|
|
285
|
-
-
|
|
22
|
+
- 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))
|