diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1e8ffc520..4ce9b9de33 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -117,7 +117,35 @@ jobs: - run: pnpm install - run: pnpm run build:plugins - tests: + tests-unit: + runs-on: ubuntu-latest + needs: core-build + if: false # Disable until tests are updated for 3.0 + + steps: + - name: Use Node.js 18 + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 8 + run_install: false + + - name: Restore build + uses: actions/cache@v4 + with: + path: ./* + key: ${{ github.sha }}-${{ github.run_number }} + + - name: Unit Tests + run: pnpm test:unit + env: + NODE_OPTIONS: --max-old-space-size=8096 + + tests-int: runs-on: ubuntu-latest needs: core-build strategy: @@ -201,12 +229,6 @@ jobs: echo "POSTGRES_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres" >> $GITHUB_ENV if: matrix.database == 'supabase' - - name: Unit Tests - if: false # Disable until tests are updated for 3.0 - run: pnpm test:unit - env: - NODE_OPTIONS: --max-old-space-size=8096 - - name: Integration Tests run: pnpm test:int env: diff --git a/package.json b/package.json index d90842cbae..75eabcdd08 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "prepare": "husky install", "pretest": "pnpm build", "reinstall": "pnpm clean:all && pnpm install", - "script:list-packages": "tsx ./scripts/list-packages.ts", "script:pack": "tsx scripts/pack-all-to-dest.ts", "release:alpha": "tsx ./scripts/release.ts --bump prerelease --tag alpha", "release:beta": "tsx ./scripts/release.ts --bump prerelease --tag beta", @@ -146,7 +145,7 @@ "semver": "^7.5.4", "sharp": "0.32.6", "shelljs": "0.8.5", - "simple-git": "^3.20.0", + "simple-git": "^3.24.0", "slash": "3.0.0", "slate": "0.91.4", "swc-plugin-transform-remove-imports": "^1.12.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 38f851a645..9c67134dd2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -257,8 +257,8 @@ importers: specifier: 0.8.5 version: 0.8.5 simple-git: - specifier: ^3.20.0 - version: 3.22.0 + specifier: ^3.24.0 + version: 3.24.0 slash: specifier: 3.0.0 version: 3.0.0 @@ -15908,8 +15908,8 @@ packages: simple-concat: 1.0.1 dev: true - /simple-git@3.22.0: - resolution: {integrity: sha512-6JujwSs0ac82jkGjMHiCnTifvf1crOiY/+tfs/Pqih6iow7VrpNKRRNdWm6RtaXpvvv/JGNYhlUtLhGFqHF+Yw==} + /simple-git@3.24.0: + resolution: {integrity: sha512-QqAKee9Twv+3k8IFOFfPB2hnk6as6Y6ACUpwCtQvRYBAes23Wv3SZlHVobAzqcE8gfsisCvPw3HGW3HYM+VYYw==} dependencies: '@kwsites/file-exists': 1.1.1 '@kwsites/promise-deferred': 1.1.1 diff --git a/scripts/list-packages.ts b/scripts/list-packages.ts deleted file mode 100755 index a5773fcc88..0000000000 --- a/scripts/list-packages.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { getPackageDetails, showPackageDetails } from './lib/getPackageDetails' - -async function main() { - const packageDetails = await getPackageDetails() - showPackageDetails(packageDetails) -} - -main().catch((error) => { - console.error(error) - process.exit(1) -}) diff --git a/scripts/release.ts b/scripts/release.ts index b907ec984e..78ebf20bab 100755 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -36,9 +36,9 @@ const packageWhitelist = [ // 'plugin-stripe', ] -const __filename = fileURLToPath(import.meta.url) -const __dirname = path.dirname(__filename) -const cwd = path.resolve(__dirname, '..') +const filename = fileURLToPath(import.meta.url) +const dirname = path.dirname(filename) +const cwd = path.resolve(dirname, '..') const git = simpleGit(cwd) @@ -180,7 +180,7 @@ async function main() { // Set version in root package.json header(`${logPrefix}📦 Updating root package.json...`) - const rootPackageJsonPath = path.resolve(__dirname, '../package.json') + const rootPackageJsonPath = path.resolve(dirname, '../package.json') const rootPackageJson = await fse.readJSON(rootPackageJsonPath) rootPackageJson.version = nextReleaseVersion if (!dryRun) { diff --git a/scripts/utils/updateChangelog.ts b/scripts/utils/updateChangelog.ts index 5f9c63f620..78898a71f8 100755 --- a/scripts/utils/updateChangelog.ts +++ b/scripts/utils/updateChangelog.ts @@ -11,7 +11,7 @@ import { default as getConventionalPreset } from 'conventional-changelog-convent import { once } from 'events' import fse from 'fs-extra' import minimist from 'minimist' -import simpleGit from 'simple-git' +import { simpleGit } from 'simple-git' import tempfile from 'tempfile' const { createReadStream, createWriteStream } = fse