Skip to content

Commit

Permalink
Fix build/publish issues (#877)
Browse files Browse the repository at this point in the history
* ensure that 'npm publish' is used

* how about this

* minor

* version
  • Loading branch information
newhouse authored Aug 24, 2023
1 parent a81b220 commit 1a37a22
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
dist/
vendor/
public/
# From local packing and unzipping
package/
node_modules
scratch

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 2.2.1
- Fix publishing and installation process. https://github.com/anvilco/spectaql/issues/876

### 2.2.0
- Fix/add support for `EnumValues`.
- Non-zero exit code when there's an error.
Expand Down
2 changes: 1 addition & 1 deletion bin/build-vendor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ ensureDirectory(vendorTargetDir)
})()

function isDryRunFn() {
return process.env.npm_config_dry_run === true
return [true, 'true'].includes(process.env.npm_config_dry_run)
}

function stripSpecial(str) {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spectaql",
"version": "2.2.0",
"version": "2.2.1",
"description": "A powerful library for autogenerating static GraphQL API documentation",
"author": "Anvil Foundry Inc. <[email protected]>",
"homepage": "https://github.com/anvilco/spectaql",
Expand Down Expand Up @@ -55,8 +55,8 @@
"clean-build:src": "npm run clean:dist && npm run build:src",
"clean-build:vendor": "npm run clean:vendor && npm run build:vendor",
"clean-build": "npm run clean && npm run build",
"preinstall": "npm run build:vendor",
"prepack": "husky install && npm run clean-build",
"prepack": "husky install && npm run ensure-npm && npm run clean-build",
"ensure-npm": "read -p \"Are you running \\\"npm publish\\\" or did you pack using \\\"npm\\\"? That's \\\"npm\\\" instead of \\\"yarn\\\". Very important!!! [Yy]\" -n 1 -r; if [[ ! $REPLY =~ ^[Yy]$ ]]\nthen\n[[ \"$0\" = \"$BASH_SOURCE\" ]] && exit 1 || return 1\nfi",
"publish:dry-run": "npm pack --dry-run",
"publish:version": "npm version",
"publish:beta": "npm publish --tag beta",
Expand Down

0 comments on commit 1a37a22

Please sign in to comment.