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

Feat/multiversion #21

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build: build-ts build-go
# Build TypeScript project
build-ts:
@echo "Building TypeScript project..."
cd $(TS_DIR) && npm install && npm run build
cd $(TS_DIR) && pnpm install && pnpm run build

# Build Go project
build-go:
Expand Down
17 changes: 5 additions & 12 deletions typescript/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
const path = require('path');

const configPath = path.resolve(__dirname, '../configs/chain-config.json');

module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src', '<rootDir>/test'],
testMatch: ['**/*.test.ts'],
moduleFileExtensions: ['ts', 'js', 'json'],
moduleNameMapper: {
'^chain-config.json$': configPath,
'^./chain-config.json$': configPath,
},
moduleDirectories: ['node_modules', 'src', path.resolve(__dirname, '../../configs')],
modulePaths: ['.', path.resolve(__dirname, '../../configs')],
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: 'tsconfig.json',
}],
'chain-configs-multi-version.json': path.resolve(__dirname, '../configs/chain-configs-multi-version.json'),
'./chain-configs-multi-version.json': path.resolve(__dirname, '../configs/chain-configs-multi-version.json')
},
moduleDirectories: ['node_modules', 'src', path.resolve(__dirname, '../configs')]
};
11 changes: 6 additions & 5 deletions typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"name": "@fastlane-labs/atlas-config",
"version": "0.1.3",
"version": "1.3.0",
"description": "A configuration package for Atlas Protocol",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc && cp ../configs/chain-config.json dist/",
"clean": "rimraf dist",
"build": "pnpm clean && tsc && cp ../configs/chain-configs-multi-version.json dist/",
"test": "jest",
"test:watch": "jest --watch",
"prepublishOnly": "npm run build"
},
"files": [
Expand All @@ -28,13 +30,12 @@
},
"homepage": "https://github.com/fastlane-labs/atlas-config#readme",
"devDependencies": {
"@jest/globals": "^29.7.0",
"@types/jest": "^29.5.13",
"@types/node": "^22.7.5",
"@jest/globals": "^29.7.0",
"jest": "^29.5.0",
"rimraf": "^5.0.10",
"ts-jest": "^29.2.5",
"typescript": "^5.0.4"
},
"dependencies": {
}
}
Loading
Loading