Skip to content

Commit f923708

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents 7b8c626 + ed055f2 commit f923708

File tree

204 files changed

+9451
-8952
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+9451
-8952
lines changed

.github/workflows/authors-and-third-party-notices.yaml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Update Authors and Third Party Notices
33
on:
44
# Once a week or on pushes to main
55
schedule:
6-
- cron: "0 3 * * 0"
6+
- cron: '0 3 * * 0'
77
push:
88
branches:
99
- main
@@ -13,6 +13,9 @@ permissions:
1313

1414
jobs:
1515
update_generated_files:
16+
if: |
17+
github.event_name == 'schedule' ||
18+
!startsWith(github.event.head_commit.message, 'chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary')
1619
name: Update automatically generated files
1720
runs-on: ubuntu-latest
1821
env:
@@ -32,13 +35,13 @@ jobs:
3235

3336
# this is important so git log can pick up on
3437
# the whole history to generate the list of AUTHORS
35-
fetch-depth: "0"
38+
fetch-depth: '0'
3639
token: ${{ steps.app-token.outputs.token }}
3740

3841
- uses: actions/setup-node@v4
3942
with:
4043
node-version: 20.16.0
41-
cache: "npm"
44+
cache: 'npm'
4245

4346
- name: Install [email protected]
4447
run: |
@@ -71,5 +74,15 @@ jobs:
7174
7275
- name: Commit and push
7376
run: |
74-
git commit --no-allow-empty -m "chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary" || true
75-
git push
77+
# We can't rely on git not allowing empty commits by default: the
78+
# empty commit check happens before the pre-commit hooks run and if
79+
# there is no diff exists after precommit logic was executed, empty
80+
# commit will still be generated. Instead of that we will allow empty
81+
# commit to happen and will check it directly if it's empty or not
82+
git commit --allow-empty -m "chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary"
83+
if [ $(git diff-tree --name-only --no-commit-id HEAD | wc -l) -gt 0 ]; then
84+
echo "Files changed, pushing update..."
85+
git push
86+
else
87+
echo "No changes to push"
88+
fi

.husky/pre-commit

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44
# listings staged files only
55
fileList=$(git diff --diff-filter=AM --cached --name-only)
66

7-
npm run precommit $fileList
7+
if [ -n "$fileList" ]; then
8+
echo "Prettifying staged files..."
9+
npx prettier-compass --write --ignore-unknown $fileList
10+
git add $fileList
11+
fi
File renamed without changes.

THIRD-PARTY-NOTICES.md

Lines changed: 9106 additions & 8155 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
require('eslint/bin/eslint.js');

configs/eslint-config-compass/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@
44
"description": "Shared Compass eslint configuration",
55
"license": "SSPL",
66
"main": "index.js",
7+
"bin": {
8+
"eslint-compass": "./bin/eslint.js"
9+
},
710
"files": [
811
"index.js",
12+
"bin",
913
"package.json",
1014
"README.md"
1115
],
12-
"peerDependencies": {
13-
"eslint": "^7.25.0"
14-
},
1516
"dependencies": {
1617
"@babel/core": "^7.21.4",
1718
"@babel/eslint-parser": "^7.14.3",
1819
"@mongodb-js/eslint-config-devtools": "^0.9.9",
1920
"@mongodb-js/eslint-plugin-compass": "^1.2.6",
2021
"@typescript-eslint/eslint-plugin": "^5.59.0",
2122
"@typescript-eslint/parser": "^5.59.0",
23+
"eslint": "^7.25.0",
2224
"eslint-config-prettier": "^8.3.0",
2325
"eslint-plugin-filename-rules": "^1.2.0",
2426
"eslint-plugin-jsx-a11y": "^6.4.1",
2527
"eslint-plugin-mocha": "^8.0.0",
2628
"eslint-plugin-react": "^7.24.0",
2729
"eslint-plugin-react-hooks": "^4.2.0"
2830
},
29-
"devDependencies": {
30-
"prettier": "^2.7.1"
31-
},
3231
"scripts": {
32+
"prettier": "prettier-compass",
3333
"check": "npm run lint",
34-
"lint": "prettier --check .",
35-
"reformat": "prettier --write ."
34+
"lint": "npm run prettier -- --check .",
35+
"reformat": "npm run prettier -- --write ."
3636
},
3737
"repository": {
3838
"type": "git",

configs/eslint-plugin-compass/.prettierignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

configs/eslint-plugin-compass/.prettierrc.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

configs/eslint-plugin-compass/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"license": "SSPL",
2525
"main": "index.js",
2626
"scripts": {
27-
"eslint": "eslint",
28-
"prettier": "prettier",
27+
"eslint": "eslint-compass",
28+
"prettier": "prettier-compass",
2929
"lint": "npm run eslint . && npm run prettier -- --check .",
3030
"depcheck": "depcheck",
3131
"check": "npm run lint && npm run depcheck",
@@ -42,7 +42,6 @@
4242
"depcheck": "^1.4.1",
4343
"eslint": "^7.25.0",
4444
"mocha": "^10.2.0",
45-
"nyc": "^15.1.0",
46-
"prettier": "^2.7.1"
45+
"nyc": "^15.1.0"
4746
}
4847
}

configs/mocha-config-compass/.prettierrc.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)