Skip to content

Commit 6b8a921

Browse files
committed
Remove current webext implementation
1 parent 457ab64 commit 6b8a921

40 files changed

+10
-16798
lines changed

.circleci/config.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -101,29 +101,6 @@ jobs:
101101
name: Build docs
102102
command: npm --prefix ./glean run build:docs
103103

104-
sample-webext-test:
105-
docker:
106-
- image: cimg/python:<< pipeline.parameters.python-version >>
107-
steps:
108-
- checkout
109-
- install-node
110-
- run:
111-
name: Install JavaScript dependencies for Glean
112-
command: npm --prefix ./glean install
113-
- run:
114-
name: Install Typescript dependencies for the TS web extension sample
115-
command: |
116-
npm --prefix ./samples/browser/webext install
117-
npm --prefix ./samples/browser/webext run link:glean
118-
- run:
119-
name: Build the TS web extension sample
120-
command: |
121-
npm --prefix ./samples/browser/webext run build
122-
- run:
123-
name: Run TS web extension sample test
124-
command: |
125-
export PATH=.:$PATH && npm --prefix ./samples/browser/webext run test
126-
127104
sample-node-test:
128105
docker:
129106
- image: cimg/python:<< pipeline.parameters.python-version >>
@@ -237,9 +214,6 @@ workflows:
237214
- test:
238215
requires:
239216
- build
240-
- sample-webext-test:
241-
requires:
242-
- test
243217
- sample-node-test:
244218
requires:
245219
- test
@@ -249,7 +223,6 @@ workflows:
249223
- lint
250224
- build
251225
- test
252-
- sample-webext-test
253226
- sample-node-test
254227
filters:
255228
branches:

.github/dependabot.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ updates:
88
directory: "/automation"
99
schedule:
1010
interval: "monthly"
11-
- package-ecosystem: "npm"
12-
directory: "/samples/browser/webext"
13-
schedule:
14-
interval: "monthly"
1511
- package-ecosystem: "npm"
1612
directory: "/samples/browser/web"
1713
schedule:
@@ -20,7 +16,3 @@ updates:
2016
directory: "/samples/node"
2117
schedule:
2218
interval: "monthly"
23-
- package-ecosystem: "npm"
24-
directory: "/glean/tests/unit/platform/utils/webext/sample"
25-
schedule:
26-
interval: "monthly"

ARCHITECTURE.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ An end-to-end data collection platform developed by Mozilla and primarily target
1616
Glean provides multiple client SDKs for different programming languages and platforms.
1717
One of the aspects that guide Glean SDK development is cross-platform consistency and the Glean
1818
JavaScript SDK is no exception to that. It is built to work on multiple JavaScript platforms --
19-
websites, web extensions, Node.js and QML as of the time of writing -- and to be easily extendable
19+
websites, Node.js and QML as of the time of writing -- and to be easily extendable
2020
to other platforms as well.
2121

2222
The Glean JavaScript SDK is the latest addition to the family of Glean SDKs. The other Glean SDKs,
@@ -40,10 +40,10 @@ storage. Each metric can have different [lifetimes](https://mozilla.github.io/gl
4040
and the SDK will manage its storage so that data does not remain in storage after it's lifetime is expired.
4141

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

46-
### async (Web Extensions, Node)
46+
### async (Node)
4747

4848
All of the SDKs tasks are queued and executed asynchronously. The APIs exposed by the Glean SDK will only do
4949
the en-queuing of tasks, a quick synchronous operation. Internally, the Glean SDK will handle the
@@ -104,7 +104,7 @@ To see all the exposed entry points, check out Glean.js' `package.json` file.
104104
### `entry/`
105105

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

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

124124
The storage module varies for each platform. The storage mechanism used by each platform is as follows:
125125
- `web` - [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage)
126-
- `webext` - [`storage`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage)
127126
- `Node` - None, everything is stored in memory
128127

129128
### `plugins/`

automation/size/report.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ import {
1414

1515
async function buildStatsMap() {
1616
return [
17-
{
18-
name: "Web Extension",
19-
max: await getCustomLibSize("webext", METRIC_TYPES, PLUGINS),
20-
min: await getCustomLibSize("webext")
21-
},
2217
{
2318
name: "Website",
2419
max: await getCustomLibSize("web", METRIC_TYPES, PLUGINS),

automation/size/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const METRIC_TYPES = [
3434

3535
export const PLUGINS = [ "encryption" ];
3636

37-
export const PLATFORMS = [ "web", "webext", "node" ];
37+
export const PLATFORMS = [ "web", "node" ];
3838

3939
const UNITS = ["bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
4040
/**
@@ -81,7 +81,7 @@ export function executeCmd(cmd) {
8181
*
8282
* Note: This function will use whatever `@mozilla/glean` package is linked at its runtime.
8383
*
84-
* @param {string} platform The platform to build for, supported platforms are: `web`, `webext` and `node`.
84+
* @param {string} platform The platform to build for, supported platforms are: `web`, and `node`.
8585
* @param {[string]} metrics An array of metric types. Supported metrics types are listed in `METRIC_TYPES`.
8686
* If not provided the final bundle won't contain any additional metric types.
8787
* @param {[string]} plugins An array of plugins. Supported plugins are listed in `PLUGINS`.

automation/size/webpack.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

55
export default (platform, entry) => {
6-
const target = platform === "node" ? "node"
7-
: ["webext", "web"].includes(platform) ? "web"
8-
: null;
6+
const target = platform === "node" ? "node" : platform === "web" ? "web" : null;
97

108
return {
119
target,

docs/reference/ci.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Runs all necessary lints on the code. This includes:
3737

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

40-
### `sample-webext-test`, `sample-node-test`
40+
### `sample-node-test`
4141

4242
Runs unit tests on the Glean.js sample apps.
4343

docs/reference/compat.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ All of the listed versions are explicitly tested.
2020
The Opera and Brave browsers are not explicitly tested, however are unofficially supported
2121
as Chromium based browsers.
2222

23-
## Web Extensions
24-
25-
> TODO: see [Bug 1752549](https://bugzilla.mozilla.org/show_bug.cgi?id=1752549)
26-
2723
## Node.js
2824

2925
> TODO: see [Bug 1752548](https://bugzilla.mozilla.org/show_bug.cgi?id=1752548)

glean/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@
1313
"./uploader": "./dist/core/upload/uploader.js",
1414
"./testing": "./dist/core/testing/index.js",
1515
"./node": "./dist/entry/node.js",
16-
"./webext": "./dist/entry/webext.js",
1716
"./web": "./dist/entry/web.js"
1817
},
1918
"typesVersions": {
2019
"*": {
21-
"webext": [
22-
"./dist/types/entry/webext.d.ts"
23-
],
2420
"node": [
2521
"./dist/types/entry/node.d.ts"
2622
],
@@ -62,8 +58,7 @@
6258
"test:unit": "run-s test:unit:core test:unit:platform test:unit:plugins",
6359
"test:unit:core": "npm run test:base -- \"tests/unit/core/**/*.spec.ts\" --recursive",
6460
"test:unit:plugins": "npm run test:base -- \"tests/unit/plugins/**/*.spec.ts\" --recursive",
65-
"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",
66-
"pretest:unit:platform": "cd tests/unit/platform/utils/webext/sample/ && npm install && npm run build:xpi",
61+
"test:unit:platform": "npm run test:base -- \"tests/unit/platform/**/*.spec.ts\" --recursive --timeout 0",
6762
"test:base": "node --experimental-modules --experimental-specifier-resolution=node --loader=ts-node/esm node_modules/mocha/lib/cli/cli.js",
6863
"lint": "run-s lint:eslint lint:circular-deps lint:glinter",
6964
"lint:eslint": "eslint . --ext .ts,.js,.json --max-warnings=0",

glean/src/entry/webext.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)