Skip to content
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

Upgrade nx #516

Merged
merged 12 commits into from
Feb 2, 2024
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: 2023 Friedrich-Alexander-Universitat Erlangen-Nurnberg
#
# SPDX-License-Identifier: AGPL-3.0-only

node_modules
8 changes: 4 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"root": true,
"extends": "@jvalue/eslint-config-jvalue",
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"plugins": ["@nx"],
"parserOptions": {
"project": ["./tsconfig.base.json"]
},
Expand All @@ -16,7 +16,7 @@
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -33,12 +33,12 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ jobs:
- name: Build
run: npx nx affected --target=build --configuration=prod --parallel=3

- name: Lint Nx specific workspace files
run: npx nx workspace-lint

- name: Lint
run: npx nx affected --target=lint --parallel=3 --maxWarnings=0

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ Thumbs.db
# Generated Docusaurus files
.docusaurus/
.cache-loader/

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

.prettierignore
.docusaurus/

/.nx/cache
2 changes: 1 addition & 1 deletion apps/docs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"ignorePatterns": ["!**/*", "**/.docusaurus/**", "**/theme/prism-jayvee.js"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/docs/dev/04-guides/06-jayvee-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Execution extensions are only required by the [interpreter](https://github.com/j
#### 1. Generate an execution libraries

```bash
npx nx g @nrwl/node:library --name="extensions/<extension-name>/exec"
npx nx g @nx/node:library --name="extensions/<extension-name>/exec"
```

#### 2. Create extension classes
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/generator/src/user-doc-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export class UserDocGenerator
{
constructor(private services: JayveeServices) {}

generateValueTypesDoc(valueTypes: {
[name: string]: PrimitiveValuetype;
}): string {
generateValueTypesDoc(
valueTypes: Record<string, PrimitiveValuetype>,
): string {
const builder = new UserDocMarkdownBuilder()
.docTitle('Built-in Valuetypes')
.generationComment()
Expand Down
13 changes: 7 additions & 6 deletions apps/docs/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
export default {
displayName: 'docs-generator',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
globals: {},
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': 'ts-jest',
'^.+\\.[tj]s$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
},
],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/apps/docs-generator',
Expand Down
21 changes: 8 additions & 13 deletions apps/docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
"dependsOn": ["generate"]
},
"build-generator": {
"executor": "@nrwl/webpack:webpack",
"executor": "@nx/webpack:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"target": "node",
"compiler": "tsc",
"outputPath": "dist/apps/docs/generator",
"main": "apps/docs/generator/src/main.ts",
"tsConfig": "apps/docs/tsconfig.json"
"tsConfig": "apps/docs/tsconfig.json",
"webpackConfig": "apps/docs/webpack.config.js"
},
"dependsOn": ["prepare-generator"]
},
Expand All @@ -45,27 +46,21 @@
"dependsOn": ["build-generator"]
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/docs/**/*.ts"]
}
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/docs/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/docs/jest.config.ts"
}
},
"version-snapshot": {
"executor": "nx:run-commands",
"dependsOn": ["generate"],
"options": {
"commands": [
"node tools/scripts/docs/create-new-version-snapshot.mjs"
],
"commands": ["node tools/scripts/docs/create-new-version-snapshot.mjs"],
"parallel": false
}
}
Expand Down
151 changes: 91 additions & 60 deletions apps/docs/src/data/features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,102 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/

import React from "react";
import React from 'react';

export type FeatureItem = {
title: string;
image: {
src: string;
height: number;
width: number;
}
description: JSX.Element;
};
export interface FeatureItem {
title: string;
image: {
src: string;
height: number;
width: number;
};
description: JSX.Element;
}

export const Features: FeatureItem[] = [
{
title: "Focused",
description: <p>Jayvee is a <b>DSL</b> (domain-specific language) <b>tailored for data engineering</b>.</p>,
image: {
src: '/img/features/focus.svg',
width: 100,
height: 100,
},
{
title: 'Focused',
description: (
<p>
Jayvee is a <b>DSL</b> (domain-specific language){' '}
<b>tailored for data engineering</b>.
</p>
),
image: {
src: '/img/features/focus.svg',
width: 100,
height: 100,
},
},
{
title: 'Text-based',
description: (
<p>
Jayvee's text-based syntax allows <b>reuse</b> of existing{' '}
<b>collaboration infrastructure</b> from open source software
development.
</p>
),
image: {
src: '/img/features/text.svg',
width: 100,
height: 100,
},
{
title: "Text-based",
description: <p>Jayvee's text-based syntax allows <b>reuse</b> of existing <b>collaboration infrastructure</b> from open source software development.</p>,
image: {
src: '/img/features/text.svg',
width: 100,
height: 100,
},
},
{
title: 'Open',
description: (
<p>
Jayvee is open for extension (<b>no vendor lock-in</b>) with a{' '}
<b>fast innovation in tools</b>.
</p>
),
image: {
src: '/img/features/open.svg',
width: 100,
height: 100,
},
{
title: "Open",
description: <p>Jayvee is open for extension (<b>no vendor lock-in</b>) with a <b>fast innovation in tools</b>.</p>,
image: {
src: '/img/features/open.svg',
width: 100,
height: 100,
},
},
{
title: 'Accessible',
description: (
<p>
Jayvee enables <b>collaboration with subject matter experts</b> that
might not be professional programmers.
</p>
),
image: {
src: '/img/features/accessible.svg',
width: 100,
height: 100,
},
{
title: "Accessible",
description: <p>Jayvee enables <b>collaboration with subject matter experts</b> that might not be professional programmers.</p>,
image: {
src: '/img/features/accessible.svg',
width: 100,
height: 100,
},
},
{
title: 'Maintainable',
description: (
<p>
Jayvee passes on hidden magic to make the{' '}
<b>code more self-explaining</b>.
</p>
),
image: {
src: '/img/features/maintainable.svg',
width: 100,
height: 100,
},
{
title: "Maintainable",
description: <p>Jayvee passes on hidden magic to make the <b>code more self-explaining</b>.</p>,
image: {
src: '/img/features/maintainable.svg',
width: 100,
height: 100,
},
},
{
title: 'Empirical Design',
description: (
<p>
The design of Jayvee is <b>validated with scientific methods</b> like
surveys and controlled experiments instead of relying on gut feeling.
</p>
),
image: {
src: '/img/features/research.svg',
width: 100,
height: 100,
},
{
title: "Empirical Design",
description: <p>The design of Jayvee is <b>validated with scientific methods</b> like surveys and controlled experiments instead of relying on gut feeling.</p>,
image: {
src: '/img/features/research.svg',
width: 100,
height: 100,
},
}
];
},
];
1 change: 0 additions & 1 deletion apps/docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import clsx from 'clsx';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import Heading from '@theme/Heading';
import HomepageFeatures from '@site/src/components/HomepageFeatures';

import styles from './index.module.css';
Expand Down
3 changes: 2 additions & 1 deletion apps/docs/src/theme/prism-include-languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ export default function prismIncludeLanguages(PrismObject) {
// avoid polluting global namespace.
// You can mutate PrismObject: registering plugins, deleting languages... As
// long as you don't re-assign it
// eslint-disable-next-line no-undef
globalThis.Prism = PrismObject;
additionalLanguages.forEach((lang) => {
// eslint-disable-next-line global-require, import/no-dynamic-require
require(`prismjs/components/prism-${lang}`);
});
// Add Jayvee language:
require('./prism-jayvee.js');
// eslint-disable-next-line no-undef
delete globalThis.Prism;
}
9 changes: 9 additions & 0 deletions apps/docs/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// SPDX-FileCopyrightText: 2023 Friedrich-Alexander-Universitat Erlangen-Nurnberg
//
// SPDX-License-Identifier: AGPL-3.0-only

const { composePlugins, withNx } = require('@nx/webpack');

module.exports = composePlugins(withNx(), (config) => {
return config;
});
13 changes: 7 additions & 6 deletions apps/interpreter/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
export default {
displayName: 'interpreter',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
globals: {},
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': 'ts-jest',
'^.+\\.[tj]s$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
},
],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/apps/interpreter',
Expand Down
Loading
Loading