Skip to content

Commit

Permalink
Update Package JSON (#3172)
Browse files Browse the repository at this point in the history
Updated dependencies.
Simplified nx configuration, jest configuration, and typescript configurations.
  • Loading branch information
jameskerr authored Feb 25, 2025
1 parent 8713bba commit fefada6
Show file tree
Hide file tree
Showing 135 changed files with 733 additions and 7,153 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

51 changes: 0 additions & 51 deletions .eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ zdeps
run
.vscode
.DS_Store
.eslintcache
.yalc
yalc.lock
.pnp.*
Expand Down
18 changes: 0 additions & 18 deletions apps/insiders/.eslintrc.json

This file was deleted.

9 changes: 0 additions & 9 deletions apps/insiders/jest.config.ts

This file was deleted.

9 changes: 6 additions & 3 deletions apps/insiders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
"version": "0.0.1",
"type": "commonjs",
"scripts": {
"inject": "ts-node src/inject"
"inject": "ts-node src/inject",
"build": "tsc"
},
"devDependencies": {
"fs-extra": "^10.1.0",
"semver": "^7.3.7"
"fs-extra": "^11.3.0",
"semver": "^7.3.7",
"ts-node": "10.9.1",
"typescript": "5.1.5"
}
}
40 changes: 0 additions & 40 deletions apps/insiders/project.json

This file was deleted.

23 changes: 4 additions & 19 deletions apps/insiders/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"target": "ES2020",
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"skipLibCheck": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
"outDir": "../../dist"
}
}
10 changes: 0 additions & 10 deletions apps/insiders/tsconfig.lib.json

This file was deleted.

14 changes: 0 additions & 14 deletions apps/insiders/tsconfig.spec.json

This file was deleted.

6 changes: 0 additions & 6 deletions apps/zui/.eslintignore

This file was deleted.

73 changes: 0 additions & 73 deletions apps/zui/.eslintrc.yml

This file was deleted.

1 change: 0 additions & 1 deletion apps/zui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ zdeps
run
.vscode
.DS_Store
.eslintcache
.yalc
yalc.lock
.pnp.*
Expand Down
17 changes: 0 additions & 17 deletions apps/zui/.swcrc

This file was deleted.

4 changes: 1 addition & 3 deletions apps/zui/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Zui is a TypeScript, React, Electron app.

- [Electron](https://www.electronjs.org/docs/latest) - it's helpful to understand the [main vs renderer processes](https://www.electronjs.org/docs/latest/tutorial/quick-start#main-and-renderer-processes)
- [TypeScript](https://www.typescriptlang.org/)
- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/docs/en/index.html)
- [React](https://reactjs.org/docs/getting-started.html)
- [Styled Components](https://styled-components.com/)
Expand Down Expand Up @@ -148,11 +147,10 @@ The [Zed service](https://zed.brimdata.io/docs/commands/zed#serve) is the daemon

## Pull Requests

Our CI server checks for code format diffs, type errors, eslint errors, unit test failures, and integration test failures. You can check all these things locally before pushing your branch.
Our CI server checks for code format diffs, type errors, unit test failures, and integration test failures. You can check all these things locally before pushing your branch.

```bash
yarn format # Prettier format
yarn lint # Check eslint
yarn tsc # Check the types
yarn test # Unit tests with jest
yarn test:api # API tests
Expand Down
35 changes: 11 additions & 24 deletions apps/zui/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,23 @@
const {pathsToModuleNameMapper} = require("ts-jest")
// In the following statement, replace `./tsconfig` with the path to your `tsconfig` file
// which contains the path mapping (ie the `compilerOptions.paths` option):
const config = require("../../tsconfig.base")

const moduleNameMapper = pathsToModuleNameMapper(config.compilerOptions.paths, {
prefix: "<rootDir>/../../",
})

const esModules = [
// https://github.com/gravitational/teleport/issues/33810
const needsToBeTransformed = [
"bullet",
"@reduxjs/toolkit",
"immer",
"redux",
"lodash-es",
"when-clause",
].join("|")
// https://github.com/gravitational/teleport/issues/33810

module.exports = {
transform: {
"^.+\\.(t|j)sx?$": ["@swc/jest"],
".+\\.(css|styl|less|sass|scss)$": "jest-css-modules-transform",
},
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
setupFiles: ["./src/test/unit/setup/before-env.ts"],
export default {
transform: {"^.+\\.(t|j)sx?$": "@swc/jest"},
transformIgnorePatterns: [`/node_modules/(?!${needsToBeTransformed})`],
setupFilesAfterEnv: ["./src/test/unit/setup/after-env.ts"],
testEnvironmentOptions: {
testURL: "http://localhost:4567/?name=search&id=test-1",
},
globalSetup: "./src/test/unit/setup/global.ts",
modulePaths: ["<rootDir>"],
roots: ["./src"],
maxWorkers: 4,
moduleNameMapper,
moduleNameMapper: {
"^src/(.*)$": "<rootDir>/src/$1",
"@brimdata/sample-data": "<rootDir>../../packages/sample-data/index.js",
"@brimdata/zed-js": "<rootDir>../../packages/zed-js/src/index.ts",
"@brimdata/zed-node": "<rootDir>../../packages/zed-node/src/index.ts",
},
}
4 changes: 0 additions & 4 deletions apps/zui/lint-staged.config.js

This file was deleted.

1 change: 1 addition & 0 deletions apps/zui/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
Loading

0 comments on commit fefada6

Please sign in to comment.