-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Twenty Shared & Fix profile image rendering #8841
Changes from 4 commits
ffb3033
5be9a09
cf24eb6
73bd7da
55d680d
ec21dbe
0401437
4f9b331
179c0d5
a4838a2
f2ae399
4db5915
8c39f13
58b33de
b7b034e
4c4e4ca
636bf90
63eeb50
e024ba3
b279402
d7faeda
7adc559
c62a039
99e7456
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -24,7 +24,8 @@ | |||||
"@/*": ["packages/twenty-front/src/modules/*"], | ||||||
"~/*": ["packages/twenty-front/src/*"], | ||||||
"twenty-ui": ["packages/twenty-ui/src/index.ts"], | ||||||
"@ui/*": ["packages/twenty-ui/src/*"] | ||||||
"@ui/*": ["packages/twenty-ui/src/*"], | ||||||
"twenty-shared": ["packages/twenty-shared/src"] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
} | ||||||
}, | ||||||
"files": [], | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,15 @@ | ||||||
module.exports = { | ||||||
extends: ['../../.eslintrc.cjs', '../../.eslintrc.react.cjs'], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We will not use react in this package; |
||||||
ignorePatterns: ['!**/*'], | ||||||
overrides: [ | ||||||
{ | ||||||
files: ['*.ts', '*.tsx'], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We will not have |
||||||
parserOptions: { | ||||||
project: ['packages/twenty-shared/tsconfig.{json,*.json}'], | ||||||
}, | ||||||
rules: { | ||||||
'@nx/dependency-checks': 'error', | ||||||
}, | ||||||
}, | ||||||
], | ||||||
}; |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,37 @@ | ||||||||||||||||||||||
import { JestConfigWithTsJest, pathsToModuleNameMapper } from 'ts-jest'; | ||||||||||||||||||||||
|
||||||||||||||||||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||||||||||||||||||||||
const tsConfig = require('./tsconfig.json'); | ||||||||||||||||||||||
process.env.TZ = 'GMT'; | ||||||||||||||||||||||
|
||||||||||||||||||||||
const jestConfig: JestConfigWithTsJest = { | ||||||||||||||||||||||
silent: true, | ||||||||||||||||||||||
displayName: 'twenty-shared', | ||||||||||||||||||||||
preset: '../../jest.preset.js', | ||||||||||||||||||||||
setupFilesAfterEnv: ['./setupTests.ts'], | ||||||||||||||||||||||
testEnvironment: 'node', | ||||||||||||||||||||||
transformIgnorePatterns: ['../../node_modules/'], | ||||||||||||||||||||||
transform: { | ||||||||||||||||||||||
'^.+\\.(ts|js)$': '@swc/jest', | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
moduleNameMapper: { | ||||||||||||||||||||||
...pathsToModuleNameMapper(tsConfig.compilerOptions.paths, { prefix: '<rootDir>/' }), | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
moduleFileExtensions: ['ts', 'js'], | ||||||||||||||||||||||
extensionsToTreatAsEsm: ['.ts'], | ||||||||||||||||||||||
coverageThreshold: { | ||||||||||||||||||||||
global: { | ||||||||||||||||||||||
statements: 60, | ||||||||||||||||||||||
lines: 60, | ||||||||||||||||||||||
functions: 50, | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Since this package will be shared and should contain only easy-to-test functions we can have a high level of coverage. |
||||||||||||||||||||||
}, | ||||||||||||||||||||||
collectCoverageFrom: ['<rootDir>/src/**/*.ts'], | ||||||||||||||||||||||
coveragePathIgnorePatterns: [ | ||||||||||||||||||||||
'types/*', | ||||||||||||||||||||||
'constants/*', | ||||||||||||||||||||||
], | ||||||||||||||||||||||
coverageDirectory: './coverage', | ||||||||||||||||||||||
}; | ||||||||||||||||||||||
|
||||||||||||||||||||||
export default jestConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.