Skip to content

Commit 1411d63

Browse files
authored
Fix issues with prerelease builds (#2562)
- 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
1 parent 135b898 commit 1411d63

File tree

5 files changed

+33
-1
lines changed

5 files changed

+33
-1
lines changed

.github/workflows/prerelease.yml

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
2123

2224
- uses: pnpm/[email protected]
2325
with:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"lint:prettier": "prettier --check .",
1414
"preinstall": "npx only-allow pnpm",
1515
"prepare": "lerna run build && husky install",
16-
"publish:prerelease": "lerna publish --force-publish --canary major --dist-tag prerelease --yes",
16+
"publish:prerelease": "lerna publish --force-publish --canary major --dist-tag prerelease --ignore-scripts true --yes",
1717
"test": "pnpm run lint && lerna run test && lerna run --scope @turf/turf last-checks"
1818
},
1919
"lint-staged": {

packages/turf/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
"documentation": "^13.2.5",
8787
"glob": "^10.3.10",
8888
"rollup": "^2.79.1",
89+
"rollup-plugin-polyfill-node": "^0.13.0",
8990
"tape": "^5.7.2",
9091
"tsup": "^8.0.1",
9192
"tsx": "^4.6.2",

packages/turf/rollup.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import nodeResolve from "@rollup/plugin-node-resolve";
22
import commonjs from "@rollup/plugin-commonjs";
33
import terser from "@rollup/plugin-terser";
44
import { babel } from "@rollup/plugin-babel";
5+
import nodePolyfills from "rollup-plugin-polyfill-node";
56

67
const pckg = require("./package.json");
78
const input = "index.ts";
@@ -13,6 +14,7 @@ export default [
1314
plugins: [
1415
commonjs(),
1516
nodeResolve(),
17+
nodePolyfills(),
1618
babel({ babelHelpers: "bundled" }),
1719
terser(),
1820
],

pnpm-lock.yaml

+27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)