Skip to content

Commit

Permalink
Revert workspace rearrange
Browse files Browse the repository at this point in the history
  • Loading branch information
jpwilliams committed Dec 11, 2024
1 parent 82752ca commit 95266b3
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 51 deletions.
6 changes: 0 additions & 6 deletions .changeset/cyan-sheep-train.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/ten-rockets-float.md

This file was deleted.

8 changes: 1 addition & 7 deletions .github/actions/setup-and-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,7 @@ runs:
if: ${{ inputs.install-dependencies == 'true' }}
run: pnpm install
shell: bash
working-directory: ${{ inputs.working-directory }}

- name: Build test dependencies
if: ${{ inputs.install-dependencies == 'true' }}
run: pnpm run build
shell: bash
working-directory: ${{ inputs.working-directory }}/packages/test
working-directory: ${{ inputs.working-directory }}/packages/inngest

- name: Build
if: ${{ inputs.build == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-and-build
with:
install-dependencies: true
install-dependencies: false
build: false
- run: pnpm install
- run: pnpm test
Expand Down
2 changes: 1 addition & 1 deletion packages/inngest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@inngest/eslint-plugin-internal": "workspace:^",
"@inngest/test": "workspace:^",
"@inngest/test": "0.1.3-pr-777.0",
"@jest/globals": "^29.5.0",
"@shopify/jest-koa-mocks": "^5.1.1",
"@sveltejs/kit": "^1.27.3",
Expand Down
6 changes: 2 additions & 4 deletions packages/inngest/src/components/execution/als.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ describe("getAsyncCtx", () => {
}
);

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
const t = new InngestTestEngine({ function: fn as any });
const t = new InngestTestEngine({ function: fn });

const { result } = await t.execute();

Expand Down Expand Up @@ -141,8 +140,7 @@ describe("getAsyncCtx", () => {
}
);

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
const t = new InngestTestEngine({ function: fn as any });
const t = new InngestTestEngine({ function: fn });

const { result } = await t.execute();

Expand Down
2 changes: 1 addition & 1 deletion packages/middleware-validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"devDependencies": {
"@eslint/js": "^9.7.0",
"@inngest/test": "workspace:^",
"@inngest/test": "0.1.3-pr-777.0",
"@types/eslint__js": "^8.42.3",
"@types/jest": "^29.5.14",
"eslint": "^8.30.0",
Expand Down
30 changes: 15 additions & 15 deletions packages/middleware-validation/src/middleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "test" },
() => "success"
) as any,
),
events: [{ name: "test" }],
});

Expand Down Expand Up @@ -49,7 +49,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "test" },
() => "success"
) as any,
),
events: [{ name: "test" }],
});

Expand Down Expand Up @@ -77,7 +77,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "test" },
() => "success"
) as any,
),
events: [{ name: "test", data: { message: "hello" } }],
});

Expand Down Expand Up @@ -105,7 +105,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "test" },
() => "success"
) as any,
),
events: [{ name: "test", data: { message: 123 } }],
});

Expand Down Expand Up @@ -139,7 +139,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "b" },
() => "success"
) as any,
),
events: [{ name: "inngest/function.invoked", data: { b: true } }],
});

Expand All @@ -162,7 +162,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "test" },
() => "success"
) as any,
),
events: [{ name: "test" }],
});

Expand Down Expand Up @@ -190,7 +190,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "test" },
() => "success"
) as any,
),
events: [{ name: "test" }],
});

Expand Down Expand Up @@ -218,7 +218,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "test" },
() => "success"
) as any,
),
events: [{ name: "test", data: { message: "hello" } }],
});

Expand Down Expand Up @@ -246,7 +246,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "test" },
() => "success"
) as any,
),
events: [
{ name: "inngest/function.invoked", data: { message: "hello" } },
],
Expand Down Expand Up @@ -278,7 +278,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "test" },
() => "success"
) as any,
),
events: [{ name: "test", data: { message: "hello" } }],
});

Expand Down Expand Up @@ -308,7 +308,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "test" },
() => "success"
) as any,
),
events: [{ name: "test", data: { message: { content: "hello" } } }],
});

Expand Down Expand Up @@ -336,7 +336,7 @@ describe("validationMiddleware", () => {
{ id: "test" },
{ event: "test" },
() => "success"
) as any,
),
events: [
{ name: "test", data: { message: "hello" } },
{ name: "test", data: { message: 123 } },
Expand Down Expand Up @@ -377,7 +377,7 @@ describe("validationMiddleware", () => {
name: "test",
data: { message: 123 as unknown as string },
})
) as any,
),
events: [{ name: "test", data: { message: "hello" } }],
});

Expand Down Expand Up @@ -450,7 +450,7 @@ describe("validationMiddleware", () => {
);

const t = new InngestTestEngine({
function: fn as any,
function: fn,
events: [{ name: "test", data: { message: "hello" } }],
});

Expand Down Expand Up @@ -495,7 +495,7 @@ describe("validationMiddleware", () => {
);

const t = new InngestTestEngine({
function: fn as any,
function: fn,
events: [{ name: "test", data: { message: "hello" } }],
});

Expand Down
15 changes: 8 additions & 7 deletions packages/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,27 @@
"name": "@inngest/test",
"version": "0.1.2",
"description": "Tooling for testing Inngest functions.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"main": "./index.js",
"types": "./index.d.ts",
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"scripts": {
"test": "jest",
"build": "pnpm run build:clean && pnpm run build:tsc",
"build": "pnpm run build:clean && pnpm run build:tsc && pnpm run build:copy",
"build:clean": "rm -rf ./dist",
"build:tsc": "tsc --project tsconfig.build.json",
"build:copy": "cp package.json LICENSE.md README.md CHANGELOG.md dist",
"pack": "pnpm run build && yarn pack --verbose --frozen-lockfile --filename inngest-test.tgz --cwd dist",
"postversion": "pnpm run build",
"postversion": "pnpm run build && pnpm run build:copy",
"release": "DIST_DIR=dist node ../../scripts/release/publish.js && pnpm dlx jsr publish --allow-slow-types --allow-dirty",
"release:version": "node ../../scripts/release/jsrVersion.js"
},
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"require": "./index.js",
"import": "./index.js",
"types": "./index.d.ts"
}
},
"keywords": [
Expand Down
77 changes: 73 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 95266b3

Please sign in to comment.