Skip to content

Commit 7746480

Browse files
authored
Chore: bump lerna, jest and create prettier workflow (#862)
* Chore: bump lerna to latest `6.0.3` * Chore: prettier and add lint action
1 parent 47030d5 commit 7746480

19 files changed

+1586
-1431
lines changed

.changeset/poor-tools-doubt.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'simple-git': minor
3+
---
4+
5+
Disables the use of inline configuration arguments to prevent unitentionally allowing non-standard remote protocols without explicitly opting in to this practice with the new `allowUnsafeProtocolOverride` property having been enabled.

.changeset/skip-hop-jump.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'simple-git': patch
3+
---
4+
5+
- Upgrade repo dependencies - lerna and jest
6+
- Include node@19 in the test matrix

.github/FUNDING.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# These are supported funding model platforms
22

33
github: [steveukx]
4-
54
# patreon: # Replace with a single Patreon username
65
# open_collective: # Replace with a single Open Collective username
76
# ko_fi: # Replace with a single Ko-fi username
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
exclude:
2-
- changeset-release/*
2+
- changeset-release/*
33
delete_closed_pr: false

.github/dependabot.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: "/"
5-
schedule:
6-
interval: "weekly"
3+
- package-ecosystem: 'github-actions'
4+
directory: '/'
5+
schedule:
6+
interval: 'weekly'

.github/workflows/changesets.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ jobs:
99
release:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout Repo
12+
- name: Checkout Repo
1313
uses: actions/checkout@v3
1414
with:
15-
fetch-depth: 0
15+
fetch-depth: 0
1616

17-
- uses: actions/setup-node@v3
17+
- uses: actions/setup-node@v3
1818
with:
19-
node-version: 16
19+
node-version: 18
2020

21-
- run: yarn --frozen-lockfile
22-
- run: yarn build
21+
- run: yarn --frozen-lockfile
22+
- run: yarn build
2323

24-
- uses: changesets/action@v1
24+
- uses: changesets/action@v1
2525
with:
2626
publish: yarn changeset publish
2727
env:
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29-
NPM_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
NPM_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

.github/workflows/ci.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,32 @@ name: CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
permissions:
10-
contents: read
10+
contents: read
1111

1212
jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
node-version: [14, 16, 18]
17+
node-version: [14, 16, 18, 19]
1818
steps:
1919
- uses: actions/checkout@v3
2020
- name: Use Node.js ${{ matrix.node-version }}
2121
uses: actions/setup-node@v3
2222
with:
23-
node-version: ${{ matrix.node-version }}
24-
cache: yarn
23+
node-version: ${{ matrix.node-version }}
24+
cache: yarn
2525
- run: node --version
2626
- run: git --version
2727
- run: yarn install --frozen-lockfile
2828
- run: yarn build
2929
- name: Test
3030
env:
31-
GIT_AUTHOR_NAME: "Simple Git Tests"
32-
GIT_AUTHOR_EMAIL: "tests@simple-git.dev"
31+
GIT_AUTHOR_NAME: 'Simple Git Tests'
32+
GIT_AUTHOR_EMAIL: 'tests@simple-git.dev'
3333
run: yarn test

.github/workflows/quality.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Use Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 18
21+
cache: yarn
22+
- run: yarn install --frozen-lockfile
23+
- run: yarn prettier --check .

.prettierignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
node_modules
1+
*.md
2+
.changeset
23
dist
3-
CHANGELOG.md
4+
coverage
5+
node_modules

lerna.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
"license": "MIT"
77
}
88
},
9-
"ignoreChanges": [
10-
"**/test/**",
11-
"**/*.md"
12-
],
9+
"ignoreChanges": ["**/test/**", "**/*.md"],
1310
"useWorkspaces": true,
1411
"version": "2.48.0"
1512
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependencies": {
1818
"@changesets/changelog-github": "^0.4.2",
1919
"@changesets/cli": "^2.20.0",
20-
"lerna": "^5.5.1",
20+
"lerna": "^6.0.3",
2121
"prettier": "^2.7.1"
2222
}
2323
}

packages/babel-config/babel.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
const { resolve } = require('path');
22
const { existsSync } = require('fs');
33

4-
function resolver() {
4+
function resolver(resolveToDist) {
55
const root = resolve(__dirname, '../..', 'simple-git');
6-
const dist = resolve(root, 'dist', 'cjs');
6+
const dist = resolveToDist ? resolve(root, 'dist', 'cjs') : root;
77

88
const pkg = existsSync(dist) ? dist : root;
99

@@ -19,7 +19,7 @@ function resolver() {
1919
];
2020
}
2121

22-
module.exports = function (resolve = false) {
22+
module.exports = function (resolveToDist = false) {
2323
return {
2424
presets: [
2525
[
@@ -32,6 +32,6 @@ module.exports = function (resolve = false) {
3232
],
3333
'@babel/preset-typescript',
3434
],
35-
plugins: resolve ? [resolver()] : [],
35+
plugins: [resolver(resolveToDist)],
3636
};
3737
};

packages/test-utils/src/expectations.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { GitError, GitResponseError } from "simple-git";
1+
import { GitError, GitResponseError } from 'simple-git';
22

33
/**
44
* Convenience for asserting the type and message of a `GitError`

simple-git/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
"@simple-git/babel-config": "^1.0.0",
2424
"@simple-git/test-utils": "^2.0.0",
2525
"@types/debug": "^4.1.5",
26-
"@types/jest": "^27.0.3",
26+
"@types/jest": "^29.2.2",
2727
"@types/node": "^16",
2828
"esbuild": "^0.14.10",
2929
"esbuild-node-externals": "^1.4.1",
30-
"jest": "^27.4.5",
30+
"jest": "^29.3.1",
3131
"ts-node": "^9.0.0",
3232
"typescript": "^4.1.2"
3333
},

0 commit comments

Comments
 (0)