@mrgrain/cdk-esbuild 2.0.0 → 3.0.0-rc.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/.projenrc.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  AwsCdkConstructLibrary,
3
+ IgnoreFile,
3
4
  JsonFile,
4
5
  NodePackageManager,
5
6
  release,
@@ -17,6 +18,9 @@ const project = new AwsCdkConstructLibrary({
17
18
  lintProjenRc: false,
18
19
  dirs: ['src', 'projenrc', '.projenrc.ts'],
19
20
  },
21
+ depsUpgradeOptions: {
22
+ workflow: false,
23
+ },
20
24
 
21
25
  // Project info
22
26
  name: '@mrgrain/cdk-esbuild',
@@ -42,11 +46,21 @@ const project = new AwsCdkConstructLibrary({
42
46
  license: 'MIT',
43
47
  copyrightOwner: 'Moritz Kornher',
44
48
 
49
+ // Testing & Linting
50
+ githubOptions: {
51
+ pullRequestLintOptions: {
52
+ semanticTitleOptions: {
53
+ types: ['feat', 'fix', 'chore', 'docs', 'ci'],
54
+ },
55
+ },
56
+ },
57
+
45
58
  // Release
46
59
  packageManager: NodePackageManager.NPM,
47
- npmDistTag: 'latest',
48
- defaultReleaseBranch: 'main',
49
- majorVersion: 2,
60
+ npmDistTag: 'next',
61
+ defaultReleaseBranch: 'next',
62
+ majorVersion: 3,
63
+ prerelease: 'rc',
50
64
  releaseTrigger: release.ReleaseTrigger.manual(),
51
65
  catalog: {
52
66
  twitter: '@mrgrain',
@@ -54,27 +68,19 @@ const project = new AwsCdkConstructLibrary({
54
68
  workflowContainerImage: 'jsii/superchain:1-buster-slim-node14',
55
69
 
56
70
  // Dependencies
57
- cdkVersion: '1.99.0',
58
- cdkDependencies: [
59
- '@aws-cdk/aws-lambda',
60
- '@aws-cdk/aws-s3',
61
- '@aws-cdk/aws-s3-assets',
62
- '@aws-cdk/aws-s3-deployment',
63
- '@aws-cdk/aws-synthetics',
64
- '@aws-cdk/core',
65
- ],
66
- cdkTestDependencies: [
67
- '@aws-cdk/assert',
68
- '@aws-cdk/aws-lambda',
69
- '@aws-cdk/aws-s3',
70
- '@aws-cdk/aws-s3-assets',
71
- '@aws-cdk/aws-s3-deployment',
72
- '@aws-cdk/aws-synthetics',
73
- '@aws-cdk/core',
71
+ cdkVersion: '2.0.0',
72
+ peerDeps: [
73
+ 'aws-cdk-lib@^2.0.0',
74
74
  ],
75
+ cdkDependencies: [],
76
+ cdkTestDependencies: [],
77
+ cdkAssert: false,
75
78
  devDeps: [
79
+ '@aws-cdk/aws-synthetics-alpha',
76
80
  '@types/eslint',
77
- 'esbuild@^0.13.0',
81
+ 'aws-cdk-lib@2.0.0',
82
+ 'constructs@10.0.5',
83
+ 'esbuild@^0.14.0',
78
84
  'ts-morph',
79
85
  ],
80
86
 
@@ -105,7 +111,7 @@ const project = new AwsCdkConstructLibrary({
105
111
 
106
112
  const packageJson = project.tryFindObjectFile('package.json');
107
113
  packageJson?.addOverride('optionalDependencies', {
108
- esbuild: '^0.13.0',
114
+ esbuild: '^0.14.0',
109
115
  });
110
116
  packageJson?.addOverride('jest.testPathIgnorePatterns.1', '/examples/');
111
117
 
@@ -114,11 +120,16 @@ eslintRc?.addOverride('ignorePatterns', [
114
120
  '*.js',
115
121
  '*.d.ts',
116
122
  'node_modules/',
123
+ 'examples/',
117
124
  '*.generated.ts',
118
125
  'coverage',
119
126
  '!.projenrc.ts',
120
127
  ]);
121
128
 
129
+ (project.tryFindFile('.gitignore') as IgnoreFile).addPatterns(
130
+ '!/examples/**',
131
+ );
132
+
122
133
  new JsonFile(project, '.vscode/extensions.json', {
123
134
  readonly: false,
124
135
  marker: false,
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
@@ -759,7 +791,7 @@ const codeConfig: CodeConfig = { ... }
759
791
  public readonly s3Location: Location;
760
792
  ```
761
793
 
762
- - *Type:* [`@aws-cdk/aws-s3.Location`](#@aws-cdk/aws-s3.Location)
794
+ - *Type:* [`aws-cdk-lib.aws_s3.Location`](#aws-cdk-lib.aws_s3.Location)
763
795
 
764
796
  The location of the code in S3.
765
797
 
@@ -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
@@ -1425,7 +1563,7 @@ E.g. `src/index.ts`.
1425
1563
  public readonly image: DockerImage;
1426
1564
  ```
1427
1565
 
1428
- - *Type:* [`@aws-cdk/core.DockerImage`](#@aws-cdk/core.DockerImage)
1566
+ - *Type:* [`aws-cdk-lib.DockerImage`](#aws-cdk-lib.DockerImage)
1429
1567
 
1430
1568
  ---
1431
1569
 
@@ -1435,7 +1573,7 @@ public readonly image: DockerImage;
1435
1573
  public readonly local: ILocalBundling;
1436
1574
  ```
1437
1575
 
1438
- - *Type:* [`@aws-cdk/core.ILocalBundling`](#@aws-cdk/core.ILocalBundling)
1576
+ - *Type:* [`aws-cdk-lib.ILocalBundling`](#aws-cdk-lib.ILocalBundling)
1439
1577
 
1440
1578
  Implementation of `ILocalBundling` interface, responsible for calling esbuild functions.
1441
1579
 
@@ -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, transformOptions?: TransformOptions)
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
- ##### `transformOptions`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.InlineJavaScriptCode.parameter.transformOptions"></a>
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
- Transform options passed on to esbuild.
1619
+ Support for `TransformOptions` is deprecated. Please provide `TransformerProps`!
1482
1620
 
1483
- Please refer to the esbuild Transform API docs for details. \
1484
- Default values for `transformOptions`:
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, transformOptions?: TransformOptions)
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
- ##### `transformOptions`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.InlineJsxCode.parameter.transformOptions"></a>
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
- Transform options passed on to esbuild.
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, transformOptions?: TransformOptions)
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
- ##### `transformOptions`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.InlineTsxCode.parameter.transformOptions"></a>
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
- Transform options passed on to esbuild.
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, transformOptions?: TransformOptions)
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
- ##### `transformOptions`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.InlineTypeScriptCode.parameter.transformOptions"></a>
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
- Transform options passed on to esbuild.
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
 
@@ -1622,7 +1764,7 @@ new JavaScriptAsset(scope: Construct, id: string, props: AssetProps)
1622
1764
 
1623
1765
  ##### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptAsset.parameter.scope"></a>
1624
1766
 
1625
- - *Type:* [`@aws-cdk/core.Construct`](#@aws-cdk/core.Construct)
1767
+ - *Type:* [`constructs.Construct`](#constructs.Construct)
1626
1768
 
1627
1769
  ---
1628
1770
 
@@ -1687,7 +1829,7 @@ public bind(scope: Construct)
1687
1829
 
1688
1830
  ###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptCode.parameter.scope"></a>
1689
1831
 
1690
- - *Type:* [`@aws-cdk/core.Construct`](#@aws-cdk/core.Construct)
1832
+ - *Type:* [`constructs.Construct`](#constructs.Construct)
1691
1833
 
1692
1834
  ---
1693
1835
 
@@ -1699,13 +1841,13 @@ public bindToResource(resource: CfnResource, options?: ResourceBindOptions)
1699
1841
 
1700
1842
  ###### `resource`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptCode.parameter.resource"></a>
1701
1843
 
1702
- - *Type:* [`@aws-cdk/core.CfnResource`](#@aws-cdk/core.CfnResource)
1844
+ - *Type:* [`aws-cdk-lib.CfnResource`](#aws-cdk-lib.CfnResource)
1703
1845
 
1704
1846
  ---
1705
1847
 
1706
1848
  ###### `options`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptCode.parameter.options"></a>
1707
1849
 
1708
- - *Type:* [`@aws-cdk/aws-lambda.ResourceBindOptions`](#@aws-cdk/aws-lambda.ResourceBindOptions)
1850
+ - *Type:* [`aws-cdk-lib.aws_lambda.ResourceBindOptions`](#aws-cdk-lib.aws_lambda.ResourceBindOptions)
1709
1851
 
1710
1852
  ---
1711
1853
 
@@ -1729,7 +1871,7 @@ Determines whether this Code is inline code or not.
1729
1871
 
1730
1872
  ### JavaScriptSource <a name="@mrgrain/cdk-esbuild.JavaScriptSource"></a>
1731
1873
 
1732
- - *Implements:* [`@aws-cdk/aws-s3-deployment.ISource`](#@aws-cdk/aws-s3-deployment.ISource)
1874
+ - *Implements:* [`aws-cdk-lib.aws_s3_deployment.ISource`](#aws-cdk-lib.aws_s3_deployment.ISource)
1733
1875
 
1734
1876
  #### Initializers <a name="@mrgrain/cdk-esbuild.JavaScriptSource.Initializer"></a>
1735
1877
 
@@ -1761,13 +1903,13 @@ public bind(scope: Construct, context?: DeploymentSourceContext)
1761
1903
 
1762
1904
  ###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptSource.parameter.scope"></a>
1763
1905
 
1764
- - *Type:* [`@aws-cdk/core.Construct`](#@aws-cdk/core.Construct)
1906
+ - *Type:* [`constructs.Construct`](#constructs.Construct)
1765
1907
 
1766
1908
  ---
1767
1909
 
1768
1910
  ###### `context`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptSource.parameter.context"></a>
1769
1911
 
1770
- - *Type:* [`@aws-cdk/aws-s3-deployment.DeploymentSourceContext`](#@aws-cdk/aws-s3-deployment.DeploymentSourceContext)
1912
+ - *Type:* [`aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext`](#aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext)
1771
1913
 
1772
1914
  ---
1773
1915
 
@@ -1801,7 +1943,7 @@ new TypeScriptAsset(scope: Construct, id: string, props: AssetProps)
1801
1943
 
1802
1944
  ##### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptAsset.parameter.scope"></a>
1803
1945
 
1804
- - *Type:* [`@aws-cdk/core.Construct`](#@aws-cdk/core.Construct)
1946
+ - *Type:* [`constructs.Construct`](#constructs.Construct)
1805
1947
 
1806
1948
  ---
1807
1949
 
@@ -1866,7 +2008,7 @@ public bind(scope: Construct)
1866
2008
 
1867
2009
  ###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptCode.parameter.scope"></a>
1868
2010
 
1869
- - *Type:* [`@aws-cdk/core.Construct`](#@aws-cdk/core.Construct)
2011
+ - *Type:* [`constructs.Construct`](#constructs.Construct)
1870
2012
 
1871
2013
  ---
1872
2014
 
@@ -1878,13 +2020,13 @@ public bindToResource(resource: CfnResource, options?: ResourceBindOptions)
1878
2020
 
1879
2021
  ###### `resource`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptCode.parameter.resource"></a>
1880
2022
 
1881
- - *Type:* [`@aws-cdk/core.CfnResource`](#@aws-cdk/core.CfnResource)
2023
+ - *Type:* [`aws-cdk-lib.CfnResource`](#aws-cdk-lib.CfnResource)
1882
2024
 
1883
2025
  ---
1884
2026
 
1885
2027
  ###### `options`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptCode.parameter.options"></a>
1886
2028
 
1887
- - *Type:* [`@aws-cdk/aws-lambda.ResourceBindOptions`](#@aws-cdk/aws-lambda.ResourceBindOptions)
2029
+ - *Type:* [`aws-cdk-lib.aws_lambda.ResourceBindOptions`](#aws-cdk-lib.aws_lambda.ResourceBindOptions)
1888
2030
 
1889
2031
  ---
1890
2032
 
@@ -1908,7 +2050,7 @@ Determines whether this Code is inline code or not.
1908
2050
 
1909
2051
  ### TypeScriptSource <a name="@mrgrain/cdk-esbuild.TypeScriptSource"></a>
1910
2052
 
1911
- - *Implements:* [`@aws-cdk/aws-s3-deployment.ISource`](#@aws-cdk/aws-s3-deployment.ISource)
2053
+ - *Implements:* [`aws-cdk-lib.aws_s3_deployment.ISource`](#aws-cdk-lib.aws_s3_deployment.ISource)
1912
2054
 
1913
2055
  #### Initializers <a name="@mrgrain/cdk-esbuild.TypeScriptSource.Initializer"></a>
1914
2056
 
@@ -1940,13 +2082,13 @@ public bind(scope: Construct, context?: DeploymentSourceContext)
1940
2082
 
1941
2083
  ###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptSource.parameter.scope"></a>
1942
2084
 
1943
- - *Type:* [`@aws-cdk/core.Construct`](#@aws-cdk/core.Construct)
2085
+ - *Type:* [`constructs.Construct`](#constructs.Construct)
1944
2086
 
1945
2087
  ---
1946
2088
 
1947
2089
  ###### `context`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptSource.parameter.context"></a>
1948
2090
 
1949
- - *Type:* [`@aws-cdk/aws-s3-deployment.DeploymentSourceContext`](#@aws-cdk/aws-s3-deployment.DeploymentSourceContext)
2091
+ - *Type:* [`aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext`](#aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext)
1950
2092
 
1951
2093
  ---
1952
2094
 
package/CHANGELOG.md CHANGED
@@ -1,36 +1,98 @@
1
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)
2
+ ## [3.0.0-rc.0](https://github.com/mrgrain/cdk-esbuild/compare/v2.2.0...v3.0.0-rc.0) (2021-12-04)
3
3
 
4
4
 
5
- ### Features
5
+ ### ⚠ BREAKING CHANGES
6
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))
7
+ * package now requires AWS CDK v2
8
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)
9
+ ### Features
10
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)
11
+ * upgrade to AWS CDK v2 ([134caa8](https://github.com/mrgrain/cdk-esbuild/commit/134caa8848708a132c28d9140d2d569f90a2b178))
12
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)
13
+ ## [2.2.0](https://github.com/mrgrain/cdk-esbuild/compare/v2.1.0...v2.2.0) (2021-12-04)
14
14
 
15
+ **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).
15
16
 
16
17
  ### Features
17
18
 
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
+ - 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))
20
+ - **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))
19
21
 
20
- ## [2.0.0-alpha.2](https://github.com/mrgrain/cdk-esbuild/compare/v1.128.0...v2.0.0-alpha.2) (2021-10-17)
22
+ ## [2.1.0](https://github.com/mrgrain/cdk-esbuild/compare/v2.0.0...v2.1.0) (2021-11-25)
23
+
24
+ ### Features
21
25
 
26
+ - 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))
27
+ - `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))
28
+
29
+ ## [2.0.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.129.0...v2.0.0) (2021-11-07)
22
30
 
23
31
  ### ⚠ BREAKING CHANGES
24
32
 
25
- * Alpha release of a jsii version of this package. Aim is
26
- that migration will be minimal, however probably not avoidable.
33
+ - 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)
34
+
35
+ - Deprecated features from v1 have been removed. Please see upgrading instructions below.
36
+
37
+ ### Upgrading to v2
38
+
39
+ - Update the package dependency to v2: `npm install --save @mrgrain/cdk-esbuild@^2.0.0`
40
+ - `esbuild` is now installed as an optional dependency. If your setup does not automatically install optional dependencies, add it as an explicit dependency.
41
+ - Remove any use of `bundlerPriority`.
42
+ - 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.
27
43
 
28
44
  ### Features
29
45
 
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))
46
+ - 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)
47
+
48
+ - Synthesize `esbuild` types from source ([#117](https://github.com/mrgrain/cdk-esbuild/issues/117)) ([af44d55](https://github.com/mrgrain/cdk-esbuild/commit/af44d55e97db6fd8fbda916eb0f25dae55513cba))
49
+
50
+ - 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))
51
+
52
+ ## [1.133.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.132.0...v1.133.0) (2021-11-21)
53
+
54
+ - **This is a release on the legacy v1 branch. Please upgrade to v2 as soon as possible.**
55
+ - works with cdk-1.133.0
56
+
57
+ ### ⛔ EXTREMELY IMPORTANT NOTICE FOR USERS WHO HAVE NOT UPGRADE TO v2 OF THIS PACKAGE
58
+
59
+ **tl;dr No more "versioned" release on this legacy branch.**
60
+
61
+ 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!**
62
+
63
+ [**Upgrading instructions to v2 of this package**](https://github.com/mrgrain/cdk-esbuild#migrating-to-v2)
64
+
65
+ 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.
66
+
67
+ ## [1.132.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.131.0...v1.132.0) (2021-11-21)
68
+
69
+ - works with cdk-1.132.0
70
+
71
+ ### ⚠ IMPORTANT NOTICE
72
+
73
+ This is a release on the legacy v1 branch. Please upgrade to v2 as soon as possible.
74
+
75
+ 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.
76
+
77
+ ## [1.131.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.130.0...v1.131.0) (2021-11-07)
78
+
79
+ - works with cdk-1.131.0
80
+
81
+ ### ⚠ IMPORTANT NOTICE
82
+
83
+ This is a release on the legacy v1 branch. Please upgrade to v2 as soon as possible.
84
+
85
+ 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.
86
+
87
+ ## [1.130.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.129.0...v1.130.0) (2021-11-07)
88
+
89
+ - works with cdk-1.130.0
90
+
91
+ ### ⚠ IMPORTANT NOTICE
92
+
93
+ This is the first release on the legacy v1 branch. Please upgrade to v2 as soon as possible.
94
+
95
+ 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.
34
96
 
35
97
  ## [1.129.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.128.0...v1.129.0) (2021-10-28)
36
98