From e33765afe1fd5a0a8a14406453fd21b49015ffe7 Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Thu, 11 Nov 2021 12:48:49 -0800 Subject: [PATCH 1/7] Hook up taskcluster for priv. signing, closes #37 --- .taskcluster.yml | 321 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 321 insertions(+) create mode 100644 .taskcluster.yml diff --git a/.taskcluster.yml b/.taskcluster.yml new file mode 100644 index 0000000..942f437 --- /dev/null +++ b/.taskcluster.yml @@ -0,0 +1,321 @@ +--- +version: 1 +reporting: checks-v1 +policy: + pullRequests: collaborators +tasks: + - $let: + # XXX Set to `true` for private repos + privateRepo: true + # XXX Use + # `system` for system add-on, + # `privileged` for AMO or self-hosted privileged add-on, + # `mozillaonline-privileged` for Mozilla China add-on, + # `normandy-privileged` for normandy add-on + # to enable siging on push/PR. + xpiSigningType: "privileged" + # The below doesn't need changing on initial repo setup + taskgraph: + branch: taskgraph + revision: 8051b20c975711d4ce09537285cef7451d043d8b + template: + repo: https://github.com/mozilla-rally/search-engine-usage-study + branch: main + trustDomain: xpi + in: + $if: 'tasks_for in ["github-pull-request", "github-push", "action", "cron"]' + then: + $let: + # Github events have this stuff in different places... + ownerEmail: + $if: 'tasks_for == "github-push"' + then: '${event.pusher.email}' + # Assume Pull Request + else: + $if: 'tasks_for == "github-pull-request"' + then: '${event.pull_request.user.login}@users.noreply.github.com' + else: + $if: 'tasks_for in ["cron", "action"]' + then: '${tasks_for}@noreply.mozilla.org' + project: + $if: 'tasks_for == "github-push"' + then: '${event.repository.name}' + else: + $if: 'tasks_for == "github-pull-request"' + then: '${event.pull_request.head.repo.name}' + else: + $if: 'tasks_for in ["cron", "action"]' + then: '${repository.project}' + head_branch: + $if: 'tasks_for == "github-pull-request"' + then: ${event.pull_request.head.ref} + else: + $if: 'tasks_for == "github-push"' + then: ${event.ref} + else: + $if: 'tasks_for in ["cron", "action"]' + then: '${push.branch}' + head_sha: + $if: 'tasks_for == "github-push"' + then: '${event.after}' + else: + $if: 'tasks_for == "github-pull-request"' + then: '${event.pull_request.head.sha}' + else: + $if: 'tasks_for in ["cron", "action"]' + then: '${push.revision}' + ownTaskId: + $if: '"github" in tasks_for' + then: {$eval: as_slugid("decision_task")} + else: + $if: 'tasks_for in ["cron", "action"]' + then: '${ownTaskId}' + repoFullName: + $if: 'tasks_for in "github-push"' + then: '${event.repository.full_name}' + else: + $if: 'tasks_for == "github-pull-request"' + then: '${event.pull_request.base.repo.full_name}' + else: + $if: 'tasks_for in ["cron", "action"]' + # Trim https://github.com/ + then: '${repository.url[19:]}' + baseRepoUrl: + $if: '!privateRepo' # public repo + then: + $if: 'tasks_for == "github-push"' + then: '${event.repository.html_url}' + else: + $if: 'tasks_for == "github-pull-request"' + then: '${event.pull_request.base.repo.html_url}' + else: + $if: 'tasks_for in ["cron", "action"]' + then: '${repository.url}' + else: + $if: 'tasks_for == "github-push"' + then: '${event.repository.ssh_url}' + else: + $if: 'tasks_for == "github-pull-request"' + then: '${event.pull_request.base.repo.ssh_url}' + else: + $if: 'tasks_for in ["cron", "action"]' + then: '${repository.url}' + repoUrl: + $if: '!privateRepo' # public repo + then: + $if: 'tasks_for == "github-push"' + then: '${event.repository.html_url}' + else: + $if: 'tasks_for == "github-pull-request"' + then: '${event.pull_request.head.repo.html_url}' + else: + $if: 'tasks_for in ["cron", "action"]' + then: '${repository.url}' + else: + $if: 'tasks_for == "github-push"' + then: '${event.repository.ssh_url}' + else: + $if: 'tasks_for == "github-pull-request"' + then: '${event.pull_request.base.repo.ssh_url}' + else: + $if: 'tasks_for in ["cron", "action"]' + then: '${repository.url}' + in: + $let: + level: 1 + in: + taskId: + $if: 'tasks_for != "action"' + then: '${ownTaskId}' + taskGroupId: + $if: 'tasks_for == "action"' + then: + '${action.taskGroupId}' + else: + '${ownTaskId}' # same as taskId; this is how automation identifies a decision task + schedulerId: '${trustDomain}-level-${level}' + created: {$fromNow: ''} + deadline: {$fromNow: '1 day'} + expires: {$fromNow: '1 year 1 second'} # 1 second so artifacts expire first, despite rounding errors + metadata: + $merge: + - owner: "${ownerEmail}" + - $if: '!privateRepo' # public repo + then: + source: '${repoUrl}/raw/${head_sha}/.taskcluster.yml' + else: + # XXX revisit after https://github.com/taskcluster/taskcluster/pull/2812 + # is deployed to the firefoxci cluster. + source: 'ssh://github.com/${repoUrl[15:-4]}/raw/${head_sha}/.taskcluster.yml' + - $if: 'tasks_for in ["github-push", "github-pull-request"]' + then: + name: "Decision Task" + description: 'The task that creates all of the other tasks in the task graph' + else: + $if: 'tasks_for == "action"' + then: + name: "Action: ${action.title}" + description: '${action.description}' + else: + name: "Decision Task for cron job ${cron.job_name}" + description: 'Created by a [cron task](https://tools.taskcluster.net/tasks/${cron.task_id})' + provisionerId: "xpi-${level}" + workerType: "decision" + tags: + $if: 'tasks_for in ["github-push", "github-pull-request"]' + then: + kind: decision-task + else: + $if: 'tasks_for == "action"' + then: + kind: 'action-callback' + else: + $if: 'tasks_for == "cron"' + then: + kind: cron-task + routes: + $flatten: + - checks + - $if: 'tasks_for == "github-push"' + then: + - "index.${trustDomain}.v2.${project}.revision.${head_sha}.taskgraph.decision" + else: [] + scopes: + # `https://` is 8 characters so, ${repoUrl[8:]} is the repository without the protocol. + $if: 'tasks_for == "github-push"' + then: + $let: + short_head_branch: + $if: 'head_branch[:10] == "refs/tags/"' + then: {$eval: 'head_branch[10:]'} + else: + $if: 'head_branch[:11] == "refs/heads/"' + then: {$eval: 'head_branch[11:]'} + else: ${head_branch} + in: + - 'assume:repo:github.com/${repoFullName}:branch:${short_head_branch}' + + + else: + $if: 'tasks_for == "github-pull-request"' + then: + - 'assume:repo:github.com/${repoFullName}:pull-request' + + else: + $if: 'tasks_for == "action"' + then: + # when all actions are hooks, we can calculate this directly rather than using a variable + - '${action.repo_scope}' + else: + - 'assume:repo:github.com/${repoFullName}:cron:${cron.job_name}' + + + requires: all-completed + priority: lowest + retries: 5 + + payload: + env: + # run-task uses these to check out the source; the inputs + # to `mach taskgraph decision` are all on the command line. + $merge: + - XPI_BASE_REPOSITORY: '${baseRepoUrl}' + XPI_HEAD_REPOSITORY: '${repoUrl}' + XPI_HEAD_REF: '${head_branch}' + XPI_HEAD_REV: '${head_sha}' + XPI_REPOSITORY_TYPE: git + XPI_SIGNING_TYPE: '${xpiSigningType}' + TEMPLATE_BASE_REPOSITORY: '${template.repo}' + TEMPLATE_HEAD_REPOSITORY: '${template.repo}' + TEMPLATE_HEAD_REV: '${template.branch}' + TEMPLATE_HEAD_REF: '${template.branch}' + TEMPLATE_REPOSITORY_TYPE: git + TASKGRAPH_BASE_REPOSITORY: https://hg.mozilla.org/ci/taskgraph + TASKGRAPH_HEAD_REPOSITORY: https://hg.mozilla.org/ci/${taskgraph.branch} + TASKGRAPH_HEAD_REV: '${taskgraph.revision}' + TASKGRAPH_REPOSITORY_TYPE: hg + REPOSITORIES: {$json: {xpi: "XPI Manifest", taskgraph: "Taskgraph", template: "XPI Template"}} + HG_STORE_PATH: /builds/worker/checkouts/hg-store + - $if: 'privateRepo' + then: + XPI_SSH_SECRET_NAME: project/xpi/xpi-github-clone-ssh + - $if: 'tasks_for in ["github-pull-request"]' + then: + XPI_PULL_REQUEST_NUMBER: '${event.pull_request.number}' + - $if: 'tasks_for == "action"' + then: + ACTION_TASK_GROUP_ID: '${action.taskGroupId}' # taskGroupId of the target task + ACTION_TASK_ID: {$json: {$eval: 'taskId'}} # taskId of the target task (JSON-encoded) + ACTION_INPUT: {$json: {$eval: 'input'}} + ACTION_CALLBACK: '${action.cb_name}' + features: + taskclusterProxy: true + chainOfTrust: true + # Note: This task is built server side without the context or tooling that + # exist in tree so we must hard code the hash + image: + mozillareleases/taskgraph:decision-d9fab4448ee5e00b0a29825c3f0609af957279daf102547d715414782710ef06@sha256:79eb469838621168a6364476b96850fc9f2d353686195c010ad078fdcf29568e + + maxRunTime: 1800 + + command: + - /usr/local/bin/run-task + - '--xpi-checkout=/builds/worker/checkouts/src' + - '--template-checkout=/builds/worker/checkouts/template' + - '--taskgraph-checkout=/builds/worker/checkouts/taskgraph' + - '--task-cwd=/builds/worker/checkouts/src' + - '--' + - bash + - -cx + - $let: + extraArgs: {$if: 'tasks_for == "cron"', then: '${cron.quoted_args}', else: ''} + in: + $if: 'tasks_for == "action"' + then: > + PIP_IGNORE_INSTALLED=0 pip install --user /builds/worker/checkouts/taskgraph && + cd /builds/worker/checkouts/src && + rm -rf taskcluster && + ln -s /builds/worker/checkouts/template/taskcluster taskcluster && + ln -s /builds/worker/artifacts artifacts && + ~/.local/bin/taskgraph action-callback + else: > + PIP_IGNORE_INSTALLED=0 pip install --user /builds/worker/checkouts/taskgraph && + rm -rf taskcluster && + ln -s /builds/worker/checkouts/template/taskcluster taskcluster && + ln -s /builds/worker/artifacts artifacts && + ~/.local/bin/taskgraph decision + --pushlog-id='0' + --pushdate='0' + --project='${project}' + --message="" + --owner='${ownerEmail}' + --level='${level}' + --base-repository="$XPI_BASE_REPOSITORY" + --head-repository="$XPI_HEAD_REPOSITORY" + --head-ref="$XPI_HEAD_REF" + --head-rev="$XPI_HEAD_REV" + --repository-type="$XPI_REPOSITORY_TYPE" + --tasks-for='${tasks_for}' + ${extraArgs} + + artifacts: + 'public': + type: 'directory' + path: '/builds/worker/artifacts' + expires: {$fromNow: '1 year'} + + extra: + $merge: + - $if: 'tasks_for == "action"' + then: + parent: '${action.taskGroupId}' + action: + name: '${action.name}' + context: + taskGroupId: '${action.taskGroupId}' + taskId: {$eval: 'taskId'} + input: {$eval: 'input'} + - $if: 'tasks_for == "cron"' + then: + cron: {$json: {$eval: 'cron'}} + - tasks_for: '${tasks_for}' From af7cd507dff049d83ccfffb2f0d521a93e0b7161 Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Thu, 11 Nov 2021 15:03:18 -0800 Subject: [PATCH 2/7] switch from -rally to -extensions org --- .taskcluster.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.taskcluster.yml b/.taskcluster.yml index 942f437..94c813b 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -19,7 +19,7 @@ tasks: branch: taskgraph revision: 8051b20c975711d4ce09537285cef7451d043d8b template: - repo: https://github.com/mozilla-rally/search-engine-usage-study + repo: https://github.com/mozilla-extensions/search-engine-usage-study branch: main trustDomain: xpi in: From e3567999e31d61417e3e41209b57a74e1dd32544 Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Tue, 4 Jan 2022 09:24:20 -0800 Subject: [PATCH 3/7] add typescript dep --- package-lock.json | 17 ++++++++--------- package.json | 1 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 461a1f7..0cbe686 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "rollup": "^2.47.0", "rollup-plugin-copy": "^3.4.0", "selenium-webdriver": "^4.0.0-beta.3", + "typescript": "^4.5.4", "web-ext": "^6.1.0", "webextension-polyfill": "^0.8.0" }, @@ -8984,11 +8985,10 @@ } }, "node_modules/typescript": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz", - "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", + "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", "dev": true, - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -16733,11 +16733,10 @@ } }, "typescript": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz", - "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==", - "dev": true, - "peer": true + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", + "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", + "dev": true }, "unbox-primitive": { "version": "1.0.0", diff --git a/package.json b/package.json index 2e47f7a..97953db 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "rollup": "^2.47.0", "rollup-plugin-copy": "^3.4.0", "selenium-webdriver": "^4.0.0-beta.3", + "typescript": "^4.5.4", "web-ext": "^6.1.0", "webextension-polyfill": "^0.8.0" }, From e40a4c1016ee0576bffd62544815a65fc3201dea Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Tue, 4 Jan 2022 09:31:18 -0800 Subject: [PATCH 4/7] add rollup deps --- package-lock.json | 109 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 + 2 files changed, 111 insertions(+) diff --git a/package-lock.json b/package-lock.json index 0cbe686..3c00d69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@mozilla/rally": "^0.6.0", "@mozilla/web-science": "^0.4.0", "@rollup/plugin-commonjs": "^19.0.0", + "@rollup/plugin-html": "^0.2.4", "@rollup/plugin-node-resolve": "^13.0.0", "@rollup/plugin-replace": "^2.4.2", "@rollup/plugin-typescript": "^8.2.1", @@ -27,6 +28,7 @@ "npm-run-all": "^4.1.5", "rollup": "^2.47.0", "rollup-plugin-copy": "^3.4.0", + "rollup-plugin-svelte": "^7.1.0", "selenium-webdriver": "^4.0.0-beta.3", "typescript": "^4.5.4", "web-ext": "^6.1.0", @@ -330,6 +332,18 @@ "rollup": "^2.38.3" } }, + "node_modules/@rollup/plugin-html": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-html/-/plugin-html-0.2.4.tgz", + "integrity": "sha512-x0qpNXxbmGa9Jnl4OX89AORPe2T/a4DqNK69BGRnEdaPKq6MdiUXSTam/eCkF5DxkQGcRcPq0L4vzr/E3q4mVA==", + "dev": true, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, "node_modules/@rollup/plugin-node-resolve": { "version": "13.0.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.0.tgz", @@ -7776,6 +7790,12 @@ "node": ">=0.10.0" } }, + "node_modules/require-relative": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", + "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", + "dev": true + }, "node_modules/resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -7923,6 +7943,38 @@ "node": ">= 4.0.0" } }, + "node_modules/rollup-plugin-svelte": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-7.1.0.tgz", + "integrity": "sha512-vopCUq3G+25sKjwF5VilIbiY6KCuMNHP1PFvx2Vr3REBNMDllKHFZN2B9jwwC+MqNc3UPKkjXnceLPEjTjXGXg==", + "dev": true, + "dependencies": { + "require-relative": "^0.8.7", + "rollup-pluginutils": "^2.8.2" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "rollup": ">=2.0.0", + "svelte": ">=3.5.0" + } + }, + "node_modules/rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1" + } + }, + "node_modules/rollup-pluginutils/node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -8619,6 +8671,16 @@ "node": ">=8" } }, + "node_modules/svelte": { + "version": "3.44.3", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.44.3.tgz", + "integrity": "sha512-aGgrNCip5PQFNfq9e9tmm7EYxWLVHoFsEsmKrtOeRD8dmoGDdyTQ+21xd7qgFd8MNdKGSYvg7F9dr+Tc0yDymg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -9966,6 +10028,13 @@ "resolve": "^1.17.0" } }, + "@rollup/plugin-html": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-html/-/plugin-html-0.2.4.tgz", + "integrity": "sha512-x0qpNXxbmGa9Jnl4OX89AORPe2T/a4DqNK69BGRnEdaPKq6MdiUXSTam/eCkF5DxkQGcRcPq0L4vzr/E3q4mVA==", + "dev": true, + "requires": {} + }, "@rollup/plugin-node-resolve": { "version": "13.0.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.0.tgz", @@ -15749,6 +15818,12 @@ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, + "require-relative": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", + "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", + "dev": true + }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -15861,6 +15936,33 @@ } } }, + "rollup-plugin-svelte": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-7.1.0.tgz", + "integrity": "sha512-vopCUq3G+25sKjwF5VilIbiY6KCuMNHP1PFvx2Vr3REBNMDllKHFZN2B9jwwC+MqNc3UPKkjXnceLPEjTjXGXg==", + "dev": true, + "requires": { + "require-relative": "^0.8.7", + "rollup-pluginutils": "^2.8.2" + } + }, + "rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + }, + "dependencies": { + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + } + } + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -16431,6 +16533,13 @@ "has-flag": "^4.0.0" } }, + "svelte": { + "version": "3.44.3", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.44.3.tgz", + "integrity": "sha512-aGgrNCip5PQFNfq9e9tmm7EYxWLVHoFsEsmKrtOeRD8dmoGDdyTQ+21xd7qgFd8MNdKGSYvg7F9dr+Tc0yDymg==", + "dev": true, + "peer": true + }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", diff --git a/package.json b/package.json index 97953db..0b0175e 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@mozilla/rally": "^0.6.0", "@mozilla/web-science": "^0.4.0", "@rollup/plugin-commonjs": "^19.0.0", + "@rollup/plugin-html": "^0.2.4", "@rollup/plugin-node-resolve": "^13.0.0", "@rollup/plugin-replace": "^2.4.2", "@rollup/plugin-typescript": "^8.2.1", @@ -32,6 +33,7 @@ "npm-run-all": "^4.1.5", "rollup": "^2.47.0", "rollup-plugin-copy": "^3.4.0", + "rollup-plugin-svelte": "^7.1.0", "selenium-webdriver": "^4.0.0-beta.3", "typescript": "^4.5.4", "web-ext": "^6.1.0", From e8974c87343432ea383cc241529d03a72c980492 Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Tue, 4 Jan 2022 09:33:46 -0800 Subject: [PATCH 5/7] install svelte as dev not peer dep --- package-lock.json | 5 ++--- package.json | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c00d69..026b9ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "rollup-plugin-copy": "^3.4.0", "rollup-plugin-svelte": "^7.1.0", "selenium-webdriver": "^4.0.0-beta.3", + "svelte": "^3.44.3", "typescript": "^4.5.4", "web-ext": "^6.1.0", "webextension-polyfill": "^0.8.0" @@ -8676,7 +8677,6 @@ "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.44.3.tgz", "integrity": "sha512-aGgrNCip5PQFNfq9e9tmm7EYxWLVHoFsEsmKrtOeRD8dmoGDdyTQ+21xd7qgFd8MNdKGSYvg7F9dr+Tc0yDymg==", "dev": true, - "peer": true, "engines": { "node": ">= 8" } @@ -16537,8 +16537,7 @@ "version": "3.44.3", "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.44.3.tgz", "integrity": "sha512-aGgrNCip5PQFNfq9e9tmm7EYxWLVHoFsEsmKrtOeRD8dmoGDdyTQ+21xd7qgFd8MNdKGSYvg7F9dr+Tc0yDymg==", - "dev": true, - "peer": true + "dev": true }, "symbol-tree": { "version": "3.2.4", diff --git a/package.json b/package.json index 0b0175e..c3e2cf2 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "rollup-plugin-copy": "^3.4.0", "rollup-plugin-svelte": "^7.1.0", "selenium-webdriver": "^4.0.0-beta.3", + "svelte": "^3.44.3", "typescript": "^4.5.4", "web-ext": "^6.1.0", "webextension-polyfill": "^0.8.0" From ab89e0cfd00fbaca9da37f12a2b95dbe23d0d9b7 Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Tue, 4 Jan 2022 09:37:34 -0800 Subject: [PATCH 6/7] add tslib as dev not peer dep --- package-lock.json | 19 +++++++++---------- package.json | 1 + 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 026b9ec..bbebca2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,6 +31,7 @@ "rollup-plugin-svelte": "^7.1.0", "selenium-webdriver": "^4.0.0-beta.3", "svelte": "^3.44.3", + "tslib": "^2.3.1", "typescript": "^4.5.4", "web-ext": "^6.1.0", "webextension-polyfill": "^0.8.0" @@ -8942,11 +8943,10 @@ } }, "node_modules/tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", - "dev": true, - "peer": true + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true }, "node_modules/tsutils": { "version": "3.21.0", @@ -16755,11 +16755,10 @@ } }, "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", - "dev": true, - "peer": true + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true }, "tsutils": { "version": "3.21.0", diff --git a/package.json b/package.json index c3e2cf2..d6548ba 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "rollup-plugin-svelte": "^7.1.0", "selenium-webdriver": "^4.0.0-beta.3", "svelte": "^3.44.3", + "tslib": "^2.3.1", "typescript": "^4.5.4", "web-ext": "^6.1.0", "webextension-polyfill": "^0.8.0" From 6782c87fda5facb972ccfa23cec5eb06ea6e5007 Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Tue, 4 Jan 2022 09:42:04 -0800 Subject: [PATCH 7/7] produce xpi artifact that taskcluster expects --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d6548ba..3944a7a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "rally-study-template", "version": "0.4.0", "scripts": { - "build": "rollup -c", + "build": "rollup -c && web-ext --config=web-ext-config.js build --overwrite-dest && mv web-ext-artifacts/*.zip web-ext-artifacts/search_engine_usage_study.xpi", "dev": "rollup -c --config-enable-developer-mode", "lint": "eslint . && web-ext lint", "package": "npm run build && web-ext build --overwrite-dest --ignore-files \"./tests/**/*\" --ignore-files \"./src/**/*\" --ignore-files \"./rollup.config.js\"",