|
1 | 1 | # skuba
|
2 | 2 |
|
| 3 | +## 3.12.0 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- 641accc: **node:** Add command |
| 8 | + |
| 9 | + `skuba node` lets you run a TypeScript source file, or open a REPL if none is provided: |
| 10 | + |
| 11 | + - `skuba node src/some-cli-script.ts` |
| 12 | + - `skuba node` |
| 13 | + |
| 14 | + This automatically registers a `src` module alias for ease of local development. For example, you can run a prospective `src/someLocalCliScript.ts` without having to register a module alias resolver: |
| 15 | + |
| 16 | + ```typescript |
| 17 | + // This `src` module alias just works under `skuba node` and `skuba start` |
| 18 | + import { rootLogger } from 'src/framework/logging'; |
| 19 | + ``` |
| 20 | + |
| 21 | + ```bash |
| 22 | + yarn skuba node src/someLocalCliScript |
| 23 | + ``` |
| 24 | + |
| 25 | + If you use this alias in your production code, your production entry point(s) will need to import a runtime module alias resolver like [`skuba-dive/register`](https://github.com/seek-oss/skuba-dive#register). For example, your `src/app.ts` may look like: |
| 26 | + |
| 27 | + ```typescript |
| 28 | + // This must be imported directly within the `src` directory |
| 29 | + import 'skuba-dive/register'; |
| 30 | + |
| 31 | + // You can use the `src` module alias after registration |
| 32 | + import { rootLogger } 'src/framework/logging'; |
| 33 | + ``` |
| 34 | +
|
| 35 | +- 334f38b: **node, start:** Support function entry points |
| 36 | +
|
| 37 | + You can now specify an entry point that targets an exported function: |
| 38 | +
|
| 39 | + ```bash |
| 40 | + skuba start --port 12345 src/app.ts#handler |
| 41 | + ``` |
| 42 | +
|
| 43 | + This starts up a local HTTP server that you can POST arguments to: |
| 44 | +
|
| 45 | + ```bash |
| 46 | + curl --data '["event", {"awsRequestId": "123"}]' --include localhost:12345 |
| 47 | + ``` |
| 48 | +
|
| 49 | + You may find this useful to run Lambda function handlers locally. |
| 50 | +
|
| 51 | +- e1dab09: **configure, help, init:** Check for newer skuba versions |
| 52 | +
|
| 53 | + skuba will now print an upgrade command if there is a newer version available. You can now use a global installation without worrying that you're setting up new repos using outdated templates. |
| 54 | +
|
| 55 | +### Patch Changes |
| 56 | +
|
| 57 | +- 30bc4e7: **template/lambda-sqs-worker:** Simplify Buildkite pipeline |
| 58 | +- 65f3e14: **deps:** typescript 4.1.3 |
| 59 | +- ceb394f: **template/koa-rest-api:** Type context |
| 60 | +- 8c87be4: **lint:** Detect incomplete templating |
| 61 | +- 5ad44ae: **template:** Use `jest.config.ts` |
| 62 | +- 0774f98: **template/lambda-sqs-worker:** Add smoke test |
| 63 | +
|
| 64 | + This brings back versioned functions along with `serverless-prune-plugin` to control Lambda storage consumption. By default we configure `serverless-plugin-canary-deployments` for an instantaneous switch once the smoke test has passed, but this can be customised as necessary. |
| 65 | +
|
| 66 | +- 5ad44ae: **configure:** Add `test:watch` script |
| 67 | +- 5ad44ae: **configure:** Migrate `jest.config.js` to `jest.config.ts` |
| 68 | +- 2d2bf99: **template:** Enable retry of successful deployment steps |
| 69 | +
|
| 70 | + This should be used with caution, but may be necessary if you need to rapidly roll back a broken deployment. |
| 71 | +
|
| 72 | +- 2d0dc1a: **template/\*-rest-api:** Supply custom autoscaling policy |
| 73 | +- b7cbee2: **init:** Pick random server port |
| 74 | +- 334f38b: **template/lambda-sqs-worker:** Add `start` script |
| 75 | +- e7254c1: **template/\*-rest-api:** Explicitly register `listen.ts` |
| 76 | +- 141c802: **deps:** Bump caret ranges |
| 77 | +
|
| 78 | + Resolves [SNYK-JS-SEMVERREGEX-1047770](https://app.snyk.io/vuln/SNYK-JS-SEMVERREGEX-1047770). |
| 79 | +
|
| 80 | +- 9002d51: **template/koa-rest-api:** Limit request logging to errors |
| 81 | +- 641accc: **start:** Improve support for non-HTTP server entry points |
| 82 | +
|
| 83 | + You can now run arbitrary TypeScript files without them exiting on a `You must export callback or requestListener` error. |
| 84 | +
|
| 85 | +- 6074e53: **configure, init:** Improve error messaging in offline scenarios |
| 86 | +- e7254c1: **template/\*-rest-api:** Clarify health checks and smoke tests |
| 87 | +- d5afa4d: **template/lambda-sqs-worker:** Require deployment bucket |
| 88 | +- 7e9a062: **pkg:** Remove ESM from skuba's bundle |
| 89 | +
|
| 90 | + This simplifies our bundle; Node.js and skuba's CLI have always defaulted to CommonJS anyway. |
| 91 | +
|
| 92 | +- 641accc: **start:** Support `src` module alias |
| 93 | +- 334f38b: **node, start:** Support `--port` option |
| 94 | +- 8745cb0: **configure:** Remove `package-lock.json` |
| 95 | +- 739ce3a: **test:** Set `NODE_ENV=test` |
| 96 | +
|
| 97 | + This is something that Jest itself does in its `bin/jest`. |
| 98 | +
|
| 99 | +- 359a9be: **template:** Bump caret ranges |
| 100 | +- 641accc: **start:** Support source maps |
| 101 | +- d7aca2a: **template/lambda-sqs-worker:** Lock Serverless `lambdaHashingVersion` |
| 102 | +
|
| 103 | + This gets rid of the following warning when deploying: |
| 104 | +
|
| 105 | + ```text |
| 106 | + Deprecation warning: Starting with next major version, default value of provider.lambdaHashingVersion will be equal to "20201221" |
| 107 | + More Info: https://www.serverless.com/framework/docs/deprecations/#LAMBDA_HASHING_VERSION_V2 |
| 108 | + ``` |
| 109 | +
|
| 110 | +- 359a9be: **deps:** Bump minor and patch versions |
| 111 | +- c3dab88: **configure:** Ensure workspaced `package.json` is private |
| 112 | +- ece7dd4: **template/\*-rest-api:** Use Distroless runtime images |
| 113 | +- 88705b4: **template:** Uplift READMEs |
| 114 | +
|
3 | 115 | ## 3.11.0
|
4 | 116 |
|
5 | 117 | ### Minor Changes
|
|
0 commit comments