Skip to content

Commit

Permalink
Merge pull request #127 from duckduckgo/10-12-esbuild_2021_target_to_…
Browse files Browse the repository at this point in the history
…match_C-S-S

esbuild: 2021 target to match C-S-S
  • Loading branch information
shakyShane authored Oct 12, 2023
2 parents 26cf7d3 + ab5e422 commit cad173f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
39 changes: 23 additions & 16 deletions build/app/public/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
Expand Down Expand Up @@ -33,6 +34,10 @@
mod2
));
var __toCommonJS = (mod2) => __copyProps(__defProp({}, "__esModule", { value: true }), mod2);
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};

// node_modules/jquery/dist/jquery.js
var require_jquery = __commonJS({
Expand Down Expand Up @@ -10775,12 +10780,14 @@
};
};
AggregatedCompanyResponseData = class {
/** @type {number} */
entitiesCount = 0;
/** @type {number} */
requestCount = 0;
/** @type {Record<string, AggregateCompanyData>} */
entities = {};
constructor() {
/** @type {number} */
__publicField(this, "entitiesCount", 0);
/** @type {number} */
__publicField(this, "requestCount", 0);
/** @type {Record<string, AggregateCompanyData>} */
__publicField(this, "entities", {});
}
/**
* @param {import('../../../../schema/__generated__/schema.types.js').DetectedRequest} request
*/
Expand Down Expand Up @@ -10845,20 +10852,20 @@
protectionsOff_allowedTrackers_allowedNonTrackers: "protectionsOff_allowedTrackers_allowedNonTrackers"
};
RequestDetails = class {
surrogates;
all = new AggregatedCompanyResponseData();
blocked = new AggregatedCompanyResponseData();
allowed = {
adClickAttribution: new AggregatedCompanyResponseData(),
ownedByFirstParty: new AggregatedCompanyResponseData(),
ruleException: new AggregatedCompanyResponseData(),
protectionDisabled: new AggregatedCompanyResponseData(),
otherThirdPartyRequest: new AggregatedCompanyResponseData()
};
/**
* @param {string[]} surrogates - any installed surrogates, just the domains
*/
constructor(surrogates) {
__publicField(this, "surrogates");
__publicField(this, "all", new AggregatedCompanyResponseData());
__publicField(this, "blocked", new AggregatedCompanyResponseData());
__publicField(this, "allowed", {
adClickAttribution: new AggregatedCompanyResponseData(),
ownedByFirstParty: new AggregatedCompanyResponseData(),
ruleException: new AggregatedCompanyResponseData(),
protectionDisabled: new AggregatedCompanyResponseData(),
otherThirdPartyRequest: new AggregatedCompanyResponseData()
});
this.surrogates = surrogates;
}
/**
Expand Down
2 changes: 2 additions & 0 deletions scripts/bundle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ async function init() {
await esbuild.build({
entryPoints: [manifest.base.input],
bundle: true,
target: ['es2021'],
outfile: manifest.base.output,
sourcemap: debug ? 'linked' : undefined,
dropLabels: IS_PROD ? ['$TEST'] : [],
Expand All @@ -53,6 +54,7 @@ async function init() {

await esbuild.build({
entryPoints: [manifest.polyfills.input],
target: ['es2021'],
bundle: true,
outfile: manifest.polyfills.output,
sourcemap: debug ? 'linked' : undefined,
Expand Down

0 comments on commit cad173f

Please sign in to comment.