Skip to content

Commit df8dde5

Browse files
committed
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
1 parent 26f6d39 commit df8dde5

File tree

10 files changed

+253
-192
lines changed

10 files changed

+253
-192
lines changed

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
check-and-release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 2
18+
19+
- name: Get version changes
20+
id: version
21+
run: |
22+
git diff HEAD^ HEAD -U0 package.json | grep '^[+-].*"version"' || echo "No version changes"
23+
if git diff HEAD^ HEAD -U0 package.json | grep '^[+-].*"version"' > /dev/null; then
24+
echo "version_changed=true" >> $GITHUB_OUTPUT
25+
NEW_VERSION=$(node -p "require('./package.json').version")
26+
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
27+
else
28+
echo "version_changed=false" >> $GITHUB_OUTPUT
29+
fi
30+
31+
- name: Get commit message
32+
if: steps.version.outputs.version_changed == 'true'
33+
id: commit
34+
run: |
35+
COMMIT_MSG=$(git log -1 --pretty=%B)
36+
echo "message<<EOF" >> $GITHUB_OUTPUT
37+
echo "$COMMIT_MSG" >> $GITHUB_OUTPUT
38+
echo "EOF" >> $GITHUB_OUTPUT
39+
40+
- name: Create Release
41+
if: steps.version.outputs.version_changed == 'true'
42+
uses: ncipollo/release-action@v1
43+
with:
44+
tag: v${{ steps.version.outputs.new_version }}
45+
name: Release v${{ steps.version.outputs.new_version }}
46+
body: ${{ steps.commit.outputs.message }}
47+
draft: false
48+
prerelease: ${{ contains(steps.version.outputs.new_version, 'alpha') || contains(steps.version.outputs.new_version, 'beta') }}

next.config.mjs

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ const nextConfig = {
88
},
99
distDir: pckg.serverPath,
1010
basePath: '',
11+
webpack: (config) => {
12+
config.resolve.extensionAlias = {
13+
'.js': ['.ts', '.tsx', '.js', '.jsx'],
14+
};
15+
return config;
16+
},
1117
};
1218

1319
const CLIENT = +process.env.CLIENT;
@@ -25,20 +31,4 @@ if (BASE_PATH) {
2531
nextConfig.basePath = BASE_PATH;
2632
}
2733

28-
// nextConfig.webpack = (config, { dev, isServer }) => {
29-
// config.optimization.minimizer.forEach((minimizer) => {
30-
// if (minimizer.constructor.name === 'TerserPlugin') {
31-
// minimizer.options.exclude = [
32-
// /src\/deep.ts$/,
33-
// /src\/being\.ts$/,
34-
// /src\/potentials\.ts$/,
35-
// /src\/on\.ts$/,
36-
// ];
37-
// }
38-
// });
39-
// config.optimization.minimize = false;
40-
41-
// return config;
42-
// };
43-
4434
export default nextConfig;

0 commit comments

Comments
 (0)