Skip to content

Commit e559d51

Browse files
committed
Merge branch 'release-v0.11.0' into release
2 parents 4312196 + b9a7776 commit e559d51

Some content is hidden

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

48 files changed

+1512
-863
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ jobs:
102102
python3 -m venv venv
103103
source venv/bin/activate
104104
pip install -r requirements.txt
105+
glean_parser translate metrics.yaml pings.yaml -f javascript -o generated --option platform=qt
105106
106107
sudo apt-get install xvfb
107108
xvfb-run python main.py &> qml.log &

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Unreleased changes
22

3-
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.10.2...main)
3+
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.11.0...main)
4+
5+
# v0.11.0 (2021-05-03)
6+
7+
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.10.2...v0.11.0)
8+
9+
* [#260](https://github.com/mozilla/glean.js/pull/260): Set minimum node (>= 12.0.0) and npm (>= 7.0.0) versions.
10+
* [#202](https://github.com/mozilla/glean.js/pull/202): Add a testing API for the ping type.
11+
* [#253](https://github.com/mozilla/glean.js/pull/253): Implement the timespan metric type.
12+
* [#261](https://github.com/mozilla/glean.js/pull/261): Show a spinner while setting up python virtual environment
413

514
# v0.10.2 (2021-04-26)
615

glean/package-lock.json

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

glean/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mozilla/glean",
3-
"version": "0.10.2",
3+
"version": "0.11.0",
44
"description": "An implementation of the Glean SDK, a modern cross-platform telemetry client, for Javascript environments.",
55
"type": "module",
66
"exports": {
@@ -75,7 +75,7 @@
7575
"@typescript-eslint/eslint-plugin": "^4.15.0",
7676
"@typescript-eslint/parser": "^4.15.1",
7777
"eslint": "^7.19.0",
78-
"eslint-plugin-jsdoc": "^32.0.1",
78+
"eslint-plugin-jsdoc": "^33.0.0",
7979
"eslint-plugin-json": "^2.1.2",
8080
"eslint-plugin-mocha": "^8.0.0",
8181
"eslint-plugin-notice": "^0.9.10",
@@ -96,5 +96,9 @@
9696
"dependencies": {
9797
"jose": "^3.7.0",
9898
"uuid": "^8.3.2"
99+
},
100+
"engines": {
101+
"node": ">=12.20.0",
102+
"npm": ">=7.0.0"
99103
}
100104
}

glean/src/cli.ts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { promisify } from "util";
1515
const VIRTUAL_ENVIRONMENT_DIR = ".venv";
1616

1717
// The version of glean_parser to install from PyPI.
18-
const GLEAN_PARSER_VERSION = "3.1.1";
18+
const GLEAN_PARSER_VERSION = "3.2.0";
1919

2020
// This script runs a given Python module as a "main" module, like
2121
// `python -m module`. However, it first checks that the installed
@@ -137,10 +137,12 @@ async function createPythonVenv(venvPath: string): Promise<boolean> {
137137
const venvCmd = `${getSystemPythonBinName()} -m venv ${VIRTUAL_ENVIRONMENT_DIR}`;
138138

139139
for (const cmd of [venvCmd, pipCmd]) {
140+
const spinner = getStartedSpinner();
140141
const {err, stdout, stderr} = await new Promise<{err: exec.ExecException | null, stdout: string, stderr: string}>(resolve => {
141142
exec.exec(cmd, (err, stdout, stderr) => resolve({err, stdout, stderr}));
142143
});
143144

145+
stopSpinner(spinner);
144146
console.log(`${stdout}`);
145147

146148
if (err) {
@@ -176,6 +178,7 @@ async function setup(projectRoot: string) {
176178
* @param parserArgs the list of arguments passed to this command.
177179
*/
178180
async function runGlean(projectRoot: string, parserArgs: string[]) {
181+
const spinner = getStartedSpinner();
179182
const venvRoot = path.join(projectRoot, VIRTUAL_ENVIRONMENT_DIR);
180183
const pythonBin = path.join(getPythonVenvBinariesPath(venvRoot), getSystemPythonBinName());
181184
const cmd = `${pythonBin} -c "${PYTHON_SCRIPT}" online glean_parser ${GLEAN_PARSER_VERSION} ${parserArgs.join(" ")}`;
@@ -184,6 +187,7 @@ async function runGlean(projectRoot: string, parserArgs: string[]) {
184187
exec.exec(cmd, (err, stdout, stderr) => resolve({err, stdout, stderr}));
185188
});
186189

190+
stopSpinner(spinner);
187191
console.log(`${stdout}`);
188192

189193
if (err) {
@@ -214,3 +218,27 @@ async function run(args: string[]) {
214218
run(argv).catch(e => {
215219
console.error("There was an error running Glean", e);
216220
});
221+
222+
/**
223+
* Returns a spinner
224+
*
225+
* @returns an Interval ID that logs certain characters
226+
*/
227+
function getStartedSpinner() {
228+
const ticks = ["\\", "|", "/", "-"];
229+
let i = 0;
230+
return setInterval(function() {
231+
process.stdout.write(" "+ticks[i++]+"\r\r");
232+
i %= 4;
233+
}, 250);
234+
}
235+
236+
/**
237+
* Stops the spinner
238+
*
239+
* @param spinner is created by getStartedSpinner
240+
*/
241+
function stopSpinner(spinner: NodeJS.Timeout) {
242+
process.stdout.write(" \r");
243+
clearInterval(spinner);
244+
}

glean/src/core/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const GLEAN_SCHEMA_VERSION = 1;
88
//
99
// PACKAGE_VERSION is defined as a global by webpack,
1010
// we need a default here for testing when the app is not build with webpack.
11-
export const GLEAN_VERSION = "0.10.2";
11+
export const GLEAN_VERSION = "0.11.0";
1212

1313
// The name of a "ping" that will include Glean ping_info metrics,
1414
// such as ping sequence numbers.

0 commit comments

Comments
 (0)