Skip to content

Commit 1e6e171

Browse files
Release build 11.36.0 [ci release]
1 parent bbb8b1b commit 1e6e171

File tree

47 files changed

+572
-254
lines changed

Some content is hidden

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

47 files changed

+572
-254
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
git add -f . ':!CHANGELOG.txt' ':!node_modules'
6868
6969
- name: Commit build files
70-
uses: stefanzweifel/git-auto-commit-action@v5
70+
uses: stefanzweifel/git-auto-commit-action@v7
7171
with:
7272
commit_message: 'Release build ${{ github.event.inputs.version }} [ci release]'
7373
commit_options: '--allow-empty'

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
# Initializes the CodeQL tools for scanning.
3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v3
34+
uses: github/codeql-action/init@v4
3535
with:
3636
languages: ${{ matrix.language }}
3737
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -51,4 +51,4 @@ jobs:
5151
# make release
5252

5353
- name: Perform CodeQL Analysis
54-
uses: github/codeql-action/analyze@v3
54+
uses: github/codeql-action/analyze@v4

CHANGELOG.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
- Page collection support shadow dom and frames (#2002)
1+
- Improve logging for features (#2004)
2+
- Fix duckAi selection by checking subdomains (#2005)
3+
- Improve file annotation to include the inject name (#2003)
4+
- Add Robert to CODEOWNERS entry for page-context.js (#2012)
5+
- build(deps-dev): bump web-ext from 8.10.0 to 9.0.0 (#2007)
6+
- build(deps): bump github/codeql-action from 3 to 4 (#2009)
7+
- build(deps): bump stefanzweifel/git-auto-commit-action from 5 to 7 (#2010)
8+
- build(deps-dev): bump @typescript-eslint/eslint-plugin (#2008)

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ injected/src/features/click-to-load.js @duckduckgo/content-scope-scripts-owners
1111
injected/src/features/click-to-load/ @duckduckgo/content-scope-scripts-owners @kzar @ladamski @franfaccin @jonathanKingston @shakyShane
1212
injected/src/locales/click-to-load/ @duckduckgo/content-scope-scripts-owners @kzar @ladamski @franfaccin @jonathanKingston @shakyShane
1313
injected/src/features/autofill-import.js @duckduckgo/content-scope-scripts-owners @dbajpeyi
14+
injected/src/features/page-context.js @duckduckgo/content-scope-scripts-owners @noisysocks
1415

1516
# Broker protection
1617
injected/src/features/broker-protection.js @duckduckgo/content-scope-scripts-owners @duckduckgo/injected-broker-protection

build/android/adsjsContentScope.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! © DuckDuckGo ContentScopeScripts protections https://github.com/duckduckgo/content-scope-scripts/ */
1+
/*! © DuckDuckGo ContentScopeScripts android-adsjs https://github.com/duckduckgo/content-scope-scripts/ */
22
"use strict";
33
(() => {
44
var __defProp = Object.defineProperty;
@@ -41,6 +41,10 @@
4141
var Map2 = globalThis.Map;
4242
var Error2 = globalThis.Error;
4343
var randomUUID = globalThis.crypto?.randomUUID?.bind(globalThis.crypto);
44+
var console2 = globalThis.console;
45+
var consoleLog = console2.log.bind(console2);
46+
var consoleWarn = console2.warn.bind(console2);
47+
var consoleError = console2.error.bind(console2);
4448

4549
// src/utils.js
4650
var globalObj = typeof window === "undefined" ? globalThis : window;
@@ -3547,21 +3551,21 @@
35473551
return () => {
35483552
};
35493553
}
3550-
return console.log.bind(console, prefix);
3554+
return consoleLog.bind(console, prefix);
35513555
},
35523556
get warn() {
35533557
if (!shouldLog) {
35543558
return () => {
35553559
};
35563560
}
3557-
return console.warn.bind(console, prefix);
3561+
return consoleWarn.bind(console, prefix);
35583562
},
35593563
get error() {
35603564
if (!shouldLog) {
35613565
return () => {
35623566
};
35633567
}
3564-
return console.error.bind(console, prefix);
3568+
return consoleError.bind(console, prefix);
35653569
}
35663570
};
35673571
}

build/android/autofillImport.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! © DuckDuckGo ContentScopeScripts protections https://github.com/duckduckgo/content-scope-scripts/ */
1+
/*! © DuckDuckGo ContentScopeScripts android-autofill-import https://github.com/duckduckgo/content-scope-scripts/ */
22
"use strict";
33
(() => {
44
var __create = Object.create;
@@ -1564,6 +1564,10 @@
15641564
var Map2 = globalThis.Map;
15651565
var Error2 = globalThis.Error;
15661566
var randomUUID = globalThis.crypto?.randomUUID?.bind(globalThis.crypto);
1567+
var console2 = globalThis.console;
1568+
var consoleLog = console2.log.bind(console2);
1569+
var consoleWarn = console2.warn.bind(console2);
1570+
var consoleError = console2.error.bind(console2);
15671571

15681572
// src/utils.js
15691573
var globalObj = typeof window === "undefined" ? globalThis : window;
@@ -5130,21 +5134,21 @@
51305134
return () => {
51315135
};
51325136
}
5133-
return console.log.bind(console, prefix);
5137+
return consoleLog.bind(console, prefix);
51345138
},
51355139
get warn() {
51365140
if (!shouldLog) {
51375141
return () => {
51385142
};
51395143
}
5140-
return console.warn.bind(console, prefix);
5144+
return consoleWarn.bind(console, prefix);
51415145
},
51425146
get error() {
51435147
if (!shouldLog) {
51445148
return () => {
51455149
};
51465150
}
5147-
return console.error.bind(console, prefix);
5151+
return consoleError.bind(console, prefix);
51485152
}
51495153
};
51505154
}

build/android/brokerProtection.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! © DuckDuckGo ContentScopeScripts protections https://github.com/duckduckgo/content-scope-scripts/ */
1+
/*! © DuckDuckGo ContentScopeScripts android-broker-protection https://github.com/duckduckgo/content-scope-scripts/ */
22
"use strict";
33
(() => {
44
var __create = Object.create;
@@ -1564,6 +1564,10 @@
15641564
var Map2 = globalThis.Map;
15651565
var Error2 = globalThis.Error;
15661566
var randomUUID = globalThis.crypto?.randomUUID?.bind(globalThis.crypto);
1567+
var console2 = globalThis.console;
1568+
var consoleLog = console2.log.bind(console2);
1569+
var consoleWarn = console2.warn.bind(console2);
1570+
var consoleError = console2.error.bind(console2);
15671571

15681572
// src/utils.js
15691573
var globalObj = typeof window === "undefined" ? globalThis : window;
@@ -5099,21 +5103,21 @@
50995103
return () => {
51005104
};
51015105
}
5102-
return console.log.bind(console, prefix);
5106+
return consoleLog.bind(console, prefix);
51035107
},
51045108
get warn() {
51055109
if (!shouldLog) {
51065110
return () => {
51075111
};
51085112
}
5109-
return console.warn.bind(console, prefix);
5113+
return consoleWarn.bind(console, prefix);
51105114
},
51115115
get error() {
51125116
if (!shouldLog) {
51135117
return () => {
51145118
};
51155119
}
5116-
return console.error.bind(console, prefix);
5120+
return consoleError.bind(console, prefix);
51175121
}
51185122
};
51195123
}

build/android/contentScope.js

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! © DuckDuckGo ContentScopeScripts protections https://github.com/duckduckgo/content-scope-scripts/ */
1+
/*! © DuckDuckGo ContentScopeScripts android https://github.com/duckduckgo/content-scope-scripts/ */
22
"use strict";
33
(() => {
44
var __create = Object.create;
@@ -824,6 +824,10 @@
824824
TypeError: () => TypeError2,
825825
URL: () => URL2,
826826
addEventListener: () => addEventListener,
827+
console: () => console2,
828+
consoleError: () => consoleError,
829+
consoleLog: () => consoleLog,
830+
consoleWarn: () => consoleWarn,
827831
customElementsDefine: () => customElementsDefine,
828832
customElementsGet: () => customElementsGet,
829833
dispatchEvent: () => dispatchEvent,
@@ -864,6 +868,10 @@
864868
var Map2 = globalThis.Map;
865869
var Error2 = globalThis.Error;
866870
var randomUUID = globalThis.crypto?.randomUUID?.bind(globalThis.crypto);
871+
var console2 = globalThis.console;
872+
var consoleLog = console2.log.bind(console2);
873+
var consoleWarn = console2.warn.bind(console2);
874+
var consoleError = console2.error.bind(console2);
867875

868876
// src/utils.js
869877
var globalObj = typeof window === "undefined" ? globalThis : window;
@@ -4939,21 +4947,21 @@
49394947
return () => {
49404948
};
49414949
}
4942-
return console.log.bind(console, prefix);
4950+
return consoleLog.bind(console, prefix);
49434951
},
49444952
get warn() {
49454953
if (!shouldLog) {
49464954
return () => {
49474955
};
49484956
}
4949-
return console.warn.bind(console, prefix);
4957+
return consoleWarn.bind(console, prefix);
49504958
},
49514959
get error() {
49524960
if (!shouldLog) {
49534961
return () => {
49544962
};
49554963
}
4956-
return console.error.bind(console, prefix);
4964+
return consoleError.bind(console, prefix);
49574965
}
49584966
};
49594967
}
@@ -6089,7 +6097,7 @@
60896097
// src/features/message-bridge/create-page-world-bridge.js
60906098
var captured = captured_globals_exports;
60916099
var ERROR_MSG = "Did not install Message Bridge";
6092-
function createPageWorldBridge(featureName, token) {
6100+
function createPageWorldBridge(featureName, token, context) {
60936101
if (typeof featureName !== "string" || !token) {
60946102
throw new captured.Error(ERROR_MSG);
60956103
}
@@ -6120,19 +6128,20 @@
61206128
if (!installed) {
61216129
throw new captured.Error(ERROR_MSG);
61226130
}
6123-
return createMessagingInterface(featureName, send, appendToken);
6131+
return createMessagingInterface(featureName, send, appendToken, context);
61246132
}
61256133
function random() {
61266134
if (typeof captured.randomUUID !== "function") throw new Error("unreachable");
61276135
return captured.randomUUID();
61286136
}
6129-
function createMessagingInterface(featureName, send, appendToken) {
6137+
function createMessagingInterface(featureName, send, appendToken, context) {
61306138
return {
61316139
/**
61326140
* @param {string} method
61336141
* @param {Record<string, any>} params
61346142
*/
61356143
notify(method, params) {
6144+
context?.log.info("sending notify", method, params);
61366145
send(
61376146
new ProxyNotification({
61386147
method,
@@ -6147,6 +6156,7 @@
61476156
* @returns {Promise<any>}
61486157
*/
61496158
request(method, params) {
6159+
context?.log.info("sending request", method, params);
61506160
const id = random();
61516161
send(
61526162
new ProxyRequest({
@@ -6159,6 +6169,7 @@
61596169
return new Promise((resolve, reject) => {
61606170
const responseName = appendToken(ProxyResponse.NAME + "-" + id);
61616171
const handler = (e) => {
6172+
context?.log.info("received response", e.detail);
61626173
const response = ProxyResponse.create(e.detail);
61636174
if (response && response.id === id) {
61646175
if ("error" in response && response.error) {
@@ -6179,6 +6190,7 @@
61796190
*/
61806191
subscribe(name, callback) {
61816192
const id = random();
6193+
context?.log.info("subscribing", name);
61826194
send(
61836195
new SubscriptionRequest({
61846196
subscriptionName: name,
@@ -6187,6 +6199,7 @@
61876199
})
61886200
);
61896201
const handler = (e) => {
6202+
context?.log.info("received subscription response", e.detail);
61906203
const subscriptionEvent = SubscriptionResponse.create(e.detail);
61916204
if (subscriptionEvent) {
61926205
const { id: eventId, params } = subscriptionEvent;
@@ -6225,6 +6238,7 @@
62256238
if (!args.platform || !args.platform.name) {
62266239
return;
62276240
}
6241+
const context = this;
62286242
this.defineProperty(Navigator.prototype, "duckduckgo", {
62296243
value: {
62306244
platform: args.platform.name,
@@ -6240,7 +6254,7 @@
62406254
createMessageBridge(featureName) {
62416255
const existingBridge = store[featureName];
62426256
if (existingBridge) return existingBridge;
6243-
const bridge = createPageWorldBridge(featureName, args.messageSecret);
6257+
const bridge = createPageWorldBridge(featureName, args.messageSecret, context);
62446258
store[featureName] = bridge;
62456259
return bridge;
62466260
}

build/android/pages/duckplayer/dist/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,10 @@
855855
var Map2 = globalThis.Map;
856856
var Error2 = globalThis.Error;
857857
var randomUUID = globalThis.crypto?.randomUUID?.bind(globalThis.crypto);
858+
var console2 = globalThis.console;
859+
var consoleLog = console2.log.bind(console2);
860+
var consoleWarn = console2.warn.bind(console2);
861+
var consoleError = console2.error.bind(console2);
858862

859863
// ../injected/src/utils.js
860864
var globalObj = typeof window === "undefined" ? globalThis : window;

0 commit comments

Comments
 (0)