diff --git a/bin/zk b/bin/zk index fec96763b788..868c4e338cdf 100755 --- a/bin/zk +++ b/bin/zk @@ -41,7 +41,7 @@ check_subdirectory check_yarn_version if [ -z "$1" ]; then cd $ZKSYNC_HOME - run_retried yarn install --frozen-lockfile && yarn zk build + run_retried yarn install --frozen-lockfile && yarn utils build && yarn zk build else # can't start this with yarn since it has quirks with `--` as an argument node -- $ZKSYNC_HOME/infrastructure/zk/build/index.js "$@" diff --git a/etc/utils/.gitignore b/etc/utils/.gitignore new file mode 100644 index 000000000000..796b96d1c402 --- /dev/null +++ b/etc/utils/.gitignore @@ -0,0 +1 @@ +/build diff --git a/etc/utils/package.json b/etc/utils/package.json index 47f2b9f238d1..6ce76330c8ea 100644 --- a/etc/utils/package.json +++ b/etc/utils/package.json @@ -1,8 +1,9 @@ { "name": "utils", "version": "0.1.0", - "main": "src/index.ts", "license": "MIT", + "main": "build/index.js", + "types": "build/index.d.ts", "scripts": { "build": "tsc" }, diff --git a/etc/utils/tsconfig.json b/etc/utils/tsconfig.json new file mode 100644 index 000000000000..f96df8d60edb --- /dev/null +++ b/etc/utils/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es2019", + "module": "commonjs", + "outDir": "build", + "strict": true, + "esModuleInterop": true, + "noEmitOnError": true, + "skipLibCheck": true, + "declaration": true + }, + "files": [ + "src/index.ts" + ] +} diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/integration_tests.rs b/zk_toolbox/crates/zk_supervisor/src/commands/integration_tests.rs index 47a886983759..c5b1229dd2ce 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/integration_tests.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/integration_tests.rs @@ -36,6 +36,7 @@ fn build_repository(shell: &Shell, ecosystem_config: &EcosystemConfig) -> anyhow let spinner = Spinner::new(MSG_INTEGRATION_TESTS_BUILDING_DEPENDENCIES); Cmd::new(cmd!(shell, "yarn install --frozen-lockfile")).run()?; + Cmd::new(cmd!(shell, "yarn utils build")).run()?; spinner.finish(); Ok(())