Skip to content

Commit

Permalink
Upgrade nx to v17, fix query builder list selection
Browse files Browse the repository at this point in the history
  • Loading branch information
paustint committed Nov 18, 2023
1 parent e80ef00 commit 61f5266
Show file tree
Hide file tree
Showing 42 changed files with 3,404 additions and 2,052 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ package-lock.json
**/test-results
**/playwright-report
**/playwright/.cache

.nx/cache
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
/dist
/coverage
.docusaurus/

/.nx/cache
5 changes: 2 additions & 3 deletions apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,15 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": ["apps/api/**/*.ts", "apps/api/**/*.spec.ts", "apps/api/**/*.d.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "apps/api/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/api/jest.config.ts"
},
"outputs": ["{workspaceRoot}/coverage/apps/api"]
}
Expand Down
5 changes: 2 additions & 3 deletions apps/cron-tasks/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/cron-tasks/**/*.ts"]
Expand All @@ -61,8 +61,7 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/apps/cron-tasks"],
"options": {
"jestConfig": "apps/cron-tasks/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/cron-tasks/jest.config.ts"
}
}
},
Expand Down
5 changes: 2 additions & 3 deletions apps/download-zip-sw/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"defaultConfiguration": "development"
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/download-zip-sw/**/*.ts"]
Expand All @@ -73,8 +73,7 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/apps/download-zip-sw"],
"options": {
"jestConfig": "apps/download-zip-sw/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/download-zip-sw/jest.config.ts"
}
}
},
Expand Down
5 changes: 2 additions & 3 deletions apps/electron/jetstream/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/electron/jetstream/**/*.ts"]
Expand All @@ -66,8 +66,7 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/apps/electron/jetstream"],
"options": {
"jestConfig": "apps/electron/jetstream/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/electron/jetstream/jest.config.ts"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion apps/electron/preferences/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/electron/preferences/**/*.{ts,tsx,js,jsx}"]
Expand Down
5 changes: 2 additions & 3 deletions apps/electron/worker/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/electron/worker/**/*.ts"]
Expand All @@ -60,8 +60,7 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/apps/electron/worker"],
"options": {
"jestConfig": "apps/electron/worker/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/electron/worker/jest.config.ts"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions apps/jetstream-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"e2e-ci": {
"executor": "nx:run-commands",
"outputs": ["apps/jetstream-e2e/playwright-report"],
"outputs": ["{projectRoot}/playwright-report"],
"options": {
"command": "yarn start-server-and-test --expect 200 'yarn start:e2e' http://localhost:3333 'yarn playwright:test'"
},
Expand All @@ -42,7 +42,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/jetstream-e2e/**/*.{ts,tsx,js,jsx}"]
Expand Down
5 changes: 2 additions & 3 deletions apps/jetstream-worker/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/jetstream-worker/**/*.ts"]
Expand All @@ -48,8 +48,7 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/apps/jetstream-worker"],
"options": {
"jestConfig": "apps/jetstream-worker/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/jetstream-worker/jest.config.ts"
}
}
},
Expand Down
5 changes: 2 additions & 3 deletions apps/jetstream/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
"defaultConfiguration": "development"
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": [
"apps/jetstream/**/*.js",
Expand All @@ -157,8 +157,7 @@
"test": {
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "apps/jetstream/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/jetstream/jest.config.ts"
},
"outputs": ["{workspaceRoot}/coverage/apps/jetstream"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import addDays from 'date-fns/addDays';
import isAfter from 'date-fns/isAfter';
import isSameDay from 'date-fns/isSameDay';
import { Fragment, FunctionComponent, useEffect, useState } from 'react';
import { CSSTransition } from 'react-transition-group';
import { useRecoilState } from 'recoil';
import * as fromDeployMetadataState from '../deploy-metadata.state';
import { AllUser } from '../deploy-metadata.types';
Expand Down Expand Up @@ -104,43 +103,41 @@ export const DateSelection: FunctionComponent<DateSelectionProps | DateSelection
onChange={(value: AllUser) => setDateRangeSelection(value)}
/>
</div>
<CSSTransition in={dateRangeSelection === 'user'} timeout={300} classNames="animation-item">
<div
key="modified-since"
css={css`
min-height: 80px;
`}
>
{dateRangeSelection === 'user' && (
<Fragment>
<DatePicker
id="modified-start"
label="Modified After"
className="slds-m-top_small slds-form-element_stacked slds-is-editing"
maxAvailableDate={maxDate}
errorMessage="Choose a valid date in the past"
labelHelp="All metadata items that were created or modified on or after this date will be shown"
hasError={false}
errorMessageId={`modified-start-error`}
initialSelectedDate={dateRangeStart || undefined}
onChange={setDateRangeStart}
/>
<DatePicker
id="modified-end"
label="Modified Before"
className="slds-m-top_small slds-form-element_stacked slds-is-editing"
maxAvailableDate={maxDate}
errorMessage="Choose a valid date in the past"
labelHelp="All metadata items that were created or modified on or before this date will be shown"
hasError={false}
errorMessageId={`modified-end-error`}
initialSelectedDate={dateRangeEnd || undefined}
onChange={setDateRangeEnd}
/>
</Fragment>
)}
</div>
</CSSTransition>
<div
key="modified-since"
css={css`
min-height: 80px;
`}
>
{dateRangeSelection === 'user' && (
<Fragment>
<DatePicker
id="modified-start"
label="Modified After"
className="slds-m-top_small slds-form-element_stacked slds-is-editing"
maxAvailableDate={maxDate}
errorMessage="Choose a valid date in the past"
labelHelp="All metadata items that were created or modified on or after this date will be shown"
hasError={false}
errorMessageId={`modified-start-error`}
initialSelectedDate={dateRangeStart || undefined}
onChange={setDateRangeStart}
/>
<DatePicker
id="modified-end"
label="Modified Before"
className="slds-m-top_small slds-form-element_stacked slds-is-editing"
maxAvailableDate={maxDate}
errorMessage="Choose a valid date in the past"
labelHelp="All metadata items that were created or modified on or before this date will be shown"
hasError={false}
errorMessageId={`modified-end-error`}
initialSelectedDate={dateRangeEnd || undefined}
onChange={setDateRangeEnd}
/>
</Fragment>
)}
</div>
</Fragment>
);
};
Expand Down
10 changes: 3 additions & 7 deletions apps/jetstream/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import react from '@vitejs/plugin-react';
import dns from 'dns';
import { PluginOption, defineConfig } from 'vite';
import viteTsConfigPaths from 'vite-tsconfig-paths';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';

dns.setDefaultResultOrder('verbatim');
const BASE_HREF = '/app';
Expand Down Expand Up @@ -52,17 +52,13 @@ export default defineConfig({
plugins: ['@emotion/babel-plugin'],
},
}),
viteTsConfigPaths({
root: '../../',
}),
nxViteTsPaths(),
baseHrefPlugin(),
],

worker: {
plugins: [
viteTsConfigPaths({
root: '../../',
}),
nxViteTsPaths(),
],
},
});
13 changes: 4 additions & 9 deletions apps/landing/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
"outputPath": "apps/landing"
}
},
"outputs": [
"{options.outputPath}"
],
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production"
},
"serve": {
Expand Down Expand Up @@ -47,7 +45,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": [
"apps/landing/**/*.spec.ts",
Expand All @@ -61,12 +59,9 @@
"test": {
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "apps/landing/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/landing/jest.config.ts"
},
"outputs": [
"{workspaceRoot}/coverage/apps/landing"
]
"outputs": ["{workspaceRoot}/coverage/apps/landing"]
}
},
"tags": []
Expand Down
2 changes: 1 addition & 1 deletion libs/api-config/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "library",
"targets": {
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/api-config/**/*.ts"]
Expand Down
5 changes: 2 additions & 3 deletions libs/api-interfaces/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"generators": {},
"targets": {
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": [
"libs/api-interfaces/**/*.ts",
Expand All @@ -21,8 +21,7 @@
"test": {
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "libs/api-interfaces/jest.config.ts",
"passWithNoTests": true
"jestConfig": "libs/api-interfaces/jest.config.ts"
},
"outputs": ["{workspaceRoot}/coverage/libs/api-interfaces"]
}
Expand Down
5 changes: 2 additions & 3 deletions libs/connected/connected-ui/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "library",
"targets": {
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": ["libs/connected/connected-ui/**/*.{ts,tsx,js,jsx}"]
}
Expand All @@ -14,8 +14,7 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/libs/connected/connected-ui"],
"options": {
"jestConfig": "libs/connected/connected-ui/jest.config.ts",
"passWithNoTests": true
"jestConfig": "libs/connected/connected-ui/jest.config.ts"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion libs/connected/connected-ui/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"outDir": "../../../dist/out-tsc",
"types": ["node"]
},
"files": ["../../../node_modules/@nx/react/typings/cssmodule.d.ts", "../../../node_modules/@nx/react/typings/image.d.ts"],
"files": ["../../../node_modules/@nx/react/typings/image.d.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts", "**/*.spec.tsx", "**/*.test.tsx", "jest.config.ts"],
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
}
2 changes: 1 addition & 1 deletion libs/icon-factory/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"generators": {},
"targets": {
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": [
"libs/icon-factory/**/*.js",
Expand Down
Loading

0 comments on commit 61f5266

Please sign in to comment.