Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .babelrc

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Node CI

on: [pull_request]
on:
push:
branches:
- main
pull_request:

jobs:
build:
Expand Down
11 changes: 3 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,22 @@
"main": "dist/index.js",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.13.10",
"@babel/preset-env": "^7.13.10",
"@babel/preset-typescript": "^7.13.0",
"@changesets/changelog-github": "^0.4.2",
"@changesets/cli": "^2.20.0",
"@changesets/write": "^0.1.6",
"@types/fs-extra": "^8.0.0",
"@types/jest": "^29.5.1",
"@types/node": "^22.15.17",
"@types/semver": "^7.5.0",
"babel-jest": "^29.5.0",
"esbuild": "^0.25.4",
"fixturez": "^1.1.0",
"husky": "^3.0.3",
"jest": "^29.5.0",
"prettier": "^2.0.5",
"typescript": "^5.8.3"
"typescript": "^5.8.3",
"vitest": "^3.1.3"
},
"scripts": {
"build": "esbuild src/index.ts --bundle --platform=node --target=node20 --minify --outfile=dist/index.js",
"test": "jest",
"test": "vitest",
"test:watch": "yarn test --watch",
"typecheck": "tsc",
"changeset": "changeset",
Expand Down
12 changes: 6 additions & 6 deletions src/__snapshots__/run.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`version creates simple PR 1`] = `
exports[`version > creates simple PR 1`] = `
[
{
"base": "some-branch",
Expand Down Expand Up @@ -33,7 +33,7 @@ exports[`version creates simple PR 1`] = `
]
`;

exports[`version does not include any release information if a message with simplified release info exceeds size limit 1`] = `
exports[`version > does not include any release information if a message with simplified release info exceeds size limit 1`] = `
[
{
"base": "some-branch",
Expand All @@ -51,7 +51,7 @@ exports[`version does not include any release information if a message with simp
]
`;

exports[`version does not include changelog entries if full message exceeds size limit 1`] = `
exports[`version > does not include changelog entries if full message exceeds size limit 1`] = `
[
{
"base": "some-branch",
Expand All @@ -73,7 +73,7 @@ exports[`version does not include changelog entries if full message exceeds size
]
`;

exports[`version doesn't include ignored package that got a dependency update in the PR body 1`] = `
exports[`version > doesn't include ignored package that got a dependency update in the PR body 1`] = `
[
{
"base": "some-branch",
Expand All @@ -95,7 +95,7 @@ exports[`version doesn't include ignored package that got a dependency update in
]
`;

exports[`version only includes bumped packages in the PR body 1`] = `
exports[`version > only includes bumped packages in the PR body 1`] = `
[
{
"base": "some-branch",
Expand Down
2 changes: 1 addition & 1 deletion src/__snapshots__/utils.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`it sorts the things right 1`] = `
[
Expand Down
15 changes: 8 additions & 7 deletions src/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import writeChangeset from "@changesets/write";
import fixturez from "fixturez";
import fs from "fs-extra";
import path from "path";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { Git } from "./git";
import { setupOctokit } from "./octokit";
import { runVersion } from "./run";

jest.mock("@actions/github", () => ({
vi.mock("@actions/github", () => ({
context: {
repo: {
owner: "changesets",
Expand All @@ -20,16 +21,16 @@ jest.mock("@actions/github", () => ({
rest: mockedGithubMethods,
}),
}));
jest.mock("./git");
jest.mock("@changesets/ghcommit/git");
vi.mock("./git");
vi.mock("@changesets/ghcommit/git");

let mockedGithubMethods = {
pulls: {
create: jest.fn(),
list: jest.fn(),
create: vi.fn(),
list: vi.fn(),
},
repos: {
createRelease: jest.fn(),
createRelease: vi.fn(),
},
};

Expand All @@ -46,7 +47,7 @@ const writeChangesets = (changesets: Changeset[], cwd: string) => {
};

beforeEach(() => {
jest.clearAllMocks();
vi.clearAllMocks();
});

describe("version", () => {
Expand Down
3 changes: 2 additions & 1 deletion src/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { getChangelogEntry, BumpLevels, sortTheThings } from "./utils";
import { expect, test } from "vitest";
import { BumpLevels, getChangelogEntry, sortTheThings } from "./utils";

let changelog = `# @keystone-alpha/email

Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"isolatedModules": true,
"strict": true,
"moduleResolution": "node16",
"erasableSyntaxOnly": true
"erasableSyntaxOnly": true,
"skipLibCheck": true
}
}
Loading