{"action":"created","issue":{"url":"https://api.github.com/repos/Turfjs/turf/issues/1432","repository_url":"https://api.github.com/repos/Turfjs/turf","labels_url":"https://api.github.com/repos/Turfjs/turf/issues/1432/labels{/name}","comments_url":"https://api.github.com/repos/Turfjs/turf/issues/1432/comments","events_url":"https://api.github.com/repos/Turfjs/turf/issues/1432/events","html_url":"https://github.com/Turfjs/turf/pull/1432","id":336994165,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MzEzNzE1","number":1432,"title":"v7 ","user":{"login":"rowanwins","id":6735870,"node_id":"MDQ6VXNlcjY3MzU4NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/6735870?v=4","gravatar_id":"","url":"https://api.github.com/users/rowanwins","html_url":"https://github.com/rowanwins","followers_url":"https://api.github.com/users/rowanwins/followers","following_url":"https://api.github.com/users/rowanwins/following{/other_user}","gists_url":"https://api.github.com/users/rowanwins/gists{/gist_id}","starred_url":"https://api.github.com/users/rowanwins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowanwins/subscriptions","organizations_url":"https://api.github.com/users/rowanwins/orgs","repos_url":"https://api.github.com/users/rowanwins/repos","events_url":"https://api.github.com/users/rowanwins/events{/privacy}","received_events_url":"https://api.github.com/users/rowanwins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-29T13:13:57Z","updated_at":"2018-06-29T13:53:18Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/Turfjs/turf/pulls/1432","html_url":"https://github.com/Turfjs/turf/pull/1432","diff_url":"https://github.com/Turfjs/turf/pull/1432.diff","patch_url":"https://github.com/Turfjs/turf/pull/1432.patch"},"body":"Gday @tmcw  @DenisCarriere @stebogit @stevage @Turbo87 \r\n\r\nAs discussed in #1428 attached is a branch showing a potential way to rejig the code.\r\n\r\n### High Level Changes\r\n- `packages` dir has become `src`\r\n  - modules within `src` will now drop the `turf-` prefix\r\n    - You'll see I've done this for a couple of modules eg `src/along` and `src/helpers`\r\n\r\n### At the module level\r\nA module now contains the following files\r\n- `index.js` which is an ES6 module\r\n  - I used the existing `index.ts` as my starting point \r\n    - I removed the ts syntax, this seemed simpler than using the output of `tsc`, although it does mean that some manual adjustments need to be made for initial validation of inputs.\r\n  - where you need to use other turf modules it's as simple as doing `../whatever` instead of `@turf/whatever`\r\n  - I could possibly script a fair bit of this up in terms of changing the import references and removing the ts syntax.\r\n- `index.ts` will be our ts integration which just uses an existing file which we used to have\r\n  - Need to do some digging here as to how this will work - I'm guessing I need to set something in the root package.json or the `tsconfig.json` in the root\r\n- `test.js` occasionally needs some tweaks if you call other turf modules, similar to above\r\n- ` bench.js` can be left exactly the same\r\n- Lots of files have now been removed from the module level (eg license, readme's, package.json etc) \r\n\r\n### Tests\r\nBecause we now only have a single package.json at the root level I've had to rejig how the tests get called. \r\n- There is a npm script called `test-module` which accepts an argument\r\n  - eg running `npm run test-module along` will run the `test.js` in `src/along`\r\n- Similar arrangement for benchmark files\r\n  - eg `npm run benchmark-module along` will run the `benchmark.js` in `src/along`\r\n- Because the tests are calling ES6 modules I'm using [esm](https://www.npmjs.com/package/esm) to load the modules\r\n  - This is done by setting the `-r esm` flag \r\n````\r\n  \"scripts\": {\r\n    \"benchmark-module\": \"node -r esm scripts/benchmarkModule.js\",\r\n````\r\n\r\n### Summary\r\n- So far the changes seems reasonably easy\r\n- Haven't thought yet about the master turf package eg whats currently in `src/turf` but I'm not envisaging any tough changes here hopefully.\r\n  - First thought is hopefully it's as simple as taking `turf/index.mjs` and moving it to `src/index.js`\r\n- WIll also need to make a raft of changes to the package.json\r\n\r\nOnce we're getting close-ish I'd also like to have a list of issues to address before v7.0.0 is released. I'll get that organised at some stage.\r\n\r\nAnd prior to publishing 7.0.0 I intend on publishing an `alpha` version to npm so that we can test various things (eg how you browserify folks can continue to work with turf).\r\n\r\nAnyway getting late so that's enough for one night. Any major concerns at this stage anyone? \r\n"},"comment":{"url":"https://api.github.com/repos/Turfjs/turf/issues/comments/401360999","html_url":"https://github.com/Turfjs/turf/pull/1432#issuecomment-401360999","issue_url":"https://api.github.com/repos/Turfjs/turf/issues/1432","id":401360999,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTM2MDk5OQ==","user":{"login":"bradjonesca","id":59800,"node_id":"MDQ6VXNlcjU5ODAw","avatar_url":"https://avatars1.githubusercontent.com/u/59800?v=4","gravatar_id":"","url":"https://api.github.com/users/bradjonesca","html_url":"https://github.com/bradjonesca","followers_url":"https://api.github.com/users/bradjonesca/followers","following_url":"https://api.github.com/users/bradjonesca/following{/other_user}","gists_url":"https://api.github.com/users/bradjonesca/gists{/gist_id}","starred_url":"https://api.github.com/users/bradjonesca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradjonesca/subscriptions","organizations_url":"https://api.github.com/users/bradjonesca/orgs","repos_url":"https://api.github.com/users/bradjonesca/repos","events_url":"https://api.github.com/users/bradjonesca/events{/privacy}","received_events_url":"https://api.github.com/users/bradjonesca/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T13:53:18Z","updated_at":"2018-06-29T13:53:18Z","author_association":"NONE","body":"Bloody hell! Nice work Rowan!"}}
{"actor":{"display_login":"bradjonesca"}}