Skip to content

Commit

Permalink
v7.0.0-alpha.4: TypeScript and Build System Improvements
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
ivansglazunov committed Nov 26, 2024
1 parent 26f6d39 commit df8dde5
Show file tree
Hide file tree
Showing 10 changed files with 253 additions and 192 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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<<EOF" >> $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') }}
22 changes: 6 additions & 16 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Loading

0 comments on commit df8dde5

Please sign in to comment.