Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: Add patch to remove slicing logs on build #409

Closed
wants to merge 2 commits into from
Closed
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"fastboot@4.1.0": "patches/fastboot@4.1.0.patch",
"@types/eventsource@1.1.11": "patches/@types__eventsource@1.1.11.patch",
"matrix-js-sdk@25.0.0": "patches/matrix-js-sdk@25.0.0.patch",
"style-loader@2.0.0": "patches/style-loader@2.0.0.patch"
"style-loader@2.0.0": "patches/style-loader@2.0.0.patch",
"ember-source@4.12.0": "patches/ember-source@4.12.0.patch"
}
},
"devDependencies": {
Expand Down
75 changes: 75 additions & 0 deletions patches/ember-source@4.12.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 48f31b2e46b5f9d084ee0d98f630868bc999a639..0000000000000000000000000000000000000000
diff --git a/dist/ember-template-compiler.js b/dist/ember-template-compiler.js
index ad57835740cf3a5d7ed718daa40099652652ffed..18dfab820bff3c438b6c39c1de69dd1721d6568a 100644
--- a/dist/ember-template-compiler.js
+++ b/dist/ember-template-compiler.js
@@ -11772,13 +11772,30 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
}
}
attr(m) {
+ var UNKNOWN_POSITION = Object.freeze({
+ line: 1,
+ column: 0
+ });
+ var SYNTHETIC_LOCATION = Object.freeze({
+ source: '(synthetic)',
+ start: UNKNOWN_POSITION,
+ end: UNKNOWN_POSITION
+ });
if (m.name === '...attributes') {
return this.ctx.builder.splatAttr(this.ctx.table.allocateBlock('attrs'), this.ctx.loc(m.loc));
}
var offsets = this.ctx.loc(m.loc);
- var nameSlice = offsets.sliceStartChars({
- chars: m.name.length
- }).toSlice(m.name);
+ var synthetic_loc = JSON.stringify(SYNTHETIC_LOCATION);
+ var nameSlice;
+ // Don't try to pull synthetic attributes from the source
+ if (JSON.stringify(offsets) === JSON.stringify(synthetic_loc)) {
+ nameSlice = new SourceSlice({
+ loc: offsets,
+ chars: m.name
+ });
+ } else {
+ nameSlice = offsets.sliceStartChars({ chars: m.name.length }).toSlice(m.name);
+ }
var value = this.attrValue(m.value);
return this.ctx.builder.attr({
name: nameSlice,
@@ -11830,10 +11847,27 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
};
}
arg(arg) {
+ var UNKNOWN_POSITION = Object.freeze({
+ line: 1,
+ column: 0
+ });
+ var SYNTHETIC_LOCATION = Object.freeze({
+ source: '(synthetic)',
+ start: UNKNOWN_POSITION,
+ end: UNKNOWN_POSITION
+ });
var offsets = this.ctx.loc(arg.loc);
- var nameSlice = offsets.sliceStartChars({
- chars: arg.name.length
- }).toSlice(arg.name);
+ var synthetic_loc = JSON.stringify(SYNTHETIC_LOCATION);
+ var nameSlice;
+ // Don't try to pull synthetic arguments from the source
+ if (JSON.stringify(offsets) === JSON.stringify(synthetic_loc)) {
+ nameSlice = new SourceSlice({
+ loc: offsets,
+ chars: arg.name
+ });
+ } else {
+ nameSlice = offsets.sliceStartChars({ chars: arg.name.length }).toSlice(arg.name);
+ }
var value = this.maybeDeprecatedCall(nameSlice, arg.value) || this.attrValue(arg.value);
return this.ctx.builder.arg({
name: nameSlice,
diff --git a/dist/packages/@ember/-internals/runtime/.gitignore b/dist/packages/@ember/-internals/runtime/.gitignore
deleted file mode 100644
index a1136368651e6eb6d0d93a09c478f4978f4196fa..0000000000000000000000000000000000000000
61 changes: 33 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading