Skip to content

Commit

Permalink
Merge branch 'master' into fix_booleanvalid_polygon
Browse files Browse the repository at this point in the history
  • Loading branch information
mfedderly authored Aug 5, 2024
2 parents 0e0ad77 + e3fb086 commit 6fb4e23
Show file tree
Hide file tree
Showing 556 changed files with 16,855 additions and 10,599 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Please provide the following when reporting an issue:
- [ ] The version of Turf you are using, and any other relevant versions.
- [ ] GeoJSON data as a [gist file](https://gist.github.com/) or [geojson.io](http://geojson.io/) (filename extension must be `.geojson`).
- [ ] Snippet of source code or for complex examples use [jsfiddle](https://jsfiddle.net/).
- [ ] Verify this issue hasn't already been reported, or resolved in the latest alpha pre-release.

<!-- Love turf? Please consider supporting our collective:
👉 https://opencollective.com/turf/donate -->
8 changes: 3 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Please fill in this template.
Please fill in this template. Use a meaningful title for the pull request. Include the name of the package modified.

- [ ] Use a meaningful title for the pull request. Include the name of the package modified.
- [ ] Have read [How To Contribute](https://github.com/Turfjs/turf/blob/master/CONTRIBUTING.md#how-to-contribute).
- [ ] Run `npm test` at the sub modules where changes have occurred.
- [ ] Run `npm run lint` to ensure code style at the turf module level.
- [ ] Is this a bug fix, new functionality, or a breaking change?
- [ ] Have read and followed the steps for [preparing a pull request](https://github.com/Turfjs/turf/blob/master/CONTRIBUTING.md#preparing-a-pull-request).

Submitting a new TurfJS Module.

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ jobs:
- run: pnpm test

- name: run publish
run: pnpm run publish:prerelease
run: lerna publish minor --canary --include-merged-tags --force-publish --dist-tag prerelease --ignore-scripts true --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Publish release

on:
push:
tags:
- "v*.*.*"

permissions:
contents: write

jobs:
build:
strategy:
fail-fast: true
matrix:
node:
- 18
platform:
- ubuntu-latest
name: "${{matrix.platform}} / Node.js ${{ matrix.node }}"
runs-on: ${{matrix.platform}}

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

- uses: pnpm/[email protected]
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
cache: "pnpm"

- run: npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: pnpm install --frozen-lockfile

- run: pnpm test

- name: run publish
run: lerna publish from-package --ignore-scripts true --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create Github Release
uses: softprops/action-gh-release@v2
with:
make_latest: true
generate_release_notes: true
draft: true
2 changes: 1 addition & 1 deletion .github/workflows/turf.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Turf.js CI
name: CI build

on:
push:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ npm-debug.log*
node_modules

.vscode

.nx/
42 changes: 22 additions & 20 deletions .monorepolint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default {
"scripts",
"husky",
"lint-staged",
"packageManager",
"devDependencies",
"dependencies",
],
Expand All @@ -88,21 +89,29 @@ export default {
packageEntry({
options: {
entries: {
type: "module",
main: "dist/cjs/index.cjs",
module: "dist/esm/index.js",
types: "dist/esm/index.d.ts",
sideEffects: false,
publishConfig: {
access: "public",
},
// @turf/turf is commonly consumed through CDNs, moving this output file is a breaking change for anyone
// who has a hardcoded reference to this specific file, instead of letting the CDN pick the path.
// Example of a URL that will break: https://unpkg.com/@turf/turf/dist/turf.min.js
// Example of a URL that will keep working: https://unpkg.com/@turf/turf
browser: "turf.min.js",
files: ["dist", "index.d.ts", "turf.min.js"],
files: ["dist", "turf.min.js"],
exports: {
"./package.json": "./package.json",
".": {
import: {
types: "./dist/esm/index.d.mts",
default: "./dist/esm/index.mjs",
types: "./dist/esm/index.d.ts",
default: "./dist/esm/index.js",
},
require: {
types: "./dist/cjs/index.d.ts",
types: "./dist/cjs/index.d.cts",
default: "./dist/cjs/index.cjs",
},
},
Expand All @@ -115,9 +124,10 @@ export default {
packageEntry({
options: {
entries: {
type: "module",
main: "dist/cjs/index.cjs",
module: "dist/esm/index.mjs",
types: "dist/cjs/index.d.ts",
module: "dist/esm/index.js",
types: "dist/esm/index.d.ts",
sideEffects: false,
publishConfig: {
access: "public",
Expand All @@ -126,11 +136,11 @@ export default {
"./package.json": "./package.json",
".": {
import: {
types: "./dist/esm/index.d.mts",
default: "./dist/esm/index.mjs",
types: "./dist/esm/index.d.ts",
default: "./dist/esm/index.js",
},
require: {
types: "./dist/cjs/index.d.ts",
types: "./dist/cjs/index.d.cts",
default: "./dist/cjs/index.cjs",
},
},
Expand All @@ -146,16 +156,7 @@ export default {
files: ["dist"],
},
},
includePackages: TS_PACKAGES,
}),

packageEntry({
options: {
entries: {
files: ["dist", "index.d.ts"],
},
},
includePackages: JS_PACKAGES,
includePackages: [...TS_PACKAGES, ...JS_PACKAGES],
}),

packageEntry({
Expand Down Expand Up @@ -208,7 +209,8 @@ export default {
packageScript({
options: {
scripts: {
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts",
"test:types":
"tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts",
},
},
includePackages: TYPES_PACKAGES,
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ packages/turf-*/test/true/**
packages/turf-*/test/false/**

pnpm-lock.yaml

/.nx/cache
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# 7.0.0 (prerelease)
Changelog is no longer maintained. See Turf Github [releases](https://github.com/Turfjs/turf/releases)

We intend to keep making breaking changes before 7.0.0 is fully released. If you intend to take a dependency on the 7.0 prereleases consider pinning the exact version dependency to avoid unintended breaks.
# 7.0.0

## ⚠️ Breaking
- Move to @types/geojson package instead of declaring our own (#2158)
- Move to @types/geojson package instead of declaring our own. Typescript consumers of Turf will need to import from @types/geojson. (#2158)
- Move distribution JS to target ES2017 (#2237)
- Please change to using named exports instead of default exports from the various packages
- [`@turf/helpers`](helpers) Correct the conversion factor for degrees (#2177)
- [`@turf/helpers`](helpers) polygon() will now throw if the first and last coordinates are not the same (#2173)
- [`@turf/helpers`](helpers) Separate AreaUnits into its own type (#2393)
Expand All @@ -15,6 +16,7 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/union`](union) Accept FeatureCollection for multiple inputs (#2247)
- [`@turf/difference`](difference) Accept FeatureCollection for multiple inputs (#2247)
- [`@turf/intersect`](intersect) Accept FeatureCollection for multiple inputs (#2247)
- [`@turf/buffer`](buffer) Add undefined return for when the geometry is invalid (#2613)

## 🏅 New Features/Enhancements
- [`@turf/kinks`](kinks) Move to sweepline-intersections library for performance (#1896)
Expand Down Expand Up @@ -48,6 +50,9 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/boolean-parallel`](boolean-parallel) Lines with 180 degree angle between them are also considered parallel (#2475)
- [`@turf/unkink-polygon`](unkink-polygon) Fix a maximum call stack size exceeded error with very large polygons (#2504)
- [`@turf/line-arc`](line-arc) Number of arc segments generated wasn't related to steps value passed in (#2524)
- [`@turf/boolean-equal`](boolean-equal) Replace geojson-equality with new implementation (#2531)
- [`@turf/boolean-overlap`](boolean-overlap) Replace geojson-equality with new implementation (#2531)
- [`@turf/boolean-within`](boolean-within) Now correctly checks that the final point is contained (#2599)

## 📖 Documentation
- [`@turf/bbox`][bbox] Improve documentation (#2153)
Expand All @@ -59,7 +64,7 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/polygon-smooth`](polygon-smooth) Clean up a typo (#2293)
- [`@turf/nearest-point-on-line`](nearest-point-on-line) Clean up typescript types (#2296)
- [`@turf/boolean-touches`](boolean-touches) Add boolean-touches to docs (#2431)
- [`@turf/boolean-equals`](boolean-equals) Improve docs (#2412)
- [`@turf/boolean-equal`](boolean-equal) Improve docs (#2412)

- Remove Bower references (#2146)
- Fix typo in README (#2313)
Expand All @@ -71,7 +76,9 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/turf](turf) Add booleanIntersects typescript export (#2157)
- [`@turf/turf](turf) Add booleanTouches export (#2170)
- [`@turf/turf](turf) Add booleanConcave export (#2265)
- [`@turf/simplify`](simplify) Clean up internals for less object churn (#2561)
- [`@turf/helpers](helpers) Make isObject a little more accurate (#2176)
- Migrate from geojsonhint to @placemark/check-geojson (#2571)
- Add custom types entry point to exports, required by Typescript for node16, nodenext and bundler module resolution strategies (#2400, #2452)
- types.ts tests are now run in strict mode (#2363)
- Uses tslib now for smaller bundles (#2165)
Expand Down
Loading

0 comments on commit 6fb4e23

Please sign in to comment.