Skip to content

Commit

Permalink
Build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Aug 25, 2024
1 parent 5241006 commit 5185343
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 6,489 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

- name: Test - Start Compose
run: docker compose up -d
working-directory: tests
working-directory: tests/docker

- name: Test - RUN
uses: kohlerdominik/[email protected]
Expand All @@ -39,4 +39,4 @@ jobs:
- name: Test - Cleanup
if: always()
run: docker compose down
working-directory: tests
working-directory: tests/docker
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('jest').Config} */
const config = {
globalSetup: "./tests/globalSetup.ts",
globalTeardown: "./tests/globalTeardown.ts",
globalSetup: "./tests/_setup",
globalTeardown: "./tests/_teardown",
testTimeout: 5000,
};

Expand Down
6,460 changes: 0 additions & 6,460 deletions package-lock.json

This file was deleted.

9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@
"prepack": "cp -rv dist/. .",
"test": "jest tests"
},
"dependencies": {
"url-join": "4.0.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@babel/preset-typescript": "^7.24.7",
"@types/jest": "^29.5.12",
"@types/node": "17.0.33",
"@types/node": "22.5.0",
"cross-env": "^7.0.3",
"jest": "^29.7.0",
"prettier": "2.7.1",
"typescript": "4.6.4"
"prettier": "3.3.3",
"typescript": "5.5.4"
}
}
6 changes: 1 addition & 5 deletions src/wrapper/SquidexClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as environments from "../environments";
import urlJoin from "url-join";
import {
AppsApi,
AppsApiInterface,
Expand Down Expand Up @@ -322,10 +321,7 @@ export class SquidexClients {
}

const response = await this.configuration.fetchApi!(
urlJoin(
this.clientOptions.environment ?? environments.SquidexEnvironment.Default,
"/identity-server/connect/token"
),
`${this.configuration.basePath}/identity-server/connect/token`,
{
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Expand Down
5 changes: 5 additions & 0 deletions tests/_setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const { setup } = require('./globalSetup')

module.exports = async () => {
await setup();
};
5 changes: 5 additions & 0 deletions tests/_teardown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const { teardown } = require('./globalTeardown')

module.exports = async () => {
await teardown();
};
File renamed without changes.
4 changes: 1 addition & 3 deletions tests/globalSetup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SquidexBadRequestError, SquidexError } from "../src";
import { getEnvironment, getClient, delay } from "./_utils";

async function setup() {
export async function setup() {
console.log("SETUP");

const { client } = getClient();
Expand Down Expand Up @@ -57,8 +57,6 @@ async function setup() {
}
}

export default setup;

function getTime() {
return new Date().getTime();
}
4 changes: 1 addition & 3 deletions tests/globalTeardown.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
function teardown() {
export function teardown() {
console.log("TEARDOWN");
}

export default teardown;
17 changes: 9 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"compilerOptions": {
"extendedDiagnostics": true,
"strict": true,
"target": "ES6",
"baseUrl": "src",
"declaration": true,
"esModuleInterop": true,
"extendedDiagnostics": false,
"module": "CommonJS",
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"declaration": true,
"noUnusedParameters": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"outDir": "dist",
"rootDir": "src",
"baseUrl": "src"
"skipLibCheck": true,
"strict": true,
"target": "ES6",
},
"include": [
"src"
Expand Down

0 comments on commit 5185343

Please sign in to comment.