From df8dde569198fc1508a14f9df80c4eed2134dd89 Mon Sep 17 00:00:00 2001 From: Ivan S Glazunov Date: Tue, 26 Nov 2024 05:29:15 +0400 Subject: [PATCH] v7.0.0-alpha.4: TypeScript and Build System Improvements - Updated version to 7.0.0-alpha.4 - Changed TypeScript module system from 'nodenext' to 'esnext' - Removed moduleResolution 'nodenext' in favor of 'node' - Added webpack extension alias configuration for better module resolution - Simplified main.ts by removing import.meta.url check - Updated langchain.ts to use process.cwd() instead of import.meta.url - Cleaned up next.config.mjs by removing commented webpack configuration --- .github/workflows/release.yml | 48 ++++++++ next.config.mjs | 22 +--- package-lock.json | 226 +++++++++++++++++++++++++--------- package.json | 12 +- src/app/landing/page.tsx | 92 -------------- src/app/layout.tsx | 8 +- src/app/page.tsx | 3 +- src/langchain.ts | 6 +- src/main.ts | 19 ++- tsconfig.next.json | 9 +- 10 files changed, 253 insertions(+), 192 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 src/app/landing/page.tsx diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0c7c1ee --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Create Release + +on: + push: + branches: + - main + +jobs: + check-and-release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Get version changes + id: version + run: | + git diff HEAD^ HEAD -U0 package.json | grep '^[+-].*"version"' || echo "No version changes" + if git diff HEAD^ HEAD -U0 package.json | grep '^[+-].*"version"' > /dev/null; then + echo "version_changed=true" >> $GITHUB_OUTPUT + NEW_VERSION=$(node -p "require('./package.json').version") + echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT + else + echo "version_changed=false" >> $GITHUB_OUTPUT + fi + + - name: Get commit message + if: steps.version.outputs.version_changed == 'true' + id: commit + run: | + COMMIT_MSG=$(git log -1 --pretty=%B) + echo "message<> $GITHUB_OUTPUT + echo "$COMMIT_MSG" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Create Release + if: steps.version.outputs.version_changed == 'true' + uses: ncipollo/release-action@v1 + with: + tag: v${{ steps.version.outputs.new_version }} + name: Release v${{ steps.version.outputs.new_version }} + body: ${{ steps.commit.outputs.message }} + draft: false + prerelease: ${{ contains(steps.version.outputs.new_version, 'alpha') || contains(steps.version.outputs.new_version, 'beta') }} diff --git a/next.config.mjs b/next.config.mjs index 64b1ab1..8825594 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -8,6 +8,12 @@ const nextConfig = { }, distDir: pckg.serverPath, basePath: '', + webpack: (config) => { + config.resolve.extensionAlias = { + '.js': ['.ts', '.tsx', '.js', '.jsx'], + }; + return config; + }, }; const CLIENT = +process.env.CLIENT; @@ -25,20 +31,4 @@ if (BASE_PATH) { nextConfig.basePath = BASE_PATH; } -// nextConfig.webpack = (config, { dev, isServer }) => { -// config.optimization.minimizer.forEach((minimizer) => { -// if (minimizer.constructor.name === 'TerserPlugin') { -// minimizer.options.exclude = [ -// /src\/deep.ts$/, -// /src\/being\.ts$/, -// /src\/potentials\.ts$/, -// /src\/on\.ts$/, -// ]; -// } -// }); -// config.optimization.minimize = false; - -// return config; -// }; - export default nextConfig; diff --git a/package-lock.json b/package-lock.json index 216f6ec..b6943a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@deep-foundation/deep", - "version": "7.0.0-alpha.2", + "version": "7.0.0-alpha.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@deep-foundation/deep", - "version": "7.0.0-alpha.2", + "version": "7.0.0-alpha.3", "license": "Unlicense", "dependencies": { "@capacitor-community/electron": "^5.0.1", @@ -24,10 +24,12 @@ "@langchain/core": "^0.3.19", "@llama-node/core": "^0.1.6", "@llama-node/llama-cpp": "^0.1.6", - "@mui/material": "^6.1.6", - "@mui/material-nextjs": "^6.1.6", + "@mui/material": "^6.1.8", + "@mui/material-nextjs": "^6.1.8", "@react-hook/debounce": "^4.0.0", - "@types/node": "^22.5.5", + "@types/node": "^20.0.0", + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", "axios": "^1.7.7", "benchmark": "^2.1.4", "chokidar": "~3.5.3", @@ -51,7 +53,7 @@ "langchain": "^0.3.6", "microtime": "^3.1.1", "monaco-editor": "^0.52.0", - "next": "^15.0.1", + "next": "^15.0.3", "next-themes": "^0.3.0", "node-llama-cpp": "^3.2.0", "react": "^18.3.1", @@ -2595,9 +2597,9 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.1.6.tgz", - "integrity": "sha512-nz1SlR9TdBYYPz4qKoNasMPRiGb4PaIHFkzLzhju0YVYS5QSuFF2+n7CsiHMIDcHv3piPu/xDWI53ruhOqvZwQ==", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.1.8.tgz", + "integrity": "sha512-TGAvzwUg9hybDacwfIGFjI2bXYXrIqky+vMfaeay8rvT56/PNAlvIDUJ54kpT5KRc9AWAihOvtDI7/LJOThOmQ==", "license": "MIT", "funding": { "type": "opencollective", @@ -2605,16 +2607,16 @@ } }, "node_modules/@mui/material": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.1.6.tgz", - "integrity": "sha512-1yvejiQ/601l5AK3uIdUlAVElyCxoqKnl7QA+2oFB/2qYPWfRwDgavW/MoywS5Y2gZEslcJKhe0s2F3IthgFgw==", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.1.8.tgz", + "integrity": "sha512-QZdQFnXct+7NXIzHgT3qt+sQiO7HYGZU2vymP9Xl9tUMXEOA/S1mZMMb7+WGZrk5TzNlU/kP/85K0da5V1jXoQ==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", - "@mui/core-downloads-tracker": "^6.1.6", - "@mui/system": "^6.1.6", + "@mui/core-downloads-tracker": "^6.1.8", + "@mui/system": "^6.1.8", "@mui/types": "^7.2.19", - "@mui/utils": "^6.1.6", + "@mui/utils": "^6.1.8", "@popperjs/core": "^2.11.8", "@types/react-transition-group": "^4.4.11", "clsx": "^2.1.1", @@ -2633,7 +2635,7 @@ "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@mui/material-pigment-css": "^6.1.6", + "@mui/material-pigment-css": "^6.1.8", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" @@ -2654,9 +2656,9 @@ } }, "node_modules/@mui/material-nextjs": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/@mui/material-nextjs/-/material-nextjs-6.1.6.tgz", - "integrity": "sha512-54eTTQgUY6UgXPsR781dMF4R0p9YAkPF8OreiXq6G/1hF7m6D5FiMHBmfzRIaZQ1BkS8RluoSu38m0PBU9YBTA==", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/@mui/material-nextjs/-/material-nextjs-6.1.8.tgz", + "integrity": "sha512-gSNZ+wCq38eX0rcIpsDCwUbWR2+z8/5mVv6+piwJc+ZByLFF8Xuq59vKx3m4IF8+AR8VIYzmfEzKOYxzS7p1aw==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0" @@ -2689,13 +2691,13 @@ } }, "node_modules/@mui/private-theming": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.1.6.tgz", - "integrity": "sha512-ioAiFckaD/fJSnTrUMWgjl9HYBWt7ixCh7zZw7gDZ+Tae7NuprNV6QJK95EidDT7K0GetR2rU3kAeIR61Myttw==", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.1.8.tgz", + "integrity": "sha512-TuKl7msynCNCVvhX3c0ef1sF0Qb3VHcPs8XOGB/8bdOGBr/ynmIG1yTMjZeiFQXk8yN9fzK/FDEKMFxILNn3wg==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", - "@mui/utils": "^6.1.6", + "@mui/utils": "^6.1.8", "prop-types": "^15.8.1" }, "engines": { @@ -2716,9 +2718,9 @@ } }, "node_modules/@mui/styled-engine": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.1.6.tgz", - "integrity": "sha512-I+yS1cSuSvHnZDBO7e7VHxTWpj+R7XlSZvTC4lS/OIbUNJOMMSd3UDP6V2sfwzAdmdDNBi7NGCRv2SZ6O9hGDA==", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.1.8.tgz", + "integrity": "sha512-ZvEoT0U2nPLSLI+B4by4cVjaZnPT2f20f4JUPkyHdwLv65ZzuoHiTlwyhqX1Ch63p8bcJzKTHQVGisEoMK6PGA==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", @@ -2750,16 +2752,16 @@ } }, "node_modules/@mui/system": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.1.6.tgz", - "integrity": "sha512-qOf1VUE9wK8syiB0BBCp82oNBAVPYdj4Trh+G1s+L+ImYiKlubWhhqlnvWt3xqMevR+D2h1CXzA1vhX2FvA+VQ==", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.1.8.tgz", + "integrity": "sha512-i1kLfQoWxzFpXTBQIuPoA3xKnAnP3en4I2T8xIolovSolGQX5k8vGjw1JaydQS40td++cFsgCdEU458HDNTGUA==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", - "@mui/private-theming": "^6.1.6", - "@mui/styled-engine": "^6.1.6", + "@mui/private-theming": "^6.1.8", + "@mui/styled-engine": "^6.1.8", "@mui/types": "^7.2.19", - "@mui/utils": "^6.1.6", + "@mui/utils": "^6.1.8", "clsx": "^2.1.1", "csstype": "^3.1.3", "prop-types": "^15.8.1" @@ -2804,9 +2806,9 @@ } }, "node_modules/@mui/utils": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.1.6.tgz", - "integrity": "sha512-sBS6D9mJECtELASLM+18WUcXF6RH3zNxBRFeyCRg8wad6NbyNrdxLuwK+Ikvc38sTZwBzAz691HmSofLqHd9sQ==", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.1.8.tgz", + "integrity": "sha512-O2DWb1kz8hiANVcR7Z4gOB3SvPPsSQGUmStpyBDzde6dJIfBzgV9PbEQOBZd3EBsd1pB+Uv1z5LAJAbymmawrA==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", @@ -2834,15 +2836,31 @@ } }, "node_modules/@next/env": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.0.1.tgz", - "integrity": "sha512-lc4HeDUKO9gxxlM5G2knTRifqhsY6yYpwuHspBZdboZe0Gp+rZHBNNSIjmQKDJIdRXiXGyVnSD6gafrbQPvILQ==", + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.0.3.tgz", + "integrity": "sha512-t9Xy32pjNOvVn2AS+Utt6VmyrshbpfUMhIjFO60gI58deSo/KgLOp31XZ4O+kY/Is8WAGYwA5gR7kOb1eORDBA==", "license": "MIT" }, + "node_modules/@next/swc-darwin-arm64": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.0.3.tgz", + "integrity": "sha512-s3Q/NOorCsLYdCKvQlWU+a+GeAd3C8Rb3L1YnetsgwXzhc3UTWrtQpB/3eCjFOdGUj5QmXfRak12uocd1ZiiQw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, "node_modules/@next/swc-darwin-x64": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.1.tgz", - "integrity": "sha512-uHl13HXOuq1G7ovWFxCACDJHTSDVbn/sbLv8V1p+7KIvTrYQ5HNoSmKBdYeEKRRCbEmd+OohOgg9YOp8Ux3MBg==", + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.3.tgz", + "integrity": "sha512-Zxl/TwyXVZPCFSf0u2BNj5sE0F2uR6iSKxWpq4Wlk/Sv9Ob6YCKByQTkV2y6BCic+fkabp9190hyrDdPA/dNrw==", "cpu": [ "x64" ], @@ -2855,6 +2873,102 @@ "node": ">= 10" } }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.0.3.tgz", + "integrity": "sha512-T5+gg2EwpsY3OoaLxUIofmMb7ohAUlcNZW0fPQ6YAutaWJaxt1Z1h+8zdl4FRIOr5ABAAhXtBcpkZNwUcKI2fw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.0.3.tgz", + "integrity": "sha512-WkAk6R60mwDjH4lG/JBpb2xHl2/0Vj0ZRu1TIzWuOYfQ9tt9NFsIinI1Epma77JVgy81F32X/AeD+B2cBu/YQA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.0.3.tgz", + "integrity": "sha512-gWL/Cta1aPVqIGgDb6nxkqy06DkwJ9gAnKORdHWX1QBbSZZB+biFYPFti8aKIQL7otCE1pjyPaXpFzGeG2OS2w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.0.3.tgz", + "integrity": "sha512-QQEMwFd8r7C0GxQS62Zcdy6GKx999I/rTO2ubdXEe+MlZk9ZiinsrjwoiBL5/57tfyjikgh6GOU2WRQVUej3UA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.0.3.tgz", + "integrity": "sha512-9TEp47AAd/ms9fPNgtgnT7F3M1Hf7koIYYWCMQ9neOwjbVWJsHZxrFbI3iEDJ8rf1TDGpmHbKxXf2IFpAvheIQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.0.3.tgz", + "integrity": "sha512-VNAz+HN4OGgvZs6MOoVfnn41kBzT+M+tB+OK4cww6DNyWS6wKaDpaAm/qLeOUbnMh0oVx1+mg0uoYARF69dJyA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, "node_modules/@node-llama-cpp/mac-arm64-metal": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@node-llama-cpp/mac-arm64-metal/-/mac-arm64-metal-3.2.0.tgz", @@ -10423,12 +10537,12 @@ "devOptional": true }, "node_modules/next": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/next/-/next-15.0.1.tgz", - "integrity": "sha512-PSkFkr/w7UnFWm+EP8y/QpHrJXMqpZzAXpergB/EqLPOh4SGPJXv1wj4mslr2hUZBAS9pX7/9YLIdxTv6fwytw==", + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/next/-/next-15.0.3.tgz", + "integrity": "sha512-ontCbCRKJUIoivAdGB34yCaOcPgYXr9AAkV/IwqFfWWTXEPUgLYkSkqBhIk9KK7gGmgjc64B+RdoeIDM13Irnw==", "license": "MIT", "dependencies": { - "@next/env": "15.0.1", + "@next/env": "15.0.3", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.13", "busboy": "1.6.0", @@ -10440,25 +10554,25 @@ "next": "dist/bin/next" }, "engines": { - "node": ">=18.18.0" + "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "15.0.1", - "@next/swc-darwin-x64": "15.0.1", - "@next/swc-linux-arm64-gnu": "15.0.1", - "@next/swc-linux-arm64-musl": "15.0.1", - "@next/swc-linux-x64-gnu": "15.0.1", - "@next/swc-linux-x64-musl": "15.0.1", - "@next/swc-win32-arm64-msvc": "15.0.1", - "@next/swc-win32-x64-msvc": "15.0.1", + "@next/swc-darwin-arm64": "15.0.3", + "@next/swc-darwin-x64": "15.0.3", + "@next/swc-linux-arm64-gnu": "15.0.3", + "@next/swc-linux-arm64-musl": "15.0.3", + "@next/swc-linux-x64-gnu": "15.0.3", + "@next/swc-linux-x64-musl": "15.0.3", + "@next/swc-win32-arm64-msvc": "15.0.3", + "@next/swc-win32-x64-msvc": "15.0.3", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", - "react": "^18.2.0 || 19.0.0-rc-69d4b800-20241021", - "react-dom": "^18.2.0 || 19.0.0-rc-69d4b800-20241021", + "react": "^18.2.0 || 19.0.0-rc-66855b96-20241106", + "react-dom": "^18.2.0 || 19.0.0-rc-66855b96-20241106", "sass": "^1.3.0" }, "peerDependenciesMeta": { diff --git a/package.json b/package.json index 7635c74..18cf89b 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "title": "deep", "appId": "com.deep_foundation.deep.app", "macCategory": "public.app-category.developer-tools", - "version": "7.0.0-alpha.3", + "version": "7.0.0-alpha.4", "description": "Universal solution for working with any meaning", "license": "Unlicense", "main": "dist/cli.js", @@ -63,10 +63,12 @@ "@langchain/core": "^0.3.19", "@llama-node/core": "^0.1.6", "@llama-node/llama-cpp": "^0.1.6", - "@mui/material": "^6.1.6", - "@mui/material-nextjs": "^6.1.6", + "@mui/material": "^6.1.8", + "@mui/material-nextjs": "^6.1.8", "@react-hook/debounce": "^4.0.0", - "@types/node": "^22.5.5", + "@types/node": "^20.0.0", + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", "axios": "^1.7.7", "benchmark": "^2.1.4", "chokidar": "~3.5.3", @@ -90,7 +92,7 @@ "langchain": "^0.3.6", "microtime": "^3.1.1", "monaco-editor": "^0.52.0", - "next": "^15.0.1", + "next": "^15.0.3", "next-themes": "^0.3.0", "node-llama-cpp": "^3.2.0", "react": "^18.3.1", diff --git a/src/app/landing/page.tsx b/src/app/landing/page.tsx deleted file mode 100644 index d53f051..0000000 --- a/src/app/landing/page.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import NextLink from "next/link" -import React from 'react'; - -export default function Page() { - // return - // - // - //
- // - // logo - // - // - // - //
- // - //
- // - // - // - // - // - // - //
- //
- //
- //
- // - // Deep - // - //