{"action":"created","comment":{"url":"https://api.github.com/repos/parcel-bundler/parcel/pulls/comments/216774209","pull_request_review_id":154336820,"id":216774209,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjc3NDIwOQ==","diff_hunk":"@@ -0,0 +1,189 @@\n+// @flow\n+'use strict';\n+import path from 'path';\n+import { AbortController } from 'abortcontroller-polyfill/dist/cjs-ponyfill';\n+import Watcher from '@parcel/watcher';\n+import PQueue from 'p-queue';\n+import AssetGraph from './AssetGraph';\n+import { Node } from './Graph';\n+import type { Dependency, Asset, File } from './types';\n+import TransformerRunner from './TransformerRunner';\n+import ResolverRunner from './ResolverRunner';\n+import BundlerRunner from './BundlerRunner';\n+import PackagerRunner from './PackagerRunner';\n+\n+// TODO: use custom config if present\n+const defaultConfig = require('@parcel/config-default');\n+\n+const AbortError = new Error('Aborted!');\n+\n+type CliOpts = {\n+  watch?: boolean\n+}\n+\n+type ParcelOpts = {\n+  entries: Array<string>,\n+  cliOpts: CliOpts,\n+}\n+\n+type Signal = {\n+  aborted: boolean,\n+  addEventListener?: Function,\n+}\n+\n+type BuildOpts = {\n+  signal: Signal,\n+  shallow?: boolean,\n+}\n+\n+export default class Parcel {\n+  rootDir: string;\n+  graph: AssetGraph;\n+  watcher: Watcher;\n+  updateQueue: PQueue;\n+  mainQueue: PQueue;\n+  transformerRunner: TransformerRunner;\n+  resolverRunner: ResolverRunner;\n+  bundlerRunner: BundlerRunner;\n+  packagerRunner: PackagerRunner;\n+\n+  constructor({\n+    entries,\n+    cliOpts = {},\n+  }: ParcelOpts) {\n+    this.rootDir = process.cwd();\n+\n+    this.graph = new AssetGraph({ entries, rootDir: this.rootDir });\n+    this.watcher = cliOpts.watch ? new Watcher() : null;\n+    this.updateQueue = new PQueue({ autoStart: false });\n+    this.mainQueue = new PQueue({ autoStart: false });\n+\n+    this.transformerRunner = new TransformerRunner({ parcelConfig: defaultConfig, cliOpts });\n+    this.resolverRunner = new ResolverRunner();\n+    this.bundlerRunner = new BundlerRunner({ parcelConfig: defaultConfig, cliOpts });\n+    this.packagerRunner = new PackagerRunner({ parcelConfig: defaultConfig, cliOpts });\n+  }\n+\n+  run() {\n+    let controller = new AbortController();\n+    let signal = controller.signal;\n+\n+    this.build({ signal });","path":"packages/core/core-v2/src/Parcel.js","position":71,"original_position":71,"commit_id":"a131e45b2c1641a685749501bb87eb4d6f7c3802","original_commit_id":"a131e45b2c1641a685749501bb87eb4d6f7c3802","user":{"login":"padmaia","id":2865858,"node_id":"MDQ6VXNlcjI4NjU4NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/2865858?v=4","gravatar_id":"","url":"https://api.github.com/users/padmaia","html_url":"https://github.com/padmaia","followers_url":"https://api.github.com/users/padmaia/followers","following_url":"https://api.github.com/users/padmaia/following{/other_user}","gists_url":"https://api.github.com/users/padmaia/gists{/gist_id}","starred_url":"https://api.github.com/users/padmaia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/padmaia/subscriptions","organizations_url":"https://api.github.com/users/padmaia/orgs","repos_url":"https://api.github.com/users/padmaia/repos","events_url":"https://api.github.com/users/padmaia/events{/privacy}","received_events_url":"https://api.github.com/users/padmaia/received_events","type":"User","site_admin":false},"body":"I was probably thinking that it made more sense to start watching after a build started and using an await would mean it wouldn't start watching until the first build is finished. It doesn't really need to wait on the build to do anything after, but I suppose it might in the future. Is that a compelling enough reason to switch things around and use an await even if it's not doing anything after yet?","created_at":"2018-09-11T18:30:32Z","updated_at":"2018-09-11T18:30:32Z","html_url":"https://github.com/parcel-bundler/parcel/pull/2000#discussion_r216774209","pull_request_url":"https://api.github.com/repos/parcel-bundler/parcel/pulls/2000","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/parcel-bundler/parcel/pulls/comments/216774209"},"html":{"href":"https://github.com/parcel-bundler/parcel/pull/2000#discussion_r216774209"},"pull_request":{"href":"https://api.github.com/repos/parcel-bundler/parcel/pulls/2000"}},"in_reply_to_id":216766219},"pull_request":{"url":"https://api.github.com/repos/parcel-bundler/parcel/pulls/2000","id":214409315,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NDA5MzE1","html_url":"https://github.com/parcel-bundler/parcel/pull/2000","diff_url":"https://github.com/parcel-bundler/parcel/pull/2000.diff","patch_url":"https://github.com/parcel-bundler/parcel/pull/2000.patch","issue_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/2000","number":2000,"state":"open","locked":false,"title":"Graph building cancellation","user":{"login":"padmaia","id":2865858,"node_id":"MDQ6VXNlcjI4NjU4NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/2865858?v=4","gravatar_id":"","url":"https://api.github.com/users/padmaia","html_url":"https://github.com/padmaia","followers_url":"https://api.github.com/users/padmaia/followers","following_url":"https://api.github.com/users/padmaia/following{/other_user}","gists_url":"https://api.github.com/users/padmaia/gists{/gist_id}","starred_url":"https://api.github.com/users/padmaia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/padmaia/subscriptions","organizations_url":"https://api.github.com/users/padmaia/orgs","repos_url":"https://api.github.com/users/padmaia/repos","events_url":"https://api.github.com/users/padmaia/events{/privacy}","received_events_url":"https://api.github.com/users/padmaia/received_events","type":"User","site_admin":false},"body":"v2 work focused on building out the asset graph and rebuilding on changes\r\n\r\nRunning the simple example with the watch option catches an error working with the cache, but it does rebuild the graph correctly based on the graphviz dump.","created_at":"2018-09-10T18:52:29Z","updated_at":"2018-09-11T18:30:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68e9f474719a4f5dc477518fb04eeaf7d92727a0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"devongovett","id":19409,"node_id":"MDQ6VXNlcjE5NDA5","avatar_url":"https://avatars0.githubusercontent.com/u/19409?v=4","gravatar_id":"","url":"https://api.github.com/users/devongovett","html_url":"https://github.com/devongovett","followers_url":"https://api.github.com/users/devongovett/followers","following_url":"https://api.github.com/users/devongovett/following{/other_user}","gists_url":"https://api.github.com/users/devongovett/gists{/gist_id}","starred_url":"https://api.github.com/users/devongovett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devongovett/subscriptions","organizations_url":"https://api.github.com/users/devongovett/orgs","repos_url":"https://api.github.com/users/devongovett/repos","events_url":"https://api.github.com/users/devongovett/events{/privacy}","received_events_url":"https://api.github.com/users/devongovett/received_events","type":"User","site_admin":false},{"login":"DeMoorJasper","id":2175521,"node_id":"MDQ6VXNlcjIxNzU1MjE=","avatar_url":"https://avatars1.githubusercontent.com/u/2175521?v=4","gravatar_id":"","url":"https://api.github.com/users/DeMoorJasper","html_url":"https://github.com/DeMoorJasper","followers_url":"https://api.github.com/users/DeMoorJasper/followers","following_url":"https://api.github.com/users/DeMoorJasper/following{/other_user}","gists_url":"https://api.github.com/users/DeMoorJasper/gists{/gist_id}","starred_url":"https://api.github.com/users/DeMoorJasper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeMoorJasper/subscriptions","organizations_url":"https://api.github.com/users/DeMoorJasper/orgs","repos_url":"https://api.github.com/users/DeMoorJasper/repos","events_url":"https://api.github.com/users/DeMoorJasper/events{/privacy}","received_events_url":"https://api.github.com/users/DeMoorJasper/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/parcel-bundler/parcel/pulls/2000/commits","review_comments_url":"https://api.github.com/repos/parcel-bundler/parcel/pulls/2000/comments","review_comment_url":"https://api.github.com/repos/parcel-bundler/parcel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/2000/comments","statuses_url":"https://api.github.com/repos/parcel-bundler/parcel/statuses/a131e45b2c1641a685749501bb87eb4d6f7c3802","head":{"label":"parcel-bundler:graph-building-cancellation","ref":"graph-building-cancellation","sha":"a131e45b2c1641a685749501bb87eb4d6f7c3802","user":{"login":"parcel-bundler","id":32607881,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjA3ODgx","avatar_url":"https://avatars1.githubusercontent.com/u/32607881?v=4","gravatar_id":"","url":"https://api.github.com/users/parcel-bundler","html_url":"https://github.com/parcel-bundler","followers_url":"https://api.github.com/users/parcel-bundler/followers","following_url":"https://api.github.com/users/parcel-bundler/following{/other_user}","gists_url":"https://api.github.com/users/parcel-bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/parcel-bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parcel-bundler/subscriptions","organizations_url":"https://api.github.com/users/parcel-bundler/orgs","repos_url":"https://api.github.com/users/parcel-bundler/repos","events_url":"https://api.github.com/users/parcel-bundler/events{/privacy}","received_events_url":"https://api.github.com/users/parcel-bundler/received_events","type":"Organization","site_admin":false},"repo":{"id":99598595,"node_id":"MDEwOlJlcG9zaXRvcnk5OTU5ODU5NQ==","name":"parcel","full_name":"parcel-bundler/parcel","owner":{"login":"parcel-bundler","id":32607881,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjA3ODgx","avatar_url":"https://avatars1.githubusercontent.com/u/32607881?v=4","gravatar_id":"","url":"https://api.github.com/users/parcel-bundler","html_url":"https://github.com/parcel-bundler","followers_url":"https://api.github.com/users/parcel-bundler/followers","following_url":"https://api.github.com/users/parcel-bundler/following{/other_user}","gists_url":"https://api.github.com/users/parcel-bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/parcel-bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parcel-bundler/subscriptions","organizations_url":"https://api.github.com/users/parcel-bundler/orgs","repos_url":"https://api.github.com/users/parcel-bundler/repos","events_url":"https://api.github.com/users/parcel-bundler/events{/privacy}","received_events_url":"https://api.github.com/users/parcel-bundler/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/parcel-bundler/parcel","description":"📦🚀 Blazing fast, zero configuration web application bundler","fork":false,"url":"https://api.github.com/repos/parcel-bundler/parcel","forks_url":"https://api.github.com/repos/parcel-bundler/parcel/forks","keys_url":"https://api.github.com/repos/parcel-bundler/parcel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/parcel-bundler/parcel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/parcel-bundler/parcel/teams","hooks_url":"https://api.github.com/repos/parcel-bundler/parcel/hooks","issue_events_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/events{/number}","events_url":"https://api.github.com/repos/parcel-bundler/parcel/events","assignees_url":"https://api.github.com/repos/parcel-bundler/parcel/assignees{/user}","branches_url":"https://api.github.com/repos/parcel-bundler/parcel/branches{/branch}","tags_url":"https://api.github.com/repos/parcel-bundler/parcel/tags","blobs_url":"https://api.github.com/repos/parcel-bundler/parcel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/parcel-bundler/parcel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/parcel-bundler/parcel/git/refs{/sha}","trees_url":"https://api.github.com/repos/parcel-bundler/parcel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/parcel-bundler/parcel/statuses/{sha}","languages_url":"https://api.github.com/repos/parcel-bundler/parcel/languages","stargazers_url":"https://api.github.com/repos/parcel-bundler/parcel/stargazers","contributors_url":"https://api.github.com/repos/parcel-bundler/parcel/contributors","subscribers_url":"https://api.github.com/repos/parcel-bundler/parcel/subscribers","subscription_url":"https://api.github.com/repos/parcel-bundler/parcel/subscription","commits_url":"https://api.github.com/repos/parcel-bundler/parcel/commits{/sha}","git_commits_url":"https://api.github.com/repos/parcel-bundler/parcel/git/commits{/sha}","comments_url":"https://api.github.com/repos/parcel-bundler/parcel/comments{/number}","issue_comment_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/comments{/number}","contents_url":"https://api.github.com/repos/parcel-bundler/parcel/contents/{+path}","compare_url":"https://api.github.com/repos/parcel-bundler/parcel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/parcel-bundler/parcel/merges","archive_url":"https://api.github.com/repos/parcel-bundler/parcel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/parcel-bundler/parcel/downloads","issues_url":"https://api.github.com/repos/parcel-bundler/parcel/issues{/number}","pulls_url":"https://api.github.com/repos/parcel-bundler/parcel/pulls{/number}","milestones_url":"https://api.github.com/repos/parcel-bundler/parcel/milestones{/number}","notifications_url":"https://api.github.com/repos/parcel-bundler/parcel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/parcel-bundler/parcel/labels{/name}","releases_url":"https://api.github.com/repos/parcel-bundler/parcel/releases{/id}","deployments_url":"https://api.github.com/repos/parcel-bundler/parcel/deployments","created_at":"2017-08-07T16:36:47Z","updated_at":"2018-09-11T18:06:00Z","pushed_at":"2018-09-11T09:32:35Z","git_url":"git://github.com/parcel-bundler/parcel.git","ssh_url":"git@github.com:parcel-bundler/parcel.git","clone_url":"https://github.com/parcel-bundler/parcel.git","svn_url":"https://github.com/parcel-bundler/parcel","homepage":"https://parceljs.org","size":3042,"stargazers_count":26425,"watchers_count":26425,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1088,"mirror_url":null,"archived":false,"open_issues_count":480,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1088,"open_issues":480,"watchers":26425,"default_branch":"master"}},"base":{"label":"parcel-bundler:next","ref":"next","sha":"b394cba8bce83b2f27d14ed43fccb983f07e105f","user":{"login":"parcel-bundler","id":32607881,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjA3ODgx","avatar_url":"https://avatars1.githubusercontent.com/u/32607881?v=4","gravatar_id":"","url":"https://api.github.com/users/parcel-bundler","html_url":"https://github.com/parcel-bundler","followers_url":"https://api.github.com/users/parcel-bundler/followers","following_url":"https://api.github.com/users/parcel-bundler/following{/other_user}","gists_url":"https://api.github.com/users/parcel-bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/parcel-bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parcel-bundler/subscriptions","organizations_url":"https://api.github.com/users/parcel-bundler/orgs","repos_url":"https://api.github.com/users/parcel-bundler/repos","events_url":"https://api.github.com/users/parcel-bundler/events{/privacy}","received_events_url":"https://api.github.com/users/parcel-bundler/received_events","type":"Organization","site_admin":false},"repo":{"id":99598595,"node_id":"MDEwOlJlcG9zaXRvcnk5OTU5ODU5NQ==","name":"parcel","full_name":"parcel-bundler/parcel","owner":{"login":"parcel-bundler","id":32607881,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjA3ODgx","avatar_url":"https://avatars1.githubusercontent.com/u/32607881?v=4","gravatar_id":"","url":"https://api.github.com/users/parcel-bundler","html_url":"https://github.com/parcel-bundler","followers_url":"https://api.github.com/users/parcel-bundler/followers","following_url":"https://api.github.com/users/parcel-bundler/following{/other_user}","gists_url":"https://api.github.com/users/parcel-bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/parcel-bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parcel-bundler/subscriptions","organizations_url":"https://api.github.com/users/parcel-bundler/orgs","repos_url":"https://api.github.com/users/parcel-bundler/repos","events_url":"https://api.github.com/users/parcel-bundler/events{/privacy}","received_events_url":"https://api.github.com/users/parcel-bundler/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/parcel-bundler/parcel","description":"📦🚀 Blazing fast, zero configuration web application bundler","fork":false,"url":"https://api.github.com/repos/parcel-bundler/parcel","forks_url":"https://api.github.com/repos/parcel-bundler/parcel/forks","keys_url":"https://api.github.com/repos/parcel-bundler/parcel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/parcel-bundler/parcel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/parcel-bundler/parcel/teams","hooks_url":"https://api.github.com/repos/parcel-bundler/parcel/hooks","issue_events_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/events{/number}","events_url":"https://api.github.com/repos/parcel-bundler/parcel/events","assignees_url":"https://api.github.com/repos/parcel-bundler/parcel/assignees{/user}","branches_url":"https://api.github.com/repos/parcel-bundler/parcel/branches{/branch}","tags_url":"https://api.github.com/repos/parcel-bundler/parcel/tags","blobs_url":"https://api.github.com/repos/parcel-bundler/parcel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/parcel-bundler/parcel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/parcel-bundler/parcel/git/refs{/sha}","trees_url":"https://api.github.com/repos/parcel-bundler/parcel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/parcel-bundler/parcel/statuses/{sha}","languages_url":"https://api.github.com/repos/parcel-bundler/parcel/languages","stargazers_url":"https://api.github.com/repos/parcel-bundler/parcel/stargazers","contributors_url":"https://api.github.com/repos/parcel-bundler/parcel/contributors","subscribers_url":"https://api.github.com/repos/parcel-bundler/parcel/subscribers","subscription_url":"https://api.github.com/repos/parcel-bundler/parcel/subscription","commits_url":"https://api.github.com/repos/parcel-bundler/parcel/commits{/sha}","git_commits_url":"https://api.github.com/repos/parcel-bundler/parcel/git/commits{/sha}","comments_url":"https://api.github.com/repos/parcel-bundler/parcel/comments{/number}","issue_comment_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/comments{/number}","contents_url":"https://api.github.com/repos/parcel-bundler/parcel/contents/{+path}","compare_url":"https://api.github.com/repos/parcel-bundler/parcel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/parcel-bundler/parcel/merges","archive_url":"https://api.github.com/repos/parcel-bundler/parcel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/parcel-bundler/parcel/downloads","issues_url":"https://api.github.com/repos/parcel-bundler/parcel/issues{/number}","pulls_url":"https://api.github.com/repos/parcel-bundler/parcel/pulls{/number}","milestones_url":"https://api.github.com/repos/parcel-bundler/parcel/milestones{/number}","notifications_url":"https://api.github.com/repos/parcel-bundler/parcel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/parcel-bundler/parcel/labels{/name}","releases_url":"https://api.github.com/repos/parcel-bundler/parcel/releases{/id}","deployments_url":"https://api.github.com/repos/parcel-bundler/parcel/deployments","created_at":"2017-08-07T16:36:47Z","updated_at":"2018-09-11T18:06:00Z","pushed_at":"2018-09-11T09:32:35Z","git_url":"git://github.com/parcel-bundler/parcel.git","ssh_url":"git@github.com:parcel-bundler/parcel.git","clone_url":"https://github.com/parcel-bundler/parcel.git","svn_url":"https://github.com/parcel-bundler/parcel","homepage":"https://parceljs.org","size":3042,"stargazers_count":26425,"watchers_count":26425,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1088,"mirror_url":null,"archived":false,"open_issues_count":480,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1088,"open_issues":480,"watchers":26425,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/parcel-bundler/parcel/pulls/2000"},"html":{"href":"https://github.com/parcel-bundler/parcel/pull/2000"},"issue":{"href":"https://api.github.com/repos/parcel-bundler/parcel/issues/2000"},"comments":{"href":"https://api.github.com/repos/parcel-bundler/parcel/issues/2000/comments"},"review_comments":{"href":"https://api.github.com/repos/parcel-bundler/parcel/pulls/2000/comments"},"review_comment":{"href":"https://api.github.com/repos/parcel-bundler/parcel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/parcel-bundler/parcel/pulls/2000/commits"},"statuses":{"href":"https://api.github.com/repos/parcel-bundler/parcel/statuses/a131e45b2c1641a685749501bb87eb4d6f7c3802"}},"author_association":"NONE"}}
{"actor":{"display_login":"padmaia"}}