Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,6 @@ jobs:
name: Build docs
command: npm --prefix ./glean run build:docs

sample-webext-test:
docker:
- image: cimg/python:<< pipeline.parameters.python-version >>
steps:
- checkout
- install-node
- run:
name: Install JavaScript dependencies for Glean
command: npm --prefix ./glean install
- run:
name: Install Typescript dependencies for the TS web extension sample
command: |
npm --prefix ./samples/browser/webext install
npm --prefix ./samples/browser/webext run link:glean
- run:
name: Build the TS web extension sample
command: |
npm --prefix ./samples/browser/webext run build
- run:
name: Run TS web extension sample test
command: |
export PATH=.:$PATH && npm --prefix ./samples/browser/webext run test

browser-compat-smoke-tests:
docker:
- image: cimg/python:<< pipeline.parameters.python-version >>
Expand Down Expand Up @@ -235,16 +212,12 @@ workflows:
- test:
requires:
- build
- sample-webext-test:
requires:
- test
- hold:
type: approval
requires:
- lint
- build
- test
- sample-webext-test
filters:
branches:
ignore:
Expand Down
8 changes: 0 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@ updates:
directory: "/automation"
schedule:
interval: "monthly"
- package-ecosystem: "npm"
directory: "/samples/browser/webext"
schedule:
interval: "monthly"
- package-ecosystem: "npm"
directory: "/samples/browser/web"
schedule:
interval: "monthly"
- package-ecosystem: "npm"
directory: "/glean/tests/unit/platform/utils/webext/sample"
schedule:
interval: "monthly"
10 changes: 3 additions & 7 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ An end-to-end data collection platform developed by Mozilla and primarily target

Glean provides multiple client SDKs for different programming languages and platforms.
One of the aspects that guide Glean SDK development is cross-platform consistency and the Glean
JavaScript SDK is no exception to that. It is built to work on multiple JavaScript platforms --
websites, and web extensions as of the time of writing -- and to be easily extendable
JavaScript SDK is no exception to that. It is built to work on websites -- and to be easily extendable
to other platforms as well.

The Glean JavaScript SDK is the latest addition to the family of Glean SDKs. The other Glean SDKs,
Expand All @@ -39,9 +38,7 @@ When data is submitted, the Glean SDK is responsible for assembling the correct
storage. Each metric can have different [lifetimes](https://mozilla.github.io/glean/book/user/metrics/adding-new-metrics.html#a-lifetime-example)
and the SDK will manage its storage so that data does not remain in storage after it's lifetime is expired.

The Glean SDK tries to do all of this is the least disruptive way possible to users. There are two separate
implementations for the SDK based on the platform: async (web extensions) and sync (browser). The implementation
is set inside of Glean itself and is not configurable by the user.
The Glean SDK tries to do all of this is the least disruptive way possible to users.

### async (Web Extensions)

Expand Down Expand Up @@ -104,7 +101,7 @@ To see all the exposed entry points, check out Glean.js' `package.json` file.
### `entry/`

The `entry/` folder contains the main entry points for the Glean.js package per platform.
For example, when a user does `import Glean from @mozilla/glean/webext` it's the `entry/webext.ts`
For example, when a user does `import Glean from @mozilla/glean/web` it's the `entry/web.ts`
file that they are getting and not `core/glean.ts`.

The main difference between each platform's file is that a different `Platform` implementation is
Expand All @@ -123,7 +120,6 @@ It also makes testing easier, because the exact same suite of tests can be run f

The storage module varies for each platform. The storage mechanism used by each platform is as follows:
- `web` - [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage)
- `webext` - [`storage`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage)

### `plugins/`

Expand Down
5 changes: 0 additions & 5 deletions automation/size/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ import {

async function buildStatsMap() {
return [
{
name: "Web Extension",
max: await getCustomLibSize("webext", METRIC_TYPES, PLUGINS),
min: await getCustomLibSize("webext")
},
{
name: "Website",
max: await getCustomLibSize("web", METRIC_TYPES, PLUGINS),
Expand Down
4 changes: 2 additions & 2 deletions automation/size/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const METRIC_TYPES = [

export const PLUGINS = [ "encryption" ];

export const PLATFORMS = [ "web", "webext" ];
export const PLATFORMS = [ "web" ];

const UNITS = ["bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
/**
Expand Down Expand Up @@ -81,7 +81,7 @@ export function executeCmd(cmd) {
*
* Note: This function will use whatever `@mozilla/glean` package is linked at its runtime.
*
* @param {string} platform The platform to build for, supported platforms are: `web`, and `webext`.
* @param {string} platform The platform to build for, supported platforms are: `web`.
* @param {[string]} metrics An array of metric types. Supported metrics types are listed in `METRIC_TYPES`.
* If not provided the final bundle won't contain any additional metric types.
* @param {[string]} plugins An array of plugins. Supported plugins are listed in `PLUGINS`.
Expand Down
2 changes: 1 addition & 1 deletion automation/size/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

export default (platform, entry) => {
const target = ["webext", "web"].includes(platform) ? "web" : null;
const target = platform === "web" ? "web" : null;

return {
target,
Expand Down
4 changes: 0 additions & 4 deletions docs/reference/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ Runs all necessary lints on the code. This includes:

Runs unit and integration test on the `@mozilla/glean` library.

### `sample-webext-test`

Runs unit tests on the Glean.js sample apps.

### `check-size`

_Requires approval_.
Expand Down
4 changes: 0 additions & 4 deletions docs/reference/compat.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ All of the listed versions are explicitly tested.

The Opera and Brave browsers are not explicitly tested, however are unofficially supported
as Chromium based browsers.

## Web Extensions

> TODO: see [Bug 1752549](https://bugzilla.mozilla.org/show_bug.cgi?id=1752549)
7 changes: 1 addition & 6 deletions glean/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@
"./plugins/*": "./dist/plugins/*.js",
"./uploader": "./dist/core/upload/uploader.js",
"./testing": "./dist/core/testing/index.js",
"./webext": "./dist/entry/webext.js",
"./web": "./dist/entry/web.js"
},
"typesVersions": {
"*": {
"webext": [
"./dist/types/entry/webext.d.ts"
],
"web": [
"./dist/types/entry/web.d.ts"
],
Expand Down Expand Up @@ -58,8 +54,7 @@
"test:unit": "run-s test:unit:core test:unit:platform test:unit:plugins",
"test:unit:core": "npm run test:base -- \"tests/unit/core/**/*.spec.ts\" --recursive",
"test:unit:plugins": "npm run test:base -- \"tests/unit/plugins/**/*.spec.ts\" --recursive",
"test:unit:platform": "npm run test:base -- \"tests/unit/platform/**/*.spec.ts\" --recursive --timeout 0 --exclude tests/unit/platform/utils/webext/sample/node_modules/**/*.spec.ts",
"pretest:unit:platform": "cd tests/unit/platform/utils/webext/sample/ && npm install && npm run build:xpi",
"test:unit:platform": "npm run test:base -- \"tests/unit/platform/**/*.spec.ts\" --recursive --timeout 0",
"test:base": "node --experimental-modules --experimental-specifier-resolution=node --loader=ts-node/esm node_modules/mocha/lib/cli/cli.js",
"lint": "run-s lint:eslint lint:circular-deps lint:glinter",
"lint:eslint": "eslint . --ext .ts,.js,.json --max-warnings=0",
Expand Down
9 changes: 0 additions & 9 deletions glean/src/entry/webext.ts

This file was deleted.

19 changes: 0 additions & 19 deletions glean/src/platform/browser/webext/index.ts

This file was deleted.

48 changes: 0 additions & 48 deletions glean/src/platform/browser/webext/platform_info.ts

This file was deleted.

Loading