From f7997bf3a57bde193a092f673538cb332ead8305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Quixada=CC=81?= <195494+lquixada@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:18:42 -0500 Subject: [PATCH 1/8] fix: github actions was checking out the wrong ref --- .github/workflows/checks.yml | 2 ++ .github/workflows/pr.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 6dc5a19f..dc213a93 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -13,6 +13,8 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v3 + with: + ref: ${{ github.sha }} - uses: actions/cache@v3 with: path: ~/.npm # this is cache where npm installs from before going out to the network diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 464d1729..d8c0e418 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -29,6 +29,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Cache node_modules id: cacheModules uses: actions/cache@v3 From 4bc910e1e9194e406122e883931fc74e14e06999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Quixada=CC=81?= <195494+lquixada@users.noreply.github.com> Date: Tue, 10 Dec 2024 22:17:56 -0500 Subject: [PATCH 2/8] chore: set up workflow inputs --- .github/workflows/branch.yml | 2 ++ .github/workflows/checks.yml | 17 +++++++++++++++-- .github/workflows/pr.yml | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index 67b2d0ae..e9109ea7 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -31,6 +31,8 @@ jobs: name: Check needs: [install] uses: ./.github/workflows/checks.yml + with: + ref: ${{ github.sha }} # The security job can't run on pull requests opened from forks because # Github doesn't pass down the SNYK_TOKEN environment variable. diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index dc213a93..f7405585 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,6 +1,13 @@ name: v4.x checks -on: [workflow_call] +on: + workflow_call: + inputs: + ref: + description: 'The commit the workflow should check out' + required: true + default: ${{ github.sha }} + type: string jobs: test-node: @@ -14,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: ${{ github.sha }} + ref: ${{ inputs.ref }} - uses: actions/cache@v3 with: path: ~/.npm # this is cache where npm installs from before going out to the network @@ -31,6 +38,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref }} - uses: actions/cache@v3 with: path: ~/.npm # this is cache where npm installs from before going out to the network @@ -47,6 +56,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref }} - uses: actions/cache@v3 with: path: ~/.npm # this is cache where npm installs from before going out to the network @@ -59,6 +70,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref }} - uses: actions/cache@v3 with: path: ~/.npm # this is cache where npm installs from before going out to the network diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d8c0e418..a3bd10f7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -45,3 +45,5 @@ jobs: name: Checks needs: [install] uses: ./.github/workflows/checks.yml + with: + ref: ${{ github.event.pull_request.head.sha }} From 67e778fe64741acfdf3de37c0354dd8fa429f167 Mon Sep 17 00:00:00 2001 From: Leonardo Quixada <195494+lquixada@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:11:12 -0500 Subject: [PATCH 3/8] chore: switched minifier from @rollup/plugin-terser to rollup-plugin-esbuild (#195) * fix: github actions was checking out the wrong ref * chore: switched minifier from @roll-up/plugin-terser to rollup-plugin-esbuild-minify * chore: chore: switched minifier from @roll-up/plugin-terser to rollup-plugin-esbuild --- package.json | 3 ++- rollup.config.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 30f06907..c88009b7 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,6 @@ "devDependencies": { "@commitlint/cli": "17.6.6", "@commitlint/config-conventional": "17.6.6", - "@rollup/plugin-terser": "0.4.3", "@types/chai": "4.3.5", "@types/mocha": "10.0.1", "@types/node": "18.15.13", @@ -92,6 +91,8 @@ "rimraf": "5.0.1", "rollup": "3.26.0", "rollup-plugin-copy": "3.4.0", + "rollup-plugin-esbuild": "6.1.1", + "rollup-plugin-esbuild-minify": "1.1.2", "semver": "7.5.3", "serve-index": "1.9.1", "standard": "17.1.0", diff --git a/rollup.config.js b/rollup.config.js index dfd00e5d..0958bd28 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,7 +1,7 @@ /* Rollup creates the browser version of the polyfill and ponyfill. */ import path from 'path' import copy from 'rollup-plugin-copy' -import terser from '@rollup/plugin-terser' +import { minify } from 'rollup-plugin-esbuild' const input = path.join(__dirname, 'node_modules', 'whatwg-fetch', 'fetch.js') @@ -128,7 +128,7 @@ export default [ `) }, plugins: [ - terser() + minify() ] } ] From 2a20dbff81c7ced378ab66d5144edd6bcec795d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Quixada=CC=81?= <195494+lquixada@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:15:59 -0500 Subject: [PATCH 4/8] chore: updated actions/checkout and actions/cache to v4 --- .github/workflows/branch.yml | 8 ++++---- .github/workflows/checks.yml | 16 ++++++++-------- .github/workflows/pr.yml | 4 ++-- .github/workflows/release.yml | 12 ++++++------ 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index e9109ea7..6b043ec8 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -10,10 +10,10 @@ jobs: name: Install runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache node_modules id: cacheModules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.npm # this is cache where npm installs from before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} @@ -41,8 +41,8 @@ jobs: needs: [install] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: path: ~/.npm # this is cache where npm installs from before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index f7405585..d258c411 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -19,10 +19,10 @@ jobs: node-version: [14.x, 16.x, 18.x, 20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ inputs.ref }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.npm # this is cache where npm installs from before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} @@ -37,10 +37,10 @@ jobs: name: Browser Test Specs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ inputs.ref }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.npm # this is cache where npm installs from before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} @@ -55,10 +55,10 @@ jobs: name: Code Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ inputs.ref }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.npm # this is cache where npm installs from before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} @@ -69,10 +69,10 @@ jobs: name: Types runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ inputs.ref }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.npm # this is cache where npm installs from before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a3bd10f7..5822a9ba 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -28,12 +28,12 @@ jobs: name: Install runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: Cache node_modules id: cacheModules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.npm # this is cache where npm installs from before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c064dba8..d3ae55d1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,10 +16,10 @@ jobs: name: Install runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache node_modules id: cacheModules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.npm # cache where "npm install" uses before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} @@ -45,8 +45,8 @@ jobs: needs: [install] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: path: ~/.npm # cache where "npm install" uses before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} @@ -60,13 +60,13 @@ jobs: runs-on: ubuntu-latest needs: [checks, security] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' # Setup .npmrc file to publish to npm registry-url: 'https://registry.npmjs.org' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.npm # this is cache where npm installs from before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} From 2ec3f7de734fb9995487f8f33327ff76231fed70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Quixada=CC=81?= <195494+lquixada@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:27:33 -0500 Subject: [PATCH 5/8] chore: updated action/setup-node to v4 and hmarr/debug-action to v3 --- .github/workflows/branch.yml | 2 +- .github/workflows/checks.yml | 4 ++-- .github/workflows/pr.yml | 2 +- .github/workflows/release.yml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index 6b043ec8..d1ff7881 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -25,7 +25,7 @@ jobs: name: Debug runs-on: ubuntu-latest steps: - - uses: hmarr/debug-action@v2 + - uses: hmarr/debug-action@v3 checks: name: Check diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d258c411..932d476a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -27,7 +27,7 @@ jobs: path: ~/.npm # this is cache where npm installs from before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm install --prefer-offline @@ -45,7 +45,7 @@ jobs: path: ~/.npm # this is cache where npm installs from before going out to the network key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm install --prefer-offline diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5822a9ba..d0a72612 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,7 +22,7 @@ jobs: name: Debug runs-on: ubuntu-latest steps: - - uses: hmarr/debug-action@v2 + - uses: hmarr/debug-action@v3 install: name: Install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d3ae55d1..5333a3a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: name: Debug runs-on: ubuntu-latest steps: - - uses: hmarr/debug-action@v2 + - uses: hmarr/debug-action@v3 checks: name: Check @@ -61,7 +61,7 @@ jobs: needs: [checks, security] steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' # Setup .npmrc file to publish to npm From 086f8c2a4331d43b2238919be24b4e9d117a6bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Quixada=CC=81?= <195494+lquixada@users.noreply.github.com> Date: Thu, 12 Dec 2024 06:11:26 -0500 Subject: [PATCH 6/8] chore: changed default node version to 20 --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 8351c193..209e3ef4 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14 +20 From 97fae09122aeb02f0158881e68de857811e8547d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Quixada=CC=81?= <195494+lquixada@users.noreply.github.com> Date: Thu, 12 Dec 2024 06:59:31 -0500 Subject: [PATCH 7/8] chore: extracted make target into own files --- Makefile | 119 +------------------------------------------- makefiles/checks.mk | 30 +++++++++++ makefiles/test.mk | 86 ++++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+), 117 deletions(-) create mode 100644 makefiles/checks.mk create mode 100644 makefiles/test.mk diff --git a/Makefile b/Makefile index c0ca39e5..425e9230 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +include makefiles/*.mk + .PHONY: all all: test lint typecheck @@ -40,120 +42,3 @@ test/fetch-api/api.spec.js: test/fetch-api/api.spec.ts @echo "" @echo "=> make $@" @npx tsc - - -## -# Checks - -.PHONY: commitlint -commitlint: node_modules - npx commitlint --from origin/main --to HEAD --verbose - -.PHONY: cov -cov: - npx nyc report --reporter=text-lcov > .reports/coverage.lcov && npx codecov - -.PHONY: lint -lint: - @echo "" - @echo "=> make $@" - @npx standard - -.PHONY: secure -secure: - @echo "" - @echo "=> make $@" - @npx snyk test - -.PHONY: typecheck -typecheck: - @echo "" - @echo "=> make $@" - @npx tsc --lib ES6 --noEmit index.d.ts ./test/fetch-api/api.spec.ts - - -## -# Test groups - -.PHONY: test -test: | test-browser test-node - -.PHONY: test-browser -test-browser: |\ - test-fetch-browser-native \ - test-fetch-browser-whatwg \ - test-fetch-browser-service-worker \ - test-module-web-cjs \ - test-module-web-esm \ - test-module-react-native - -.PHONY: test-node -test-node: |\ - test-fetch-node-native \ - test-fetch-node-fetch \ - test-module-node-cjs \ - test-module-node-esm - - -## -# Test units - -.PHONY: test-fetch-browser-native -test-fetch-browser-native: | dist test/fetch-api/api.spec.js - @echo "" - @echo "=> make $@" - @./test/fetch-api/browser/run.sh - -.PHONY: test-fetch-browser-whatwg -test-fetch-browser-whatwg: | dist test/fetch-api/api.spec.js - @echo "" - @echo "=> make $@" - @./test/fetch-api/whatwg/run.sh - -.PHONY: test-fetch-browser-service-worker -test-fetch-browser-service-worker: dist test/fetch-api/api.spec.js - @echo "" - @echo "=> make $@" - @./test/fetch-api/service-worker/run.sh - -.PHONY: test-fetch-node-native -test-fetch-node-native: | dist test/fetch-api/api.spec.js - @echo "" - @echo "=> make $@" - @./test/fetch-api/node/run.sh - -.PHONY: test-fetch-node-fetch -test-fetch-node-fetch: | dist test/fetch-api/api.spec.js - @echo "" - @echo "=> make $@" - @./test/fetch-api/node-fetch/run.sh - -.PHONY: test-module-web-cjs -test-module-web-cjs: | dist - @echo "" - @echo "=> make $@" - @./test/module-system/web.cjs/run.sh - -.PHONY: test-module-web-esm -test-module-web-esm: | dist - @echo "" - @echo "=> make $@" - @./test/module-system/web.esm/run.sh - -.PHONY: test-module-node-cjs -test-module-node-cjs: | dist - @echo "" - @echo "=> make $@" - @./test/module-system/node.cjs/run.sh - -.PHONY: test-module-node-esm -test-module-node-esm: | dist - @echo "" - @echo "=> make $@" - @./test/module-system/node.esm/run.sh - -.PHONY: test-module-react-native -test-module-react-native: | dist - @echo "" - @echo "=> make $@" - @./test/module-system/react-native/run.sh diff --git a/makefiles/checks.mk b/makefiles/checks.mk new file mode 100644 index 00000000..312b9dcc --- /dev/null +++ b/makefiles/checks.mk @@ -0,0 +1,30 @@ + +## +# Checks + +.PHONY: commitlint +commitlint: node_modules + npx commitlint --from origin/main --to HEAD --verbose + +.PHONY: cov +cov: + npx nyc report --reporter=text-lcov > .reports/coverage.lcov && npx codecov + +.PHONY: lint +lint: + @echo "" + @echo "=> make $@" + @npx standard + +.PHONY: secure +secure: + @echo "" + @echo "=> make $@" + @npx snyk test + +.PHONY: typecheck +typecheck: + @echo "" + @echo "=> make $@" + @npx tsc --lib ES6 --noEmit index.d.ts ./test/fetch-api/api.spec.ts + diff --git a/makefiles/test.mk b/makefiles/test.mk new file mode 100644 index 00000000..736ffc79 --- /dev/null +++ b/makefiles/test.mk @@ -0,0 +1,86 @@ + +## +# Test groups + +.PHONY: test +test: | test-browser test-node + +.PHONY: test-browser +test-browser: |\ + test-fetch-browser-native \ + test-fetch-browser-whatwg \ + test-fetch-browser-service-worker \ + test-module-web-cjs \ + test-module-web-esm \ + test-module-react-native + +.PHONY: test-node +test-node: |\ + test-fetch-node-native \ + test-fetch-node-fetch \ + test-module-node-cjs \ + test-module-node-esm + + +## +# Test units + +.PHONY: test-fetch-browser-native +test-fetch-browser-native: | dist test/fetch-api/api.spec.js + @echo "" + @echo "=> make $@" + @./test/fetch-api/browser/run.sh + +.PHONY: test-fetch-browser-whatwg +test-fetch-browser-whatwg: | dist test/fetch-api/api.spec.js + @echo "" + @echo "=> make $@" + @./test/fetch-api/whatwg/run.sh + +.PHONY: test-fetch-browser-service-worker +test-fetch-browser-service-worker: dist test/fetch-api/api.spec.js + @echo "" + @echo "=> make $@" + @./test/fetch-api/service-worker/run.sh + +.PHONY: test-fetch-node-native +test-fetch-node-native: | dist test/fetch-api/api.spec.js + @echo "" + @echo "=> make $@" + @./test/fetch-api/node/run.sh + +.PHONY: test-fetch-node-fetch +test-fetch-node-fetch: | dist test/fetch-api/api.spec.js + @echo "" + @echo "=> make $@" + @./test/fetch-api/node-fetch/run.sh + +.PHONY: test-module-web-cjs +test-module-web-cjs: | dist + @echo "" + @echo "=> make $@" + @./test/module-system/web.cjs/run.sh + +.PHONY: test-module-web-esm +test-module-web-esm: | dist + @echo "" + @echo "=> make $@" + @./test/module-system/web.esm/run.sh + +.PHONY: test-module-node-cjs +test-module-node-cjs: | dist + @echo "" + @echo "=> make $@" + @./test/module-system/node.cjs/run.sh + +.PHONY: test-module-node-esm +test-module-node-esm: | dist + @echo "" + @echo "=> make $@" + @./test/module-system/node.esm/run.sh + +.PHONY: test-module-react-native +test-module-react-native: | dist + @echo "" + @echo "=> make $@" + @./test/module-system/react-native/run.sh From 673bef86b28fb8a8a0b4578ee4dd3cd38908a61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Quixada=CC=81?= <195494+lquixada@users.noreply.github.com> Date: Thu, 12 Dec 2024 07:15:37 -0500 Subject: [PATCH 8/8] chore: replaced lsof command with is-port-in-use script --- bin/is-port-in-use | 17 +++++++++++++++++ test/setup/server.sh | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 bin/is-port-in-use diff --git a/bin/is-port-in-use b/bin/is-port-in-use new file mode 100755 index 00000000..5efbd743 --- /dev/null +++ b/bin/is-port-in-use @@ -0,0 +1,17 @@ +#!/usr/bin/env node + +const net = require('net') +const args = process.argv.slice(2) +const port = args[0] || 8000 +const server = net.createServer().listen(port) + +server.on('listening', () => { + server.close() + console.log('Port ' + port + ' is available.') + process.exit(0) +}) + +server.on('error', () => { + console.log('Port ' + port + ' is in use.') + process.exit(1) +}) diff --git a/test/setup/server.sh b/test/setup/server.sh index f9ecb62d..337cc5cb 100644 --- a/test/setup/server.sh +++ b/test/setup/server.sh @@ -11,7 +11,7 @@ kill_server() { } is_server_ready() { - lsof -i :8000 > /dev/null + ./bin/is-port-in-use > /dev/null } wait_server() {