Skip to content

Commit

Permalink
vx: ignore tests in ts config generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Jun 6, 2023
1 parent cb5c828 commit ee4f343
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [18.16.0]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
with:
package-manager: yarn
skip-step: install
test-script: yarn jest
test-script: yarn test
4 changes: 2 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [18.16.0]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Install
run: yarn install --immutable
- name: Test
run: yarn test -i
run: yarn test
- name: Lint
run: yarn lint
- name: Release
Expand Down
8 changes: 1 addition & 7 deletions packages/anyone/tsconfig.json

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

4 changes: 1 addition & 3 deletions packages/context/tsconfig.json

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

54 changes: 1 addition & 53 deletions packages/n4s/tsconfig.json

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

3 changes: 1 addition & 2 deletions packages/vast/tsconfig.json

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

34 changes: 1 addition & 33 deletions packages/vest-utils/tsconfig.json

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

81 changes: 1 addition & 80 deletions packages/vest/tsconfig.json

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

3 changes: 1 addition & 2 deletions packages/vestjs-runtime/tsconfig.json

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

12 changes: 8 additions & 4 deletions vx/config/jest/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function baseConfig(packageName) {
const allowResolve = packageJson.getVxAllowResolve(packageName);
return {
clearMocks: true,
preset: 'ts-jest/presets/js-with-ts',
maxWorkers: 1,
rootDir: vxPath.ROOT_PATH,
roots: ['<rootDir>'],
setupFiles: [
Expand All @@ -60,6 +60,7 @@ function baseConfig(packageName) {
[`.+\\.(ts|tsx)$`]: [
'ts-jest',
{
isolatedModules: true,
tsconfig: {
// This is needed to allow jest to transform js files
// That are originated in node_modules
Expand All @@ -68,9 +69,12 @@ function baseConfig(packageName) {
},
],
},
transformIgnorePatterns: [
`node_modules/(?!(${allowResolve.join('|')})/.*)`,
],
...(allowResolve.length > 0 && {
preset: 'ts-jest/presets/js-with-ts',
transformIgnorePatterns: [
`node_modules/(?!(${allowResolve.join('|')})/.*)`,
],
}),
};
}

Expand Down
2 changes: 1 addition & 1 deletion vx/util/pathsPerPackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const matches = glob.sync(vxPath.rel(vxPath.packageSrc('*', '**/*.ts')), {
absolute: false,
ignore: [
vxPath.rel(vxPath.packageSrc('*', '**/*/index.ts')),
vxPath.rel(vxPath.packageSrc('*', `**/${opts.dir.TESTS}/**/*`)),
`**/${opts.dir.TESTS}/**`,
],
});

Expand Down

2 comments on commit ee4f343

@vercel
Copy link

@vercel vercel bot commented on ee4f343 Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vest – ./website

vest-git-latest-ealush.vercel.app
vest-ealush.vercel.app
vestjs.dev
www.vestjs.dev
vest.vercel.app

@vercel
Copy link

@vercel vercel bot commented on ee4f343 Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vest-next – ./website

vest-website.vercel.app
vest-next.vercel.app
vest-next-git-latest-ealush.vercel.app
vest-next-ealush.vercel.app

Please sign in to comment.