Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #1329

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Version Packages #1329

merged 1 commit into from
Feb 7, 2024

Conversation

seek-oss-ci
Copy link
Contributor

@seek-oss-ci seek-oss-ci commented Nov 29, 2023

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.

Releases

[email protected]

This version of skuba should not require significant upgrade effort for most projects, but it does contain some notable changes:

  • Internal linting and patching have been overhauled to streamline code generation on version upgrades.

    To make upgrades easy now and going forward, we recommend setting up GitHub autofixes.

  • New projects will now be initialised with pnpm, along with improved pnpm support.

    A future release of skuba may transition existing projects to pnpm.

Continue reading for more details on these changes and other improvements in this release.

Minor Changes

  • lint: Overhaul internal linting system (#1370)

    Previously, internal lint rules would not fail a skuba lint check but would silently make changes to your working tree. These changes may have never been committed and may have caused subsequent noise when running skuba format or skuba lint.

    Now, internal linting is now promoted to a top-level tool alongside ESLint, Prettier, and tsc. Rules will report whether changes need to be made, and changes will only be applied in format or autofix modes (in CI). As a consequence, skuba lint may fail upon upgrading to this version if your project has internal lint violations that have been left unaddressed up to this point.

    You can configure skuba lint to automatically push autofixes; this eases adoption of linting rule changes and automatically resolves issues arising from a forgotten skuba format. You'll need to configure your CI environment to support this feature. See our GitHub autofixes documentation to learn more.

  • format: Switch Distroless image from nodejs-debian11 to nodejs-debian12 (#1381)

  • deps: Prettier 3.2 (#1384)

    See the release notes for more information.

  • init: Initialise new projects with pnpm (#1289)

    New projects based on built-in templates will now use pnpm as their package manager as per updated organisational guidance.

    Custom templates will continue to default to Yarn 1.x until a future major version, though you can opt in to pnpm via skuba.template.js:

    module.exports = {
    + packageManager: 'pnpm',
    };
  • lint: Manage .npmrc for pnpm projects (#1413)

    skuba now manages a section of .npmrc when a project uses pnpm to enable dependency hoisting. It will continue to avoid committing autofixes to the file if it contains auth secrets.

  • deps: TypeScript 5.3 (#1324)

    This major release includes breaking changes. See the TypeScript 5.3 announcement for more information.

  • lint: Manage .dockerignore (#1433)

    skuba now manages a section of .dockerignore for you, ensuring that the file is up to date with the latest enhancements in skuba.

  • init: Default to arm64 platform and main branch (#1343)

  • init: Run Prettier after templating (#1337)

  • init: Support main default branch (#1335)

  • lint: Introduce skuba patches (#1274)

    This feature adds patches which are run only once on the lint or format commands following a skuba update. If your build pipeline is utilising autofixes, these changes will be pushed up automatically.

Patch Changes

  • lint: Disable Promise<void> return checks in tests (#1366)

    This works around an existing incompatibility between Koa and the built-in http.RequestListener type:

    const app = new Koa();
    
    const agent = supertest.agent(app.callback());
    //                            ~~~~~~~~~~~~~~
    // Promise returned in function argument where a void return was expected.
    // @typescript-eslint/no-misused-promises
  • deps: picomatch ^3.0.0 (#1309)

  • Jest: Export Config type (#1360)

    This resolves a TypeScript error that could present itself when using Jest.mergePreset with the declaration compiler option:

    TS4082: Default export of the module has or is using private name ConfigGlobals.

  • template/lambda-sqs-worker: Remove @aws-sdk/util-utf8-node library (#1326)

  • build, build-package, test: Remove empty export synthesis for Jest setup files (#1274)

    isolatedModules was enabled by default in v5.0.0. To ease this migration, the commands listed above were updated to dynamically synthesise an empty export for jest.setup.ts and jest.setup.int.ts files; this compatibility logic has now been removed.

    Up-to-date projects are unlikely to be affected, but you can easily add an empty export statement to placate the TypeScript compiler:

    jest.setup.ts(1,1): error TS1208: 'jest.setup.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.
    process.env.ENVIRONMENT = 'test';
    
    + export {};
  • template/lambda-sqs-worker-cdk: Switch to aws-cdk-lib/assertions (#1372)

  • template/*-rest-api: Set readonlyRootFilesystem as a security best practice (#1394)

  • template: Use propagate-environment for Docker Compose Buildkite plugin (#1392)

    This simplifies the Docker Compose environment variable configuration required for Buildkite and GitHub integrations.

    In your docker-compose.yml:

    services:
      app:
    -   environment:
    -     # Enable Buildkite + GitHub integrations.
    -     - BUILDKITE
    -     - BUILDKITE_AGENT_ACCESS_TOKEN
    -     - BUILDKITE_BRANCH
    -     - BUILDKITE_BUILD_NUMBER
    -     - BUILDKITE_JOB_ID
    -     - BUILDKITE_PIPELINE_DEFAULT_BRANCH
    -     - BUILDKITE_STEP_ID
    -     - GITHUB_API_TOKEN
        image: ${BUILDKITE_PLUGIN_DOCKER_IMAGE:-''}
        init: true
        volumes:
          - ./:/workdir
          # Mount agent for Buildkite annotations.
          - /usr/bin/buildkite-agent:/usr/bin/buildkite-agent
          # Mount cached dependencies.
          - /workdir/node_modules

    In your .buildkite/pipeline.yml:

    steps:
      - commands:
          - pnpm lint
          - pnpm test
        env:
          # At SEEK, this instructs the build agent to populate the GITHUB_API_TOKEN environment variable for this step.
          GET_GITHUB_TOKEN: 'please'
        plugins:
          - *aws-sm
          - *private-npm
          - *docker-ecr-cache
          - docker-compose#v4.16.0:
    +         environment:
    +           - GITHUB_API_TOKEN
    +         propagate-environment: true
              run: app
  • template/*-rest-api: Disable dev CloudWatch dashboards for cost savings (#1395)

  • template/lambda-sqs-worker-cdk: Add blue-green deployment, smoke test and version pruning functionality (#1327)

  • template/lambda-sqs-worker*: Set maximum concurrency (#1412)

    This prevents messages from going directly to the DLQ when the function reaches its reserved concurrency limit.

  • template/koa-rest-api: Improve input validation error response for Zod unions (#1339)

  • template/lambda-sqs-worker-cdk: Introduce bundling with esbuild, --hotswap and --watch (#1321)

    This template now uses the aws_lambda_nodejs.NodejsFunction construct which uses esbuild to bundle the Lambda function. This reduces cold start time and time to build on CI.

    The --hotswap and --watch options allow you to rapidly deploy your code changes to AWS, enhancing the developer feedback loop. This change introduces deploy:hotswap and deploy:watch scripts to the package.json manifest and a Deploy Dev (Hotswap) step to the Buildkite pipeline. Read more about watch and hotswap on the AWS Developer Tools Blog.

@seek-oss-ci seek-oss-ci requested review from a team as code owners November 29, 2023 23:01
@samchungy samchungy added the dino:snooze Snooze in Review Dino label Nov 29, 2023
@samchungy samchungy marked this pull request as draft November 29, 2023 23:01
@seek-oss-ci seek-oss-ci force-pushed the changeset-release/master branch 11 times, most recently from 776128b to 1234584 Compare December 14, 2023 05:39
@72636c
Copy link
Member

72636c commented Dec 18, 2023

Some things to validate via snapshot before merging given widespread changes:

  • Publishing works with pnpm-based private-npm-package template

    This requires a change to our internal package publishing pipeline that is waiting until 5th Feb to release

  • Ignore file refreshing and skuba configure do not expose or otherwise mangle existing private .npmrcs

@72636c 72636c mentioned this pull request Dec 18, 2023
4 tasks
@seek-oss-ci seek-oss-ci force-pushed the changeset-release/master branch 12 times, most recently from b7e4a9a to 4ee19b3 Compare December 21, 2023 23:30
@seek-oss-ci seek-oss-ci force-pushed the changeset-release/master branch 4 times, most recently from 2a8f84b to 19cd5ea Compare February 5, 2024 03:27
@AaronMoat
Copy link
Contributor

I would suggest we get in #1415, but we could also do it manually before merging

@seek-oss-ci seek-oss-ci force-pushed the changeset-release/master branch 3 times, most recently from 6f1594a to 3a6d6f1 Compare February 5, 2024 23:57
@AaronMoat AaronMoat removed the dino:snooze Snooze in Review Dino label Feb 5, 2024
@AaronMoat AaronMoat marked this pull request as ready for review February 6, 2024 00:00
@seek-oss-ci seek-oss-ci force-pushed the changeset-release/master branch 13 times, most recently from 84feca7 to 57ab231 Compare February 7, 2024 05:25
Copy link
Contributor

@AaronMoat AaronMoat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@AaronMoat AaronMoat merged commit 966c397 into master Feb 7, 2024
18 checks passed
@AaronMoat AaronMoat deleted the changeset-release/master branch February 7, 2024 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants