Skip to content
Open
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
21 changes: 16 additions & 5 deletions .github/workflows/size-impact/generate-size-snapshot.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
import { generateSnapshotFile } from "@jsenv/github-pull-request-filesize-impact";
import {
generateSnapshotFile,
none,
gzip,
brotli,
} from "@jsenv/github-pull-request-filesize-impact";

generateSnapshotFile({
logLevel: "debug",
projectDirectoryUrl: new URL("../../../", import.meta.url),
snapshotFileRelativeUrl: process.argv[2],
directorySizeTrackingConfig: {
dist: {
"**/*": true,
"**/*.map": false,
trackingConfig: {
core: {
"./dist/*": true,
"./dist/*.map": false,
},
extras: {
"./dist/extras/**/*.js": true,
"./dist/extras/**/*.map": false,
},
},
transformations: { none, gzip, brotli },
});
4 changes: 3 additions & 1 deletion .github/workflows/size-impact/report-size-impact.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { reportSizeImpactIntoGithubPullRequest } from "@jsenv/github-pull-request-filesize-impact";

reportSizeImpactIntoGithubPullRequest({
logLevel: "debug",
projectDirectoryUrl: new URL("../../../", import.meta.url),
baseSnapshotFileRelativeUrl: process.argv[2],
headSnapshotFileRelativeUrl: process.argv[3],
generatedByLink: false,
commentSections: { fileByFileImpact: true },
generatedByLink: true,
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dist"
],
"devDependencies": {
"@jsenv/github-pull-request-filesize-impact": "^2.6.0",
"@jsenv/github-pull-request-filesize-impact": "^3.0.2",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"@rollup/plugin-replace": "^2.3.1",
Expand Down
9 changes: 5 additions & 4 deletions src/system-core.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SystemJS Core
*
*
* Provides
* - System.import
* - System.register support for
Expand All @@ -10,7 +10,7 @@
* - Symbol.toStringTag support in Module objects
* - Hookable System.createContext to customize import.meta
* - System.onload(err, id, deps) handler for tracing / hot-reloading
*
*
* Core comes with no System.prototype.resolve or
* System.prototype.instantiate implementations
*/
Expand Down Expand Up @@ -79,9 +79,10 @@ function getOrCreateLoad (loader, id, firstParentUrl) {

var importerSetters = [];
var ns = Object.create(null);
var toStringTagValue = 'Module'
if (toStringTag)
Object.defineProperty(ns, toStringTag, { value: 'Module' });
Object.defineProperty(ns, toStringTag, { value: toStringTagValue });

var instantiatePromise = Promise.resolve()
.then(function () {
return loader.instantiate(id, firstParentUrl);
Expand Down