Skip to content

Commit 380155c

Browse files
committed
Merge branch 'release-v1.0.0' into release
2 parents 992c136 + 422f5cb commit 380155c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+3353
-1591
lines changed

.circleci/config.yml

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@
55
---
66

77
version: 2.1
8-
8+
commands:
9+
install-node:
10+
steps:
11+
- run:
12+
name: Install Node.js
13+
command: |
14+
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
15+
sudo apt-get install -y nodejs
16+
parameters:
17+
python-version:
18+
type: string
19+
default: "3.9.4"
920
jobs:
1021
spellcheck:
1122
docker:
@@ -25,19 +36,10 @@ jobs:
2536
command: bin/spellcheck.sh list
2637
lint:
2738
docker:
28-
- image: cimg/python:3.9.4
39+
- image: cimg/python:<< pipeline.parameters.python-version >>
2940
steps:
3041
- checkout
31-
- run:
32-
name: Install NVM
33-
command: |
34-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
35-
export NVM_DIR="$HOME/.nvm"
36-
echo 'export NVM_DIR=$HOME/.nvm' >> $BASH_ENV
37-
echo 'source $NVM_DIR/nvm.sh' >> $BASH_ENV
38-
- run:
39-
name: Install Node.js
40-
command: nvm install 16.5.0
42+
- install-node
4143
- run:
4244
name: Check that package-lock.json is updated as needed
4345
command: |
@@ -63,9 +65,10 @@ jobs:
6365

6466
test:
6567
docker:
66-
- image: cimg/python:3.9.4-node
68+
- image: cimg/python:<< pipeline.parameters.python-version >>
6769
steps:
6870
- checkout
71+
- install-node
6972
- run:
7073
name: Install Firefox related dependencies
7174
command: |
@@ -84,9 +87,10 @@ jobs:
8487

8588
build:
8689
docker:
87-
- image: cimg/python:3.9.4-node
90+
- image: cimg/python:<< pipeline.parameters.python-version >>
8891
steps:
8992
- checkout
93+
- install-node
9094
- run:
9195
name: Install JavaScript dependencies
9296
command: npm --prefix ./glean install
@@ -99,9 +103,10 @@ jobs:
99103

100104
sample-webext-test:
101105
docker:
102-
- image: cimg/python:3.8.8-node
106+
- image: cimg/python:<< pipeline.parameters.python-version >>
103107
steps:
104108
- checkout
109+
- install-node
105110
- run:
106111
name: Install JavaScript dependencies for Glean
107112
command: npm --prefix ./glean install
@@ -121,9 +126,10 @@ jobs:
121126
122127
sample-node-test:
123128
docker:
124-
- image: cimg/python:3.8.8-node
129+
- image: cimg/python:<< pipeline.parameters.python-version >>
125130
steps:
126131
- checkout
132+
- install-node
127133
- run:
128134
name: Install JavaScript dependencies for Glean
129135
command: npm --prefix ./glean install
@@ -143,9 +149,10 @@ jobs:
143149
144150
sample-qt-test:
145151
docker:
146-
- image: cimg/python:3.8.8-node
152+
- image: cimg/python:<< pipeline.parameters.python-version >>
147153
steps:
148154
- checkout
155+
- install-node
149156
- run:
150157
name: Install JavaScript dependencies for Glean
151158
command: npm --prefix ./glean install
@@ -172,7 +179,7 @@ jobs:
172179
pip install -r requirements.txt
173180
glean_parser translate src/App/metrics.yaml src/App/pings.yaml \
174181
-f javascript -o src/App/generated \
175-
--option platform=qt --option version="0.32"
182+
--option platform=qt --option version="1.0"
176183
- run:
177184
name: Run Qt sample tests
178185
command: |
@@ -182,9 +189,10 @@ jobs:
182189
183190
browser-compat-smoke-tests:
184191
docker:
185-
- image: cimg/python:3.9.4-node
192+
- image: cimg/python:<< pipeline.parameters.python-version >>
186193
steps:
187194
- checkout
195+
- install-node
188196
- run:
189197
name: Run browser comapt smoke tests
190198
command: |
@@ -207,9 +215,10 @@ jobs:
207215
# via https://circleci.com/blog/deploying-documentation-to-github-pages-with-continuous-integration/
208216
docs-deploy:
209217
docker:
210-
- image: cimg/python:3.9.4-node
218+
- image: cimg/python:<< pipeline.parameters.python-version >>
211219
steps:
212220
- checkout
221+
- install-node
213222
- run:
214223
name: Install JavaScript dependencies
215224
command: npm --prefix ./glean install
@@ -234,9 +243,10 @@ jobs:
234243
235244
publish:
236245
docker:
237-
- image: cimg/python:3.9.4-node
246+
- image: cimg/python:<< pipeline.parameters.python-version >>
238247
steps:
239248
- checkout
249+
- install-node
240250
- run:
241251
name: Install JavaScript dependencies
242252
command: npm --prefix ./glean install

.dictionary

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
personal_ws-1.1 en 70
1+
personal_ws-1.1 en 72
22
API's
33
APIs
44
BUGFIX
@@ -46,6 +46,7 @@ falsy
4646
firefox
4747
gzip
4848
gzipping
49+
init
4950
instantiation
5051
janerik
5152
js
@@ -66,6 +67,7 @@ unminified
6667
uploader
6768
uploaders
6869
url
70+
uuid
6971
virtualenv
7072
webext
7173
webpack

.github/auto_assign.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ reviewers:
55
- Dexterp37
66
- travis79
77
- brizental
8-
- mdboom
98
- chutten
109
numberOfReviewers: 1
1110
skipKeywords:

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ updates:
33
- package-ecosystem: "npm"
44
directory: "/glean"
55
schedule:
6-
interval: "daily"
6+
interval: "weekly"
77
- package-ecosystem: "npm"
88
directory: "/automation"
99
schedule:

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
# Unreleased changes
22

3-
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.32.0...main)
3+
[Full changelog](https://github.com/mozilla/glean.js/compare/v1.0.0...main)
4+
5+
# v1.0.0 (2022-03-17)
6+
7+
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.32.0...v1.0.0)
8+
9+
* [#1154](https://github.com/mozilla/glean.js/pull/1130): BUGFIX: Implemented initialize and set_upload_enabled reasons for deletion-request ping.
10+
* [#1233](https://github.com/mozilla/glean.js/pull/1233): Add optional `buildDate` argument to `initialize` configuration. The build date can be generated by glean_parser.
11+
* [#1233](https://github.com/mozilla/glean.js/pull/1233): Update glean_parser to version 5.1.0.
12+
* [#1217](https://github.com/mozilla/glean.js/pull/1217): Record `InvalidType` error when incorrectly type values are passed to metric recording functions.
13+
* [#1267](https://github.com/mozilla/glean.js/pull/1267): Implement the 'events' ping.
414

515
# v0.32.0 (2022-03-01)
616

717
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.31.0...v0.32.0)
818

919
* [#1220](https://github.com/mozilla/glean.js/pull/1220): Refactor virtual environment behavior to support virtual environments that aren't in the project root.
10-
* This means it's possible to run Glean with a virtual environment created by `virtualenv` or `pyenv-virtualenv` without causing a Glean-specific `.venv` directory to be created in a project that is using Glean.
1120
* [#1130](https://github.com/mozilla/glean.js/pull/1130): BUGFIX: Guarantee event timestamps
1221
cannot be negative numbers.
1322
* Timestamps were observed to be negative in a few occurrences, for platforms that do not provide the `performance.now` API, namely QML, and in which we fallback to the `Date.now` API.

automation/package-lock.json

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

automation/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"license": "MPL-2.0",
2121
"devDependencies": {
2222
"@octokit/request": "^5.6.3",
23-
"browserstack-local": "^1.4.8",
23+
"browserstack-local": "^1.4.9",
2424
"geckodriver": "^3.0.1",
2525
"selenium-webdriver": "^4.1.1",
26-
"webpack": "^5.69.1",
26+
"webpack": "^5.70.0",
2727
"webpack-cli": "^4.9.2",
2828
"webpack-dev-server": "^4.7.4"
2929
}

automation/size/report.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ try {
7171
const fullIncrease = build.max - build.main.max;
7272
return `| **${build.name}** |
7373
| core only | ${formatBytes(build.main.min)} | ${formatBytes(build.min)} | ${coreIncrease > 0 ? "📈" : "📉"} ${formatBytes(Math.abs(coreIncrease))} |
74-
| full bundle | ${formatBytes(build.main.max)} | ${formatBytes(build.max)} | ${coreIncrease > 0 ? "📈" : "📉"} ${formatBytes(Math.abs(fullIncrease))} |`
74+
| full bundle | ${formatBytes(build.main.max)} | ${formatBytes(build.max)} | ${fullIncrease > 0 ? "📈" : "📉"} ${formatBytes(Math.abs(fullIncrease))} |`
7575
});
7676

7777
const report = `

docs/guides/adding_a_new_metric_type.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ Once you have your `Metric` subclass, include it in Glean.js'
9494
[`METRIC_MAP`](https://github.com/mozilla/glean.js/blob/main/glean/src/core/metrics/utils.ts#L17).
9595
This map will be used as a template for creating metric instances from the metrics database.
9696

97-
### The `MetricType` class
97+
### The `InternalMetricType` class
9898

99-
Now you are ready to implement the `MetricType` class for your new metric type.
99+
Now you are ready to implement the `InternalMetricType` class for your new metric type.
100100
This class will hold all the metadata related to a specific user defined metric and
101101
expose the recording and testing APIs of your new metric type.
102102

@@ -106,15 +106,11 @@ This API's design should have been discussed and decided upon during the metric
106106

107107
Still, metric type classes will always have at least one recording function and one testing function.
108108

109-
> **Note** The `type` property on the `MetricType` subclass is a constant. It will be used
109+
> **Note** The `type` property on the `InternalMetricType` subclass is a constant. It will be used
110110
> to determine in which section of the ping the recorded metrics for this type should be placed.
111111
> It's value is the name of the section for this metric type on the ping payload.
112112
> Make sure that, when you included your `Metric` class on the `METRIC_MAP` the property has the
113-
> same value as the `type` property on the corresponding `MetricType`.
114-
115-
Once you are done implementing the `MetricType` class for your new metric type,
116-
make sure to manually expose it for Qt platforms by adding it to
117-
[the Qt entry point file](https://github.com/mozilla/glean.js/blob/main/glean/src/index/qt.ts).
113+
> same value as the `type` property on the corresponding `InternalMetricType`.
118114
119115
#### Recording functions
120116

@@ -172,6 +168,16 @@ async function testGetValue(ping: string = this.sendInPings[0]): Promise<string
172168
The `testGetNumRecordedErrors` function does not need to be implemented individually per metric
173169
type as it is already implemented on the `MetricType` super class.
174170

171+
### The `MetricType` class
172+
173+
The `MetricType` class is the default export on each metric type file. It exposes **only** the APIs
174+
users will interact with and contains the `InternalMetricType` instance as a [private field](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields).
175+
It is a wrapper around the `InternalMetricType`.
176+
177+
Once you are done implementing the `MetricType` class for your new metric type,
178+
make sure to manually expose it for Qt platforms by adding it to
179+
[the Qt entry point file](https://github.com/mozilla/glean.js/blob/main/glean/src/index/qt.ts).
180+
175181
## Testing
176182

177183
Tests for metric type implementations live under the `glean/tests/unit/core/metrics/types` folder. Create a new

docs/guides/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This guide is for developers who want to develop on Glean.js.
44
Glean.js uses [Node.js](https://nodejs.org/).
55
Follow the [official guide](https://nodejs.dev/) to install it.
66
### Version requirements
7-
* `node` >= 12.0.0
7+
* `node` >= 16.0.0
88
* `npm` >= 7.0.0
99

1010
## Building Glean.js

0 commit comments

Comments
 (0)