Skip to content

Commit

Permalink
feat!: update deps and drop old Node.js versions support (#14)
Browse files Browse the repository at this point in the history
* pnpm up, pre-major semver changes

* update deprecated jest config

* pnpm up --latest, meow downgraded to pre-node16 ts requirement

* updated find-workspace-packages, had been renamed

* update ts module to node16, meow  v13 requirement

* bump major semver due to many package updates

* style: fix

* ci: drop older node.js versions support

---------

Co-authored-by: Wm Salt Hale <[email protected]>
Co-authored-by: Zoltan Kochan <[email protected]>
  • Loading branch information
3 people authored Jun 12, 2024
1 parent dd00c43 commit 54ed85b
Show file tree
Hide file tree
Showing 10 changed files with 500 additions and 694 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ jobs:
fail-fast: false
matrix:
node:
- '14'
- '16'
- '18'
- '20'
- '22'
platform:
- ubuntu-latest
- windows-latest
Expand Down
10 changes: 5 additions & 5 deletions __tests__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { execa } from 'execa'
import fsx from 'fs-extra'
import { loadJsonFile } from 'load-json-file'
import path from 'path'
import tempy from 'tempy'
import { temporaryDirectory } from 'tempy'
import { fileURLToPath } from 'url'
import { createUpdateOptions, performUpdates } from '../src/index.js'

Expand All @@ -11,7 +11,7 @@ const WORKSPACE1 = path.join(__dirname, '../__fixtures__/workspace-1')
const CLI = path.join(__dirname, '../lib/cli.js')

test('updates manifests', async () => {
const tmp = tempy.directory()
const tmp = temporaryDirectory()
await fsx.copy(WORKSPACE1, tmp)
const result = await execa('node', [CLI], { cwd: tmp })
expect(result.exitCode).toBe(0)
Expand All @@ -26,7 +26,7 @@ test('updates manifests', async () => {
})

test('updates are detected', async () => {
const tmp = tempy.directory()
const tmp = temporaryDirectory()
await fsx.copy(WORKSPACE1, tmp)
const result = await performUpdates(
tmp,
Expand Down Expand Up @@ -62,7 +62,7 @@ test('updates are detected', async () => {
})

test('new config files are added', async () => {
const tmp = tempy.directory()
const tmp = temporaryDirectory()
await fsx.copy(WORKSPACE1, tmp)
const result = await performUpdates(
tmp,
Expand All @@ -83,7 +83,7 @@ test('new config files are added', async () => {
})

test('config files are removed', async () => {
const tmp = tempy.directory()
const tmp = temporaryDirectory()
await fsx.copy(WORKSPACE1, tmp)
const result = await performUpdates(
tmp,
Expand Down
10 changes: 5 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export default {
preset: 'ts-jest/presets/default-esm',
globals: {
'ts-jest': {
useESM: true,
},
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
testEnvironment: 'node',
transform: {
'^.+\\.tsx?$': ['ts-jest', {
useESM: true,
}]
}
}
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"keywords": [],
"engines": {
"node": ">=10.12"
"node": ">=18.19.0"
},
"author": "Zoltan Kochan <[email protected]> (https://www.kochan.io/)",
"license": "MIT",
Expand All @@ -30,27 +30,27 @@
},
"homepage": "https://github.com/pnpm/meta-updater#readme",
"dependencies": {
"@pnpm/find-workspace-dir": "^6.0.2",
"@pnpm/find-workspace-packages": "^6.0.9",
"@pnpm/find-workspace-dir": "^7.0.0",
"@pnpm/logger": "^5.0.0",
"@pnpm/types": "^9.2.0",
"@pnpm/types": "^10.0.0",
"@pnpm/workspace.find-packages": "^2.0.4",
"load-json-file": "^7.0.1",
"meow": "^10.1.3",
"print-diff": "^1.0.0",
"ramda": "^0.29.0",
"meow": "^13.2.0",
"print-diff": "^2.0.0",
"ramda": "^0.30.0",
"write-json-file": "^5.0.0"
},
"devDependencies": {
"@types/fs-extra": "^11.0.1",
"@types/jest": "^29.5.3",
"@types/node": "^20.4.5",
"@types/ramda": "^0.29.3",
"execa": "^6.1.0",
"fs-extra": "^11.1.1",
"jest": "^29.6.2",
"rimraf": "^5.0.1",
"tempy": "^1.0.1",
"ts-jest": "^29.1.1",
"typescript": "^5.1.6"
"@types/fs-extra": "^11.0.4",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.11",
"@types/ramda": "^0.30.0",
"execa": "^9.0.0",
"fs-extra": "^11.2.0",
"jest": "^29.7.0",
"rimraf": "^5.0.5",
"tempy": "^3.1.0",
"ts-jest": "^29.1.2",
"typescript": "^5.4.5"
}
}
Loading

0 comments on commit 54ed85b

Please sign in to comment.