Skip to content

Commit

Permalink
fix(lambda): deprecate old Lambda runtimes (#2594)
Browse files Browse the repository at this point in the history
Add deprecation warnings for lambda runtimes
  • Loading branch information
robertd authored and rix0rrr committed May 21, 2019
1 parent 4d2fbe9 commit 20f4ec1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/@aws-cdk/aws-lambda/lib/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ export enum RuntimeFamily {
* can instantiate a `Runtime` object, e.g: `new Runtime('nodejs99.99')`.
*/
export class Runtime {
/** A list of all the know ``Runtime``s. */
/** A list of all known `Runtime`'s. */
public static readonly All = new Array<Runtime>();

/** @deprecated Use `NodeJS810` or `NodeJS10x` */
public static readonly NodeJS = new Runtime('nodejs', RuntimeFamily.NodeJS, { supportsInlineCode: true });
/** @deprecated Use `NodeJS810` or `NodeJS10x` */
public static readonly NodeJS43 = new Runtime('nodejs4.3', RuntimeFamily.NodeJS, { supportsInlineCode: true });
/** @deprecated Use `NodeJS810` or `NodeJS10x` */
public static readonly NodeJS610 = new Runtime('nodejs6.10', RuntimeFamily.NodeJS, { supportsInlineCode: true });
public static readonly NodeJS810 = new Runtime('nodejs8.10', RuntimeFamily.NodeJS, { supportsInlineCode: true });
public static readonly NodeJS10x = new Runtime('nodejs10.x', RuntimeFamily.NodeJS, { supportsInlineCode: false });
Expand All @@ -36,6 +39,7 @@ export class Runtime {
public static readonly Python37 = new Runtime('python3.7', RuntimeFamily.Python, { supportsInlineCode: true });
public static readonly Java8 = new Runtime('java8', RuntimeFamily.Java);
public static readonly DotNetCore1 = new Runtime('dotnetcore1.0', RuntimeFamily.DotNetCore);
/** @deprecated Use `DotNetCore21` */
public static readonly DotNetCore2 = new Runtime('dotnetcore2.0', RuntimeFamily.DotNetCore);
public static readonly DotNetCore21 = new Runtime('dotnetcore2.1', RuntimeFamily.DotNetCore);
public static readonly Go1x = new Runtime('go1.x', RuntimeFamily.Go);
Expand Down

0 comments on commit 20f4ec1

Please sign in to comment.