Skip to content

Commit aa11bff

Browse files
authored
chore: add script to import test connections (#2612)
* chore: add script to import test connections * move scripts to package + fix eslint * use uuidv5 and prompt * regen package-lock
1 parent 1b22bad commit aa11bff

24 files changed

+785
-435
lines changed

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"packages": ["packages/*", "configs/*"],
2+
"packages": ["packages/*", "configs/*", "scripts"],
33
"version": "independent"
44
}

package-lock.json

Lines changed: 109 additions & 181 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,8 @@
5353
"devDependencies": {
5454
"@testing-library/dom": "^8.11.1",
5555
"@webpack-cli/serve": "^0.2.0",
56-
"chalk": "^4.1.1",
57-
"find-up": "^5.0.0",
5856
"lerna": "^4.0.0",
59-
"minimist": "^1.2.5",
6057
"npm-cli-adduser": "^1.1.4",
61-
"ora": "^5.4.0",
62-
"pacote": "^11.3.5",
63-
"pkg-up": "^3.1.0",
64-
"prompts": "^2.4.1",
65-
"ps-list": "^7.2.0",
66-
"semver": "^7.3.5",
6758
"wait-on": "^5.3.0"
6859
},
6960
"engines": {
@@ -76,6 +67,7 @@
7667
},
7768
"workspaces": [
7869
"packages/*",
79-
"configs/*"
70+
"configs/*",
71+
"scripts"
8072
]
8173
}

scripts/.depcheckrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignores:
2+
- "@mongodb-js/prettier-config-compass"

scripts/.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.nyc-output
2+
dist

scripts/.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@mongodb-js/eslint-config-compass'],
4+
};

scripts/.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.nyc-output
2+
dist

scripts/.prettierrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@mongodb-js/prettier-config-compass"

scripts/bump-private-dependencies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function main() {
5252
for (const depType of [
5353
'dependencies',
5454
'devDependencies',
55-
'peerDependencies'
55+
'peerDependencies',
5656
]) {
5757
if (!packageJson[depType]) {
5858
continue;

scripts/changed.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function runCommandForPackages(command, packages) {
1919
{
2020
cwd: process.cwd(),
2121
stdio: 'inherit',
22-
timeout: 1000 * 60 * 20
22+
timeout: 1000 * 60 * 20,
2323
}
2424
);
2525

@@ -46,15 +46,15 @@ async function runCommandForPackages(command, packages) {
4646
message: `Running ${command} for the package ${pkg.name} failed`,
4747
choices: [
4848
{ title: 'Re-run', value: 'rerun' },
49-
{ title: 'Skip', value: 'skip' }
49+
{ title: 'Skip', value: 'skip' },
5050
],
51-
initial: 0
52-
}
51+
initial: 0,
52+
},
5353
],
5454
{
5555
onCancel() {
5656
canceled = true;
57-
}
57+
},
5858
}
5959
);
6060

@@ -80,6 +80,7 @@ async function runCommandForPackages(command, packages) {
8080
async function runUntilDone(command, packages) {
8181
packages = [...packages];
8282

83+
// eslint-disable-next-line no-constant-condition
8384
while (true) {
8485
const { passed, failed } = await runCommandForPackages(command, packages);
8586

@@ -107,7 +108,7 @@ async function runUntilDone(command, packages) {
107108
type: 'confirm',
108109
name: 'shouldRerun',
109110
message: 'Do you want to rerun failed scripts?',
110-
initial: true
111+
initial: true,
111112
});
112113

113114
if (shouldRerun === false) {
@@ -161,7 +162,7 @@ async function main() {
161162
'run',
162163
'--stream',
163164
command,
164-
...changedPackages.map((pkg) => ['--scope', pkg.name]).flat()
165+
...changedPackages.map((pkg) => ['--scope', pkg.name]).flat(),
165166
],
166167
{ cwd: process.cwd(), stdio: 'inherit' }
167168
);

0 commit comments

Comments
 (0)