Skip to content

Commit a340092

Browse files
author
Beatriz Rizental
authored
Bug 1686678 - Reorganize code in core/ and platform/ submodules (#72)
1 parent 056562f commit a340092

Some content is hidden

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

78 files changed

+874
-765
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
- checkout
1515
- run:
1616
name: Install Javascript dependencies
17-
command: npm install
17+
command: npm --prefix ./glean install
1818
- run:
1919
name: Run linter
20-
command: npm run lint
20+
command: npm --prefix ./glean run lint
2121

2222
unit-tests:
2323
docker:
@@ -32,10 +32,10 @@ jobs:
3232
sudo apt install firefox-trunk
3333
- run:
3434
name: Install Javascript dependencies
35-
command: npm install
35+
command: npm --prefix ./glean install
3636
- run:
3737
name: Run unit tests
38-
command: export PATH=.:$PATH && npm run test
38+
command: export PATH=.:$PATH && npm --prefix ./glean run test
3939

4040
check-size:
4141
docker:
@@ -59,8 +59,8 @@ jobs:
5959
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
6060
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
6161
nvm install node
62-
npm install
63-
npm run build:qt
62+
npm --prefix ./glean install
63+
npm --prefix ./glean run build
6464
- run:
6565
name: Verify no Javascript errors found in Qt
6666
command: bin/qt-js-check.sh
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

package.json renamed to glean/package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
"description": "An implementation of the Glean SDK, a modern cross-platform telemetry client, for Javascript environments.",
55
"main": "./dist/glean.js",
66
"scripts": {
7-
"test": "npm run build:test-webext && npm run test:unit",
8-
"test:debug": "ts-mocha \"tests/**/*.spec.ts\" --paths -p ./tsconfig.json --recursive --inspect-brk",
9-
"test:unit": "ts-mocha \"tests/**/*.spec.ts\" --paths -p ./tsconfig.json --recursive --timeout 0",
7+
"test": "npm run test:core && npm run test:platform",
8+
"test:core": "ts-mocha \"tests/core/**/*.spec.ts\" --paths -p ./tsconfig.json --recursive",
9+
"test:platform": "npm run build:test-webext && ts-mocha \"tests/platform/**/*.spec.ts\" --paths -p ./tsconfig.json --recursive --timeout 0",
10+
"build:test-webext": "cd tests/platform/utils/webext/sample/ && npm install && npm run build:xpi",
1011
"lint": "eslint . --ext .ts,.js,.json --max-warnings=0",
1112
"fix": "eslint . --ext .ts,.js,.json --fix",
12-
"build:webext": "webpack --config webpack.config.webext.js --mode production",
13-
"dev:webext": "webpack --watch --config webpack.config.webext.js --mode development --devtool inline-source-map",
14-
"build:qt": "webpack --config webpack.config.qt.js --mode production",
15-
"dev:qt": "webpack --watch --config webpack.config.qt.js --mode development --devtool inline-source-map",
16-
"build:test-webext": "cd tests/utils/webext/sample/ && npm install && npm run build:xpi"
13+
"build": "webpack --config webpack.config.js --mode production",
14+
"dev": "webpack --watch --config webpack.config.js --mode development --devtool inline-source-map"
1715
},
1816
"repository": {
1917
"type": "git",

src/config.ts renamed to glean/src/core/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
import { DEFAULT_TELEMETRY_ENDPOINT } from "./constants";
6-
import { validateURL } from "utils";
5+
import { DEFAULT_TELEMETRY_ENDPOINT } from "core/constants";
6+
import { validateURL } from "core/utils";
77

88
/**
99
* Lists Glean's debug options.

src/constants.ts renamed to glean/src/core/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
import { version } from "../package.json";
5+
import { version } from "../../package.json";
66

77
export const GLEAN_SCHEMA_VERSION = 1;
88

src/dispatcher.ts renamed to glean/src/core/dispatcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
import { generateUUIDv4 } from "utils";
5+
import { generateUUIDv4 } from "core/utils";
66

77
// The possible states a dispatcher instance can be in.
88
export const enum DispatcherState {

0 commit comments

Comments
 (0)