From 946d79e07918858918403c81efd1f8dff9dec028 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Wed, 12 Oct 2022 12:34:41 -0700 Subject: [PATCH] Add prepack script (#57) In #54, I removed the `postinstall` script. Our build/publish pipeline actually depended on the build that was a consequence of the `postinstall` script, so this broke publishing in that the build never occurred. This commit adds a `prepack` script which runs the build prior to packing for publish. --- .changeset/many-ears-act.md | 5 +++++ package.json | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/many-ears-act.md diff --git a/.changeset/many-ears-act.md b/.changeset/many-ears-act.md new file mode 100644 index 0000000..b41c1e4 --- /dev/null +++ b/.changeset/many-ears-act.md @@ -0,0 +1,5 @@ +--- +'@apollo/datasource-rest': patch +--- + +Fix build process (again), ensure built directory exists before publish diff --git a/package.json b/package.json index 9b82dac..02a816b 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "build": "tsc --build tsconfig.build.json", "clean": "git clean -dfqX", "install-with-npm-8.5": "npm i -g npm@^8.5.0 && npm i", + "prepack": "npm run build", "prettier-check": "prettier --check .", "prettier-fix": "prettier --write .", "publish-changeset": "changeset publish",