Skip to content

Commit

Permalink
Merge pull request #928 from graphprotocol/pcv/fix-prepack-tsc
Browse files Browse the repository at this point in the history
fix: correctly pass ts file list to tsc in prepack
  • Loading branch information
pcarranzav authored Jan 19, 2024
2 parents 2ef4613 + 5050229 commit eb4a03e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 6 additions & 0 deletions packages/contracts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @graphprotocol/contracts

## 6.1.2

### Patch Changes

- Correctly pass ts file list to tsc in prepack

## 6.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/contracts",
"version": "6.1.1",
"version": "6.1.2",
"description": "Contracts for the Graph Protocol",
"directories": {
"test": "test"
Expand Down
14 changes: 5 additions & 9 deletions packages/contracts/scripts/prepack
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ yarn clean
yarn build

# Refresh distribution folder
rm -rf dist && mkdir -p dist/types/_src
rm -rf dist && mkdir -p ${TYPECHAIN_DIR}
cp -R build/abis/ dist/abis
cp -R build/types/ dist/types/_src

### Build Typechain bindings
cp -R build/types/ ${TYPECHAIN_DIR}

# Build and create TS declarations
tsc -d ${TYPECHAIN_DIR}/_src/*.ts --outdir ${TYPECHAIN_DIR} --esModuleInterop
# Copy back sources
cp ${TYPECHAIN_DIR}/_src/*.ts ${TYPECHAIN_DIR}
# Delete temporary src dir
rm -rf ${TYPECHAIN_DIR}/_src
pushd ${TYPECHAIN_DIR}
ls *.ts **/*.ts | xargs tsc --esModuleInterop
popd

0 comments on commit eb4a03e

Please sign in to comment.