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

Chore: bump lerna, jest and create prettier workflow #862

Merged
merged 4 commits into from
Nov 12, 2022
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
5 changes: 5 additions & 0 deletions .changeset/poor-tools-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'simple-git': minor
---

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.
6 changes: 6 additions & 0 deletions .changeset/skip-hop-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'simple-git': patch
---

- Upgrade repo dependencies - lerna and jest
- Include node@19 in the test matrix
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# These are supported funding model platforms

github: [steveukx]

# patreon: # Replace with a single Patreon username
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
Expand Down
2 changes: 1 addition & 1 deletion .github/delete-merged-branch-config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
exclude:
- changeset-release/*
- changeset-release/*
delete_closed_pr: false
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
18 changes: 9 additions & 9 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- run: yarn --frozen-lockfile
- run: yarn build
- run: yarn --frozen-lockfile
- run: yarn build

- uses: changesets/action@v1
- uses: changesets/action@v1
with:
publish: yarn changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@ name: CI

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

permissions:
contents: read
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18]
node-version: [14, 16, 18, 19]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
node-version: ${{ matrix.node-version }}
cache: yarn
- run: node --version
- run: git --version
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Test
env:
GIT_AUTHOR_NAME: "Simple Git Tests"
GIT_AUTHOR_EMAIL: "[email protected]"
GIT_AUTHOR_NAME: 'Simple Git Tests'
GIT_AUTHOR_EMAIL: '[email protected]'
run: yarn test
23 changes: 23 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint

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

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn prettier --check .
6 changes: 4 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
*.md
.changeset
dist
CHANGELOG.md
coverage
node_modules
5 changes: 1 addition & 4 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
"license": "MIT"
}
},
"ignoreChanges": [
"**/test/**",
"**/*.md"
],
"ignoreChanges": ["**/test/**", "**/*.md"],
"useWorkspaces": true,
"version": "2.48.0"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@changesets/changelog-github": "^0.4.2",
"@changesets/cli": "^2.20.0",
"lerna": "^5.5.1",
"lerna": "^6.0.3",
"prettier": "^2.7.1"
}
}
8 changes: 4 additions & 4 deletions packages/babel-config/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const { resolve } = require('path');
const { existsSync } = require('fs');

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

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

Expand All @@ -19,7 +19,7 @@ function resolver() {
];
}

module.exports = function (resolve = false) {
module.exports = function (resolveToDist = false) {
return {
presets: [
[
Expand All @@ -32,6 +32,6 @@ module.exports = function (resolve = false) {
],
'@babel/preset-typescript',
],
plugins: resolve ? [resolver()] : [],
plugins: [resolver(resolveToDist)],
};
};
2 changes: 1 addition & 1 deletion packages/test-utils/src/expectations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitError, GitResponseError } from "simple-git";
import { GitError, GitResponseError } from 'simple-git';

/**
* Convenience for asserting the type and message of a `GitError`
Expand Down
4 changes: 2 additions & 2 deletions simple-git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
"@simple-git/babel-config": "^1.0.0",
"@simple-git/test-utils": "^2.0.0",
"@types/debug": "^4.1.5",
"@types/jest": "^27.0.3",
"@types/jest": "^29.2.2",
"@types/node": "^16",
"esbuild": "^0.14.10",
"esbuild-node-externals": "^1.4.1",
"jest": "^27.4.5",
"jest": "^29.3.1",
"ts-node": "^9.0.0",
"typescript": "^4.1.2"
},
Expand Down
Loading