Skip to content

Commit

Permalink
Merge branch 'master' into ellipsoidal-distance
Browse files Browse the repository at this point in the history
  • Loading branch information
smallsaucepan committed Nov 3, 2023
2 parents 13d093c + a8de40d commit c51158c
Show file tree
Hide file tree
Showing 208 changed files with 7,811 additions and 4,289 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const rules = {
module.exports = {
root: true,
ignorePatterns: ["**/dist/**"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
],
parserOptions: {
ecmaVersion: 6,
Expand Down
19 changes: 3 additions & 16 deletions .github/workflows/turf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,12 @@ jobs:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

# figure out the yarn cache directory
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

# cache the yarn data to speed up builds
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: "yarn"

- run: yarn --frozen-lockfile
- run: git diff --exit-code
Expand Down
4 changes: 2 additions & 2 deletions .monorepolint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ module.exports = {
options: {
scripts: {
docs: "tsx ../../scripts/generate-readmes",
test: "npm-run-all test:*",
test: "npm-run-all --npm-path npm test:*",
},
},
excludePackages: [MAIN_PACKAGE],
},
{
options: {
scripts: {
build: "npm-run-all build:*",
build: "npm-run-all --npm-path npm build:*",
"build:js": "tsc",
"build:es":
'tsc --outDir dist/es --module esnext --declaration false && echo \'{"type":"module"}\' > dist/es/package.json',
Expand Down
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ packages/turf-directional-mean/test/in/bus_route_utm.json

# is actually output
packages/turf/turf.min.js

# Ignore test fixture json in case intentional line breaks help with coord
# readability.
packages/turf-*/test/in/**
packages/turf-*/test/out/**
packages/turf-*/test/true/**
packages/turf-*/test/false/**
4 changes: 3 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{}
{
"trailingComma": "es5"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- Move distribution JS to target ES2017 (#2237)
- [`@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)
- [`@turf/area`](area) Fix earth radius to use WGS84 median earth radius (#2166)
- [`@turf/turf`](turf) Remove re-exports for turf 4.x compatability (#2183)
- [`@turf/rectangle-grid`](rectangle-grid) Fix correctness for large areas (#2106)
Expand All @@ -22,6 +23,7 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/boolean-point-in-polygon`](boolean-point-in-polygon) Move to point-in-polygon-hao library for performance and correctness (#1893)
- [`@turf/line-intersect`][line-intersect] Move to sweepline-intersections library for performance (#2033)
- [`@turf/boolean-contains`](boolean-contains) Add multipolygon support (#2338)
- [`@turf/nearest-point`](nearest-point) Add unit option (#2415)

## 🐛 Bug Fixes
- [`@turf/polygon-smooth`](polygon-smooth) Options argument is now actually optional (#2149)
Expand All @@ -42,6 +44,9 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/boolean-within`](boolean-within) Fix multipoint checks (#2216)
- [`@turf/points-within-polygon`](points-within-polygon) Fix dropped properties on MultiPoint results (#2227)
- [`@turf/random`](random) Throws error on invalid bbox inputs (#2172)
- [`@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)

## 📖 Documentation
- [`@turf/bbox`][bbox] Improve documentation (#2153)
Expand All @@ -52,6 +57,9 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/buffer`](buffer) Clean up Typescript types (#2188)
- [`@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)

- Remove Bower references (#2146)
- Fix typo in README (#2313)
- Lots of cleanup for CONTRIBUTING, README, and RELEASING (#2186)
Expand All @@ -63,6 +71,7 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/turf](turf) Add booleanTouches export (#2170)
- [`@turf/turf](turf) Add booleanConcave export (#2265)
- [`@turf/helpers](helpers) Make isObject a little more accurate (#2176)
- 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)
- Remove object-assign dependency from all packages (#2241)
Expand Down
2 changes: 1 addition & 1 deletion examples/browser/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/create-react-app/public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/es-modules-single-module/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/es-modules/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
13 changes: 3 additions & 10 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
{
"packages": [
"packages/*"
],
"npmClient": "yarn",
"version": "7.0.0-alpha.2",
"command": {
"bootstrap": {
"useWorkspaces": true,
"ignoreScripts": true
},
"publish": {
"registry": "https://registry.npmjs.org"
}
},
"npmClient": "yarn",
"version": "7.0.0-alpha.0"
}
}
22 changes: 22 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "test", "last-checks"]
}
}
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/dist"]
},
"test": {
"dependsOn": ["^test"]
},
"last-checks": {
"dependsOn": ["^last-checks"]
}
}
}
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint:escheck-esm": "es-check --module es8 packages/*/dist/es/index.js",
"lint:escheck-es5": "es-check es5 packages/turf/turf.min.js",
"postlint": "documentation lint packages/turf-*/index.js",
"prepare": "lerna bootstrap && lerna run build && node ./scripts/add-import-extensions.js",
"prepare": "lerna run build && node ./scripts/add-import-extensions.js",
"pretest": "npm run lint",
"test": "lerna run test",
"posttest": "lerna run --scope @turf/turf last-checks",
Expand All @@ -39,34 +39,35 @@
},
"devDependencies": {
"@types/geojson": "7946.0.8",
"@types/node": "^17.0.2",
"@typescript-eslint/eslint-plugin": "^4.8.0",
"@typescript-eslint/parser": "^4.8.0",
"@types/node": "18.11.9",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"acorn": "^7.4.1",
"camelcase": "*",
"d3-queue": "*",
"decamelize": "*",
"dependency-tree": "^8.1.2",
"documentation": "^13.2.5",
"es-check": "^5.1.4",
"eslint": "~7.13.0",
"eslint-config-prettier": "^6.15.0",
"documentation": "^14.0.2",
"es-check": "^7.1.1",
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"esm": "^3.2.25",
"fs-extra": "*",
"husky": "^4.2.3",
"lerna": "^4.0.0",
"lerna": "^7.3.0",
"lint-staged": "^10.0.8",
"load-json-file": "*",
"meow": "*",
"monorepolint": "^0.5.0-alpha.20",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.2",
"prettier": "^3.0.3",
"progress": "*",
"rollup": "^2.34.2",
"tape": "*",
"tape": "^5.7.0",
"ts-node": "^9.0.0",
"tsx": "^3.12.8",
"typescript": "^3.8.3",
"typescript": "^5.2.2",
"yamljs": "*"
}
}
17 changes: 8 additions & 9 deletions packages/turf-along/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/along",
"version": "7.0.0-alpha.0",
"version": "7.0.0-alpha.2",
"description": "turf along module",
"author": "Turf Authors",
"license": "MIT",
Expand Down Expand Up @@ -40,11 +40,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand All @@ -53,16 +53,15 @@
"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",
"tslint": "*",
"tsx": "*",
"typescript": "*"
},
"dependencies": {
"@turf/bearing": "^7.0.0-alpha.0",
"@turf/destination": "^7.0.0-alpha.0",
"@turf/distance": "^7.0.0-alpha.0",
"@turf/helpers": "^7.0.0-alpha.0",
"@turf/invariant": "^7.0.0-alpha.0",
"@turf/bearing": "^7.0.0-alpha.2",
"@turf/destination": "^7.0.0-alpha.2",
"@turf/distance": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0"
}
}
21 changes: 10 additions & 11 deletions packages/turf-angle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/angle",
"version": "7.0.0-alpha.0",
"version": "7.0.0-alpha.2",
"description": "turf angle module",
"author": "Turf Authors",
"contributors": [
Expand Down Expand Up @@ -40,33 +40,32 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
"@turf/distance": "^7.0.0-alpha.0",
"@turf/sector": "^7.0.0-alpha.0",
"@turf/truncate": "^7.0.0-alpha.0",
"@turf/distance": "^7.0.0-alpha.2",
"@turf/sector": "^7.0.0-alpha.2",
"@turf/truncate": "^7.0.0-alpha.2",
"@types/tape": "*",
"benchmark": "*",
"glob": "*",
"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",
"tslint": "*",
"tsx": "*",
"typescript": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/bearing": "^7.0.0-alpha.0",
"@turf/helpers": "^7.0.0-alpha.0",
"@turf/invariant": "^7.0.0-alpha.0",
"@turf/rhumb-bearing": "^7.0.0-alpha.0",
"@turf/bearing": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.2",
"@turf/rhumb-bearing": "^7.0.0-alpha.2",
"tslib": "^2.3.0"
}
}
Loading

0 comments on commit c51158c

Please sign in to comment.