Skip to content

Commit

Permalink
Fix issues with prerelease builds (#2562)
Browse files Browse the repository at this point in the history
- Added a fetch-depth: 0 config that should give us the git history and correctly calculate the canary versions
- Don't run scripts as part of the lerna release step, they were already run by the github actions steps
- Fix issue with reference to the node 'util' package that was preventing the browser version of @turf/turf from working
  • Loading branch information
mfedderly committed Dec 30, 2023
1 parent 135b898 commit 1411d63
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v2.4.0
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint:prettier": "prettier --check .",
"preinstall": "npx only-allow pnpm",
"prepare": "lerna run build && husky install",
"publish:prerelease": "lerna publish --force-publish --canary major --dist-tag prerelease --yes",
"publish:prerelease": "lerna publish --force-publish --canary major --dist-tag prerelease --ignore-scripts true --yes",
"test": "pnpm run lint && lerna run test && lerna run --scope @turf/turf last-checks"
},
"lint-staged": {
Expand Down
1 change: 1 addition & 0 deletions packages/turf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"documentation": "^13.2.5",
"glob": "^10.3.10",
"rollup": "^2.79.1",
"rollup-plugin-polyfill-node": "^0.13.0",
"tape": "^5.7.2",
"tsup": "^8.0.1",
"tsx": "^4.6.2",
Expand Down
2 changes: 2 additions & 0 deletions packages/turf/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import nodeResolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import terser from "@rollup/plugin-terser";
import { babel } from "@rollup/plugin-babel";
import nodePolyfills from "rollup-plugin-polyfill-node";

const pckg = require("./package.json");
const input = "index.ts";
Expand All @@ -13,6 +14,7 @@ export default [
plugins: [
commonjs(),
nodeResolve(),
nodePolyfills(),
babel({ babelHelpers: "bundled" }),
terser(),
],
Expand Down
27 changes: 27 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1411d63

Please sign in to comment.