Skip to content

Commit

Permalink
chore: fix-inferred-tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbas21 committed Jan 31, 2025
1 parent f9d154d commit a6d5d49
Show file tree
Hide file tree
Showing 35 changed files with 288 additions and 387 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
pnpm-lock.yaml
packages/*/docs
packages/*/coverage
*tsconfig.tsbuildinfo*

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- run: git branch --track main origin/main

- run: pnpm exec nx-cloud record -- nx format:check
- run: pnpm exec nx affected -t typecheck build lint test docs e2e-ci
- run: pnpm exec nx affected -t build typecheck lint test docs e2e-ci

- uses: codecov/codecov-action@v5
with:
Expand Down
5 changes: 1 addition & 4 deletions e2e/davinci-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
},
"devDependencies": {},
"scripts": {
"build": "nx exec -- vite build --watch false",
"serve": "vite dev",
"preview": "vite preview",
"lint": "nx exec -- eslint **/*.ts --fix"
"lint": "eslint **/*.ts --fix"
}
}
3 changes: 0 additions & 3 deletions e2e/davinci-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"useDefineForClassFields": true,
"lib": ["ESNext", "DOM"],
"strict": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"verbatimModuleSyntax": true,
"isolatedModules": true,
"esModuleInterop": true,
"noUnusedLocals": true,
Expand Down
1 change: 1 addition & 0 deletions e2e/mock-api-v2/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist
.eslintignore
coverage
html/*
*tsconfig.tsbuildinfo*
35 changes: 0 additions & 35 deletions e2e/mock-api-v2/build.js

This file was deleted.

29 changes: 18 additions & 11 deletions e2e/mock-api-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@
"version": "1.0.0",
"description": "",
"main": "./dist/index.js",
"type": "commonjs",
"scripts": {
"build": "tsc --project tsconfig.app.json",
"build:watch": "tsc --project tsconfig.app.json --watch",
"serve": "node dist/e2e/mock-api-v2/src/main.js",
"serve:dev": "nodemon dist/e2e/mock-api-v2/src/main.js",
"test": "vitest",
"test:watch": "vitest watch --coverage --coverage.reportsDirectory=../../coverage/mock-api-v2",
"lint": "nx exec -- eslint --fix --ignore-path .eslintignore \"**/*.ts\""
},
"type": "module",
"dependencies": {
"@effect/language-service": "^0.2.0",
"@effect/platform": "^0.58.27",
Expand All @@ -21,6 +12,22 @@
"effect-http": "^0.73.0",
"effect-http-node": "^0.16.1",
"@effect/schema": "^0.68.23",
"@effect/vitest": "^0.17.3"
"@effect/vitest": "^0.17.0"
},
"nx": {
"tags": ["scope:e2e"],
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "e2e/mock-api-v2/dist",
"main": "e2e/mock-api-v2/src/main.ts",
"tsConfig": "e2e/mock-api-v2/tsconfig.app.json",
"generatePackageJson": true,
"assets": []
}
}
}
}
}
3 changes: 2 additions & 1 deletion e2e/mock-api-v2/src/helpers/test/cookie.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { it, expect } from '@effect/vitest';
import { it } from '@effect/vitest';
import { expect } from 'vitest';
import {
getElementFromCookie,
incrementCookieHeader,
Expand Down
3 changes: 2 additions & 1 deletion e2e/mock-api-v2/src/helpers/test/match.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { it, expect } from '@effect/vitest';
import { it } from '@effect/vitest';
import { expect } from 'vitest';
import { PingRequestData, validator } from '../match.js';
import { Effect, Exit } from 'effect';
import { InvalidUsernamePassword, InvalidProtectNode } from '../../errors/index.js';
Expand Down
3 changes: 2 additions & 1 deletion e2e/mock-api-v2/src/services/tests/authorize.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { it, expect } from '@effect/vitest';
import { it } from '@effect/vitest';
import { expect } from 'vitest';
import { Effect, Layer } from 'effect';
import { Authorize, authorizeMock } from '../authorize.service.js';
import { mockRequest } from '../request.service.js';
Expand Down
3 changes: 2 additions & 1 deletion e2e/mock-api-v2/src/services/tests/cookie.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { it, expect } from '@effect/vitest';
import { it } from '@effect/vitest';
import { expect } from 'vitest';
import { CookieService, cookieServiceTest } from '../cookie.service.js';
import { Effect, Either } from 'effect';
import { Cookies } from '@effect/platform';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { it, expect } from '@effect/vitest';
import { it } from '@effect/vitest';
import { expect } from 'vitest';
import { CustomHtmlTemplate, mockCustomHtmlTemplate } from '../custom-html-template.service.js';
import { Effect, Exit, Layer } from 'effect';
import { mockRequest } from '../request.service.js';
Expand Down
3 changes: 2 additions & 1 deletion e2e/mock-api-v2/src/services/tests/request.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { it, expect } from '@effect/vitest';
import { it } from '@effect/vitest';
import { expect } from 'vitest';
import { Request, mockRequest } from '../request.service.js';
import { Effect } from 'effect';
import { CustomHtmlResponseBody } from '../custom-html-template.service.js';
Expand Down
3 changes: 2 additions & 1 deletion e2e/mock-api-v2/src/services/tests/userinfo.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, it } from '@effect/vitest';
import { it } from '@effect/vitest';
import { expect } from 'vitest';
import { UserInfo, userInfoMock } from '../userinfo.service.js';
import { userInfoResponse } from '../../responses/userinfo/userinfo.js';
import { Effect } from 'effect';
Expand Down
15 changes: 4 additions & 11 deletions e2e/mock-api-v2/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,13 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ES2020",
"types": [
"vitest/vitest",
"vitest/globals",
"vitest/importMeta",
"vite/client",
"node"
]
"module": "Node16",
"moduleResolution": "Node16",
"types": ["vitest/globals", "vitest/importMeta", "vite/client", "node"]
},
"include": [
"src/**/*.ts",
"vite.config.ts",
"vite.config.mts",
"vitest.config.ts",
"src/**/*.test.ts",
"src/**/*.spec.ts",
Expand Down
6 changes: 1 addition & 5 deletions e2e/mock-api-v2/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ export default defineConfig({

test: {
globals: true,
cache: {
dir: '../../node_modules/.vitest',
},
watch: !process.env['CI'],
watch: Boolean(process.env['CI']) === false,
environment: 'jsdom',
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],

reporters: ['default', 'json', 'html'],
coverage: {
enabled: Boolean(process.env['CI']),
Expand Down
25 changes: 14 additions & 11 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
},
"targetDefaults": {
"typecheck": {
"dependsOn": ["build", "^build"]
"outputs": ["{projectRoot}/out-tsc"],
"dependsOn": ["^typecheck"]
},
"docs": {
"dependsOn": ["build", "^build", "^docs"],
Expand All @@ -26,7 +27,7 @@
"e2e": {
"dependsOn": ["^e2e"],
"inputs": ["noMarkdown", "^noMarkdown"],
"outputs": ["{projectRoot}/./.playwright"],
"outputs": ["{projectRoot}/.playwright"],
"cache": true
},
"lint": {
Expand All @@ -37,13 +38,13 @@
"test": {
"inputs": ["noMarkdown", "^noMarkdown"],
"dependsOn": ["^test"],
"outputs": ["{projectRoot}/./coverage"],
"outputs": ["{projectRoot}/coverage"],
"cache": true
},
"build": {
"inputs": ["noMarkdown", "^noMarkdown"],
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/./dist"],
"outputs": ["{projectRoot}/dist"],
"cache": true
},
"e2e-ci--**/*": {
Expand Down Expand Up @@ -80,6 +81,9 @@
"cache": true
}
},
"sync": {
"applyChanges": true
},
"plugins": [
{
"plugin": "@nx/js/typescript",
Expand All @@ -91,21 +95,23 @@
"targetName": "build",
"configName": "tsconfig.lib.json"
}
}
},
"include": ["e2e/**/**/*", "packages/**/**/*"]
},
{
"plugin": "@nx/playwright/plugin",
"options": {
"ciTargetName": "e2e-ci",
"targetName": "e2e"
}
},
"include": ["e2e/**/**/*"]
},
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
},
"include": ["tools/create-package/**/*", "packages/**/**/*"]
"include": ["e2e/**/**/*", "packages/**/**/*"]
},
{
"plugin": "@nx/vite/plugin",
Expand All @@ -117,17 +123,14 @@
"serveStaticTargetName": "serve-static",
"typecheckTargetName": "typecheck"
},
"include": ["tools/create-package/**/*"]
"include": ["packages/**/**/*", "e2e/**/**/*"]
}
],
"parallel": 1,
"workspaceLayout": {
"appsDir": "",
"libsDir": ""
},
"sync": {
"applyChanges": true
},
"generators": {
"@nx/js:library": {
"publishable": true,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"@typescript-eslint/parser": "7.16.1",
"@typescript-eslint/typescript-estree": "5.59.5",
"@typescript-eslint/utils": "^8.13.0",
"@vitest/coverage-v8": "^3.0.4",
"@vitest/ui": "^3.0.4",
"@vitest/coverage-v8": "^2.0.5",
"@vitest/ui": "^2.0.5",
"conventional-changelog-conventionalcommits": "^7.0.2",
"cz-conventional-changelog": "^3.3.0",
"cz-git": "^1.6.1",
Expand Down Expand Up @@ -95,7 +95,7 @@
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-externalize-deps": "^0.8.0",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^3.0.4",
"vitest": "^2.0.5",
"vitest-canvas-mock": "^0.3.3"
},
"config": {
Expand Down
1 change: 1 addition & 0 deletions packages/davinci-client/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dist
docs
coverage
vite.config.*.timestamp*
*tsconfig.tsbuildinfo*
2 changes: 1 addition & 1 deletion packages/davinci-client/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": [
"error",
"warn",
{
"ignoredFiles": ["{projectRoot}/vite.config.{js,ts,mjs,mts}"]
}
Expand Down
10 changes: 3 additions & 7 deletions packages/davinci-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,13 @@
"@reduxjs/toolkit": "catalog:",
"immer": "catalog:"
},
"devDependencies": {
"vitest": "^2.0.5"
},
"exports": {
".": "./dist/src/index.js",
"./types": "./dist/src/types.d.ts"
},
"scripts": {
"build": "nx exec -- tsc --project ./tsconfig.lib.json",
"test": "nx exec -- vitest --typecheck",
"test:watch": "vitest --watch",
"test:coverage": "nx exec -- vitest --coverage",
"lint": "nx exec -- eslint **/*.ts --fix"
},
"nx": {
"tags": ["scope:package"],
"targets": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const obj = {
export const obj = {
interactionId: '18fa40b7-0eb8-4a5c-803c-d3f3f807ed46',
companyId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
connectionId: '8209285e0d2f3fc76bfd23fd10d45e6f',
Expand Down
3 changes: 2 additions & 1 deletion packages/davinci-client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true
},
"references": [
{
Expand Down
1 change: 1 addition & 0 deletions packages/davinci-client/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"vite.config.ts",
"src/**/*.spec.ts",
"src/**/*.test.ts",
"src/**/*.test-d.ts",
"src/lib/mock-data/*"
]
}
9 changes: 2 additions & 7 deletions packages/davinci-client/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@
"outDir": "../../dist/out-tsc",
"composite": true,
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"target": "ESNext",
"types": [
"vitest/vitest",
"vitest/globals",
"vitest/importMeta",
"vite/client",
"node"
]
"types": ["vitest/globals", "vitest/importMeta", "vite/client", "node"]
},
"include": [
"src/**/*.ts",
Expand Down
Loading

0 comments on commit a6d5d49

Please sign in to comment.