diff --git a/.eslintrc.js b/.eslintrc.js index 440ce67..ae46fc1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,7 +2,7 @@ module.exports = { root: true, extends: ['airbnb-base', 'prettier'], rules: { - 'import/extensions': "always", // Better for native ES Module usage + 'import/extensions': 2, // Better for native ES Module usage 'no-console': 0, // We can remove this later 'no-underscore-dangle': 0, 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index c689570..9cc4552 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -7,26 +7,22 @@ on: jobs: publish-package: - runs-on: ubuntu-20.04 + runs-on: ubuntu:latest environment: publish steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v1 - with: - node-version: 16 - - - name: Install packages - uses: bahmutov/npm-install@v1 + - name: Install + uses: oven-sh/setup-bun@v2 + run: bun install - name: Run build - run: npm run build + run: bun run build - name: Run tests - run: npm run test + run: bun run test - name: Semantic release uses: cycjimmy/semantic-release-action@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9ce8b96..fbeef6e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,22 +6,18 @@ on: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 16 + uses: actions/checkout@v4 - name: Install packages - uses: bahmutov/npm-install@v1 + uses: oven-sh/setup-bun@v2 + run: bun install - name: Run build - run: npm run build + run: bun run build - name: Run tests - run: npm run test + run: bun run test diff --git a/.gitignore b/.gitignore index b1457a4..6b5bfe0 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ bower_components # Build directory build/ +dist/ # Dependency directories node_modules/ @@ -56,12 +57,16 @@ typings/ # Yarn lock file yarn.lock +bun.lock # dotenv environment variables file .env .idea +*.code-workspace +.vscode/ + # docker files created by the docker containers for testing tmp diff --git a/.travis.yml b/.travis.yml index a22c736..939a68a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,4 +19,5 @@ before_script: script: - npm install + - echo travis build definition - npm run build diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..2ee2b5e --- /dev/null +++ b/netlify.toml @@ -0,0 +1,16 @@ +[build] + command = "npm install && npm run build" + publish = "build" + +[build.environment] + NODE_VERSION = "20" + NPM_FLAGS = "--legacy-peer-deps" # Optional, useful if you run into dependency resolution issues + +[build.lifecycle] + # This will run before the build command + onPostBuild = "npm run test" + +[[redirects]] + from = "/*" + to = "/index.html" + status = 200 diff --git a/package-lock.json b/package-lock.json index 94bc949..b3ce971 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1726,9 +1726,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001441", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz", - "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==", + "version": "1.0.30001723", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001723.tgz", + "integrity": "sha512-1R/elMjtehrFejxwmexeXAtae5UO9iSyFn6G/I806CYC/BLyyBk1EPhrKBkWhy6wM6Xnm47dSJQec+tLJ39WHw==", "dev": true, "funding": [ { @@ -1738,8 +1738,13 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/chalk": { "version": "2.4.2", @@ -6934,9 +6939,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001441", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz", - "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==", + "version": "1.0.30001723", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001723.tgz", + "integrity": "sha512-1R/elMjtehrFejxwmexeXAtae5UO9iSyFn6G/I806CYC/BLyyBk1EPhrKBkWhy6wM6Xnm47dSJQec+tLJ39WHw==", "dev": true }, "chalk": { diff --git a/src/api.js b/src/api.js index e098fed..adbcfba 100644 --- a/src/api.js +++ b/src/api.js @@ -1125,7 +1125,7 @@ class DICOMwebClient { const url = `${this.wadoURL}/studies/${options.studyInstanceUID}/series/${options.seriesInstanceUID}/metadata`; const request = getRequestOptions(options.request) - return this._httpGetApplicationJson(url, {}, false, withCredentials); + return this._httpGetApplicationJson(url, {}, request); } /** @@ -1140,7 +1140,6 @@ class DICOMwebClient { */ searchForInstances(options = {}) { let url = this.qidoURL; - let withCredentials = false; if ('studyInstanceUID' in options) { url += `/studies/${options.studyInstanceUID}`; if ('seriesInstanceUID' in options) {