Skip to content

Commit

Permalink
feat: replace pnpm with bun
Browse files Browse the repository at this point in the history
  • Loading branch information
toniocodo committed Sep 10, 2023
1 parent 8c63ee4 commit e6a7231
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 16,246 deletions.
Binary file added bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion libs/oeth/shared/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"executor": "nx:run-commands",
"options": {
"commands": [
"pnpm graphql-codegen --config 'libs/oeth/shared/codegen.ts'"
"bun run graphql-codegen --config 'libs/oeth/shared/codegen.ts'"
]
}
},
Expand Down
6 changes: 3 additions & 3 deletions libs/shared/contracts/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
"generate-abis-json": {
"executor": "nx:run-commands",
"options": {
"command": "ts-node --esm libs/shared/contracts/scripts/generateAbisJson.mts",
"command": "bun run libs/shared/contracts/scripts/generateAbisJson.ts",
"parallel": false
}
},
"generate-abis-ts": {
"executor": "nx:run-commands",
"options": {
"command": "ts-node --esm libs/shared/contracts/scripts/generateAbisTs.mts",
"command": "bun run libs/shared/contracts/scripts/generateAbisTs.ts",
"parallel": false
}
},
"generate-contracts": {
"executor": "nx:run-commands",
"options": {
"command": "ts-node --esm libs/shared/contracts/scripts/generateContracts.mts",
"command": "bun run libs/shared/contracts/scripts/generateContracts.ts",
"parallel": false
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import fse from 'fs-extra';
import path from 'path';

import deployOutput from '../src/network.mainnet.json' assert { type: 'json' };

/**
* The generateABIJsonFiles function is a Node.js script that automates the generation of JSON ABI
* files from a provided configuration file. It extracts ABI data from the configuration file and
* The generateABIJsonFiles function is a Node.js script that automates the generation of JSON ABI
* files from a provided configuration file. It extracts ABI data from the configuration file and
* writes individual JSON ABI files for each contract into an output directory.
*
* deployOutput: The configuration file that contains contract information, including ABI data.
*
* deployOutput: The configuration file that contains contract information, including ABI data.
* OUTPUT_DIR: The directory where the generated JSON ABI files will be written.
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import path from 'path';
import * as prettier from 'prettier';

/**
* The generateABITsFiles function is a Node.js script that automates the generation of TypeScript
* files from JSON ABI files. It reads JSON ABI files from an input directory, converts them into
* format, and writes the resulting TypeScript files to an output directory. This function is
* designed to be used in a build or development environment to keep ABI information in sync with
* The generateABITsFiles function is a Node.js script that automates the generation of TypeScript
* files from JSON ABI files. It reads JSON ABI files from an input directory, converts them into
* format, and writes the resulting TypeScript files to an output directory. This function is
* designed to be used in a build or development environment to keep ABI information in sync with
* smart contract changes.
*
*
* INPUT_DIR: The directory where JSON ABI files are located.
* OUTPUT_DIR: The directory where the generated TypeScript ABI files will be written.
* OUTPUT_DIR: The directory where the generated TypeScript ABI files will be written.
*/

const INPUT_DIR = './libs/shared/contracts/abi-json';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import fse from 'fs-extra';
import path from 'path';
import * as prettier from 'prettier';

import deployOutput from '../src/network.mainnet.json' assert { type: 'json' };

/**
* The generateContractsConfig function is a Node.js script that automates the generation of a
* configuration file for wagmi friendly contracts config. It reads contract information from
* a provided configuration file, constructs a TypeScript module with contract data, and writes
* it to an output file.
*
* The generateContractsConfig function is a Node.js script that automates the generation of a
* configuration file for wagmi friendly contracts config. It reads contract information from
* a provided configuration file, constructs a TypeScript module with contract data, and writes
* it to an output file.
*
* IMPORTANT: The generated configs aren't exported as-is, the purpose of this script is to create
* helper config items to copy/paste in libs/shared/contracts/src/contracts.ts. It is frequent for
* helper config items to copy/paste in libs/shared/contracts/src/contracts.ts. It is frequent for
* contracts to use the Proxy address and the Implementation ABI, the need to be paired in contracts.ts
*
*
* deployOutput: The configuration file that contains contract information, including contract addresses.
* OUTPUT_FILE: The file where the generated contract configuration will be written.
*/
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"version": "0.0.0",
"license": "MIT",
"scripts": {
"build-storybook": "nx build-storybook shared-storybook --verbose",
"storybook": "nx storybook shared-storybook",
"oeth": "pnpm nx serve oeth",
"ousd": "pnpm nx serve ousd"
"build-storybook": "nx build-storybook shared-storybook --verbose",
"storybook": "bun nx storybook shared-storybook",
"oeth": "bun nx serve oeth",
"ousd": "bun nx serve ousd"
},
"private": true,
"dependencies": {
Expand Down
Loading

0 comments on commit e6a7231

Please sign in to comment.