Skip to content

Commit b9dcadc

Browse files
authored
TOOLS-4235 Replace prettier with oxfmt (#1020)
1 parent 7c728c8 commit b9dcadc

12 files changed

Lines changed: 444 additions & 57 deletions

File tree

.golangci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ linters:
5454
path: \.go$
5555
text: is deprecated
5656
- path: (.+)\.go$
57-
text: "composites: .+(bson.(Binary|Decimal128|E|Timestamp)|types.(Destination|Source)(Client|Database)) struct literal uses unkeyed fields"
57+
text:
58+
"composites:
59+
.+(bson.(Binary|Decimal128|E|Timestamp)|types.(Destination|Source)(Client|Database))
60+
struct literal uses unkeyed fields"
5861
- linters:
5962
- govet
6063
path: \.go$

.oxfmtrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"ignorePatterns": [],
3+
"printWidth": 100,
4+
"proseWrap": "always",
5+
"tabWidth": 2,
6+
"overrides": [
7+
{
8+
"files": ["*.js", "*.mjs"],
9+
"options": {
10+
"tabWidth": 4
11+
}
12+
}
13+
]
14+
}

RELEASE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ new release is available there. Download the package for your OS and confirm tha
221221
In order to make the latest release available via our Homebrew tap, submit a pull request to
222222
[mongodb/homebrew-brew](https://github.com/mongodb/homebrew-brew/blob/bb5b57095a892daeb2700f1a9440550f8e87505b/Formula/mongodb-database-tools.rb#L7-L13)
223223
for both `x86` and `arm64`. You can get the sha256 sum locally using
224-
`shasum -a 256 <tools zip file>`. Tag mongodb/devprod-correctness in a comment on the PR asking them to review this.
224+
`shasum -a 256 <tools zip file>`. Tag mongodb/devprod-correctness in a comment on the PR asking them
225+
to review this.
225226

226227
#### Update the changelog
227228

@@ -312,6 +313,5 @@ automatically to set the "Security Level" to None once the Fix Version is marked
312313

313314
#### Announce the release
314315

315-
Copy your entry from CHANGELOG.md and post it to
316-
[/r/mongodb](https://www.reddit.com/r/mongodb/). Also post it in the #mongo-tools
317-
slack channel to announce it internally.
316+
Copy your entry from CHANGELOG.md and post it to [/r/mongodb](https://www.reddit.com/r/mongodb/).
317+
Also post it in the #mongo-tools slack channel to announce it internally.

common.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,36 @@ variables:
2727
mongod_args: ""
2828
mongod_port: 33333
2929
ssl: &mongod_ssl_startup_args
30-
mongod_args: "--sslMode requireSSL --sslCAFile common/db/testdata/ca-ia.pem --sslPEMKeyFile common/db/testdata/test-server.pem"
31-
replsettest_ssl_config: "sslMode: \\\"requireSSL\\\",sslPEMKeyFile: \\\"common/db/testdata/test-server.pem\\\", sslCAFile: \\\"common/db/testdata/ca-ia.pem\\\", sslAllowInvalidHostnames: \\\"\\\""
30+
mongod_args:
31+
"--sslMode requireSSL --sslCAFile common/db/testdata/ca-ia.pem --sslPEMKeyFile
32+
common/db/testdata/test-server.pem"
33+
replsettest_ssl_config:
34+
"sslMode: \\\"requireSSL\\\",sslPEMKeyFile: \\\"common/db/testdata/test-server.pem\\\",
35+
sslCAFile: \\\"common/db/testdata/ca-ia.pem\\\", sslAllowInvalidHostnames: \\\"\\\""
3236
mongod_port: 33333
3337
tls: &mongod_tls_startup_args
34-
mongod_args_tls: "--tlsMode requireTLS --tlsCAFile common/db/testdata/ca-ia.pem --tlsCertificateKeyFile common/db/testdata/test-server.pem"
35-
replsettest_tls_config: "tlsMode: \\\"requireTLS\\\",tlsCertificateKeyFile: \\\"common/db/testdata/test-server.pem\\\", tlsCAFile: \\\"common/db/testdata/ca-ia.pem\\\", tlsAllowInvalidHostnames: \\\"\\\""
38+
mongod_args_tls:
39+
"--tlsMode requireTLS --tlsCAFile common/db/testdata/ca-ia.pem --tlsCertificateKeyFile
40+
common/db/testdata/test-server.pem"
41+
replsettest_tls_config:
42+
"tlsMode: \\\"requireTLS\\\",tlsCertificateKeyFile:
43+
\\\"common/db/testdata/test-server.pem\\\", tlsCAFile: \\\"common/db/testdata/ca-ia.pem\\\",
44+
tlsAllowInvalidHostnames: \\\"\\\""
3645
mongod_port: 33333
3746

3847
mongo_arguments:
3948
default: &mongo_default_startup_args
4049
mongo_args: &mongo_default_startup_args_string "--port 33333"
4150
mongod_port: 33333
4251
ssl: &mongo_ssl_startup_args
43-
mongo_args: "--port 33333 --ssl --sslCAFile common/db/testdata/ca-ia.pem --sslPEMKeyFile common/db/testdata/test-server.pem --sslAllowInvalidCertificates"
52+
mongo_args:
53+
"--port 33333 --ssl --sslCAFile common/db/testdata/ca-ia.pem --sslPEMKeyFile
54+
common/db/testdata/test-server.pem --sslAllowInvalidCertificates"
4455
mongod_port: 33333
4556
tls: &mongo_tls_startup_args
46-
mongo_args_tls: "--port 33333 --tls --tlsCAFile common/db/testdata/ca-ia.pem --tlsCertificateKeyFile common/db/testdata/test-server.pem --tlsAllowInvalidCertificates"
57+
mongo_args_tls:
58+
"--port 33333 --tls --tlsCAFile common/db/testdata/ca-ia.pem --tlsCertificateKeyFile
59+
common/db/testdata/test-server.pem --tlsAllowInvalidCertificates"
4760
mongod_port: 33333
4861

4962
# Used to determine load_libs_version for *-latest builds.
@@ -848,8 +861,7 @@ functions:
848861
params:
849862
shell: bash
850863
silent: true
851-
include_expansions_in_env:
852-
[AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
864+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
853865
script: |
854866
set -o errexit
855867
set -o pipefail

common/archive/spec.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ each document are defined here:
5757
- `tool_version` - the version of mongodump that created the archive.
5858

5959
- `collection-metadata`:
60+
6061
```
6162
{
6263
string db,
@@ -66,6 +67,7 @@ each document are defined here:
6667
string type
6768
}
6869
```
70+
6971
- `db` - database name.
7072
- `collection` - collection name.
7173
- `metadata` - the collection metadata (including options, index definitions, and collection type)
@@ -75,9 +77,11 @@ each document are defined here:
7577
- `size` - the total uncompressed size of the collection in bytes.
7678
- `type` - set to `"timeseries"` for timeseries collections, `"view"` for views, and `""`
7779
otherwise.
80+
7881
- `namespace-data`: One or more BSON documents from the collection. The collection's documents can
7982
be split across multiple segments.
8083
- `namespace-header`:
84+
8185
```
8286
{
8387
string db,
@@ -86,11 +90,14 @@ each document are defined here:
8690
int64 CRC
8791
}
8892
```
93+
8994
- `db` - database name.
9095
- `collection` - collection name.
9196
- `EOF` - always `false`.
9297
- `CRC` - always `0`.
98+
9399
- `eof-header`:
100+
94101
```
95102
{
96103
string db,
@@ -99,6 +106,7 @@ each document are defined here:
99106
int64 CRC
100107
}
101108
```
109+
102110
- `db` - database name.
103111
- `collection` - collection name.
104112
- `EOF` - always `true`.

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ go = "1.26.4"
2020
# Node and npm tools
2121
node = { version = "22.22.0", postinstall = "$MISE_TOOL_INSTALL_PATH/bin/npm install --loglevel verbose" }
2222
"npm:eslint" = "8.57.0"
23-
"npm:prettier" = "3.4.2"
2423
"npm:github-codeowners" = "0.2.1"
24+
"npm:oxfmt" = "0.52.0"
2525

2626
[settings]
2727
# This prevents us from upgrading to anything that was released less than 7 days ago. It gives us a

mongodump_passthrough/functions.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ variables:
9494
bucket: mciuploads
9595
local_file: src/mongosync/migration_verifier
9696

97-
f_make_migration_verifier_binary_executable:
98-
&f_make_migration_verifier_binary_executable
97+
f_make_migration_verifier_binary_executable: &f_make_migration_verifier_binary_executable
9998
command: shell.exec
10099
params:
101100
shell: bash

0 commit comments

Comments
 (0)