Skip to content

Commit d79970f

Browse files
authored
Merge pull request #9 from tc39/update-build-deploy
Update build & deploy
2 parents 8b5c2ff + ad1cfbf commit d79970f

File tree

4 files changed

+19
-69
lines changed

4 files changed

+19
-69
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1111
- uses: ljharb/actions/node/install@main
1212
name: 'nvm install lts/* && npm install'
1313
with:
1414
node-version: lts/*
15-
- run: npm run build
15+
- run: npm run build

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- uses: ljharb/actions/node/install@main
1515
name: 'nvm install lts/* && npm install'
1616
with:
1717
node-version: lts/*
1818
- run: npm run build
19-
- uses: JamesIves/github-pages-deploy-action@v4.3.3
19+
- uses: JamesIves/github-pages-deploy-action@v4
2020
with:
2121
branch: gh-pages
2222
folder: build
23-
clean: true
23+
clean: true

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"start": "npm run build-loose -- --watch",
77
"build": "npm run build-loose -- --strict",
8-
"build-loose": "node -e 'fs.mkdirSync(\"build\", { recursive: true })' && ecmarkup --load-biblio @tc39/ecma262-biblio --verbose spec.emu build/index.html --lint-spec"
8+
"build-loose": "ecmarkup --load-biblio @tc39/ecma262-biblio --verbose spec.emu index.html --lint-spec"
99
},
1010
"homepage": "https://github.com/tc39/template-for-proposals#readme",
1111
"repository": {
@@ -14,8 +14,8 @@
1414
},
1515
"license": "MIT",
1616
"devDependencies": {
17-
"@tc39/ecma262-biblio": "^2.1.2775",
18-
"ecmarkup": "^20.0.0"
17+
"@tc39/ecma262-biblio": "^2.1.2857",
18+
"ecmarkup": "^21.0.0"
1919
},
2020
"engines": {
2121
"node": ">= 12"

spec.emu

Lines changed: 11 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ contributors: Guy Bedford, Marco Ippolito
8484
<dd>a module namespace exotic object _O_</dd>
8585
</dl>
8686
<emu-alg>
87-
1. If <del>_P_ is a Symbol</del>IsSymbolLikeNamespaceKey(_P_, _O_) is *true*, return OrdinaryGetOwnProperty(_O_, _P_).
88-
1. Let _exports_ be <del>_O_.[[Exports]]</del>? GetModuleExportsList(_O_).
87+
1. If IsSymbolLikeNamespaceKey(_P_, _O_) is *true*, return OrdinaryGetOwnProperty(_O_, _P_).
88+
1. Let _exports_ be ? GetModuleExportsList(_O_).
8989
1. If _exports_ does not contain _P_, return *undefined*.
9090
1. Let _value_ be ? _O_.[[Get]](_P_, _O_).
9191
1. Return PropertyDescriptor { [[Value]]: _value_, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: *false* }.
@@ -104,7 +104,7 @@ contributors: Guy Bedford, Marco Ippolito
104104
<dd>a module namespace exotic object _O_</dd>
105105
</dl>
106106
<emu-alg>
107-
1. If <del>_P_ is a Symbol</del>IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryDefineOwnProperty(_O_, _P_, _Desc_).
107+
1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryDefineOwnProperty(_O_, _P_, _Desc_).
108108
1. Let _current_ be ? _O_.[[GetOwnProperty]](_P_).
109109
1. NOTE: If _O_.[[Deferred]] is *true*, the step above will ensure that the module is evaluated.
110110
1. If _current_ is *undefined*, return *false*.
@@ -128,8 +128,8 @@ contributors: Guy Bedford, Marco Ippolito
128128
<dd>a module namespace exotic object _O_</dd>
129129
</dl>
130130
<emu-alg>
131-
1. If <del>_P_ is a Symbol</del>IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryHasProperty(_O_, _P_).
132-
1. Let _exports_ be <del>_O_.[[Exports]]</del>? GetModuleExportsList(_O_).
131+
1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryHasProperty(_O_, _P_).
132+
1. Let _exports_ be ? GetModuleExportsList(_O_).
133133
1. If _exports_ contains _P_, return *true*.
134134
1. Return *false*.
135135
</emu-alg>
@@ -147,8 +147,8 @@ contributors: Guy Bedford, Marco Ippolito
147147
<dd>a module namespace exotic object _O_</dd>
148148
</dl>
149149
<emu-alg>
150-
1. If <del>_P_ is a Symbol</del>IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_).
151-
1. Let _exports_ be <del>_O_.[[Exports]]</del>? GetModuleExportsList(_O_).
150+
1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_).
151+
1. Let _exports_ be ? GetModuleExportsList(_O_).
152152
1. If _exports_ does not contain _P_, return *undefined*.
153153
1. Let _m_ be _O_.[[Module]].
154154
1. Let _binding_ be _m_.ResolveExport(_P_).
@@ -195,8 +195,8 @@ contributors: Guy Bedford, Marco Ippolito
195195
<dd>a module namespace exotic object _O_</dd>
196196
</dl>
197197
<emu-alg>
198-
1. If <del>_P_ is a Symbol</del>IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryDelete(_O_, _P_).
199-
1. Let _exports_ be <del>_O_.[[Exports]]</del>? GetModuleExportsList(_O_).
198+
1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryDelete(_O_, _P_).
199+
1. Let _exports_ be ? GetModuleExportsList(_O_).
200200
1. If _exports_ contains _P_, return *false*.
201201
1. Return *true*.
202202
</emu-alg>
@@ -209,7 +209,7 @@ contributors: Guy Bedford, Marco Ippolito
209209
<dd>a module namespace exotic object _O_</dd>
210210
</dl>
211211
<emu-alg>
212-
1. Let _exports_ be <del>_O_.[[Exports]]</del>? GetModuleExportsList(_O_).
212+
1. Let _exports_ be ? GetModuleExportsList(_O_).
213213
1. If _O_.[[Deferred]] is *true*, and _exports_ contains *"then"*, then
214214
1. Set _exports_ to a copy of _exports_.
215215
1. Remove *"then"* from _exports_.
@@ -231,14 +231,12 @@ contributors: Guy Bedford, Marco Ippolito
231231
<dd>It is used to specify the creation of new module namespace exotic objects.</dd>
232232
</dl>
233233
<emu-alg>
234-
1. <del>Assert: _module_.[[Namespace]] is ~empty~.</del>
235234
1. Let _internalSlotsList_ be the internal slots listed in <emu-xref href="#table-internal-slots-of-module-namespace-exotic-objects"></emu-xref>.
236235
1. Let _M_ be MakeBasicObject(_internalSlotsList_).
237236
1. Set _M_'s essential internal methods to the definitions specified in <emu-xref href="#sec-module-namespace-exotic-objects"></emu-xref>.
238237
1. Set _M_.[[Module]] to _module_.
239238
1. [declared="comparefn"] Let _sortedExports_ be a List whose elements are the elements of _exports_ ordered as if an Array of the same values had been sorted using %Array.prototype.sort% using *undefined* as _comparefn_.
240239
1. Set _M_.[[Exports]] to _sortedExports_.
241-
1. <del>Create own properties of _M_ corresponding to the definitions in <emu-xref href="#sec-module-namespace-objects"></emu-xref>.</del>
242240
1. If _phase_ is ~defer~, then
243241
1. Assert: _module_.[[DeferredNamespace]] is ~empty~.
244242
1. Set _module_.[[DeferredNamespace]] to _M_.
@@ -327,8 +325,6 @@ contributors: Guy Bedford, Marco Ippolito
327325
<h2>Syntax</h2>
328326
<emu-grammar type="definition">
329327
ImportCall[Yield, Await] :
330-
<del>`import` `(` AssignmentExpression[+In, ?Yield, ?Await] `,`? `)`</del>
331-
<del>`import` `(` AssignmentExpression[+In, ?Yield, ?Await] `,` AssignmentExpression[+In, ?Yield, ?Await] `,`? `)`</del>
332328
`import` ImportCallArguments[?Yield, ?Await]
333329
`import` `.` `defer` ImportCallArguments[?Yield, ?Await]
334330

@@ -349,16 +345,6 @@ contributors: Guy Bedford, Marco Ippolito
349345
<emu-clause id="sec-import-call-runtime-semantics-evaluation" type="sdo">
350346
<h1>Runtime Semantics: Evaluation</h1>
351347

352-
<emu-grammar><del>ImportCall : `import` `(` AssignmentExpression `,`? `)`</del></emu-grammar>
353-
<emu-alg>
354-
1. <del>Return ? EvaluateImportCall(|AssignmentExpression|).</del>
355-
</emu-alg>
356-
357-
<emu-grammar><del>ImportCall : `import` `(` AssignmentExpression `,` AssignmentExpression `,`? `)`</del></emu-grammar>
358-
<emu-alg>
359-
1. <del>Return ? EvaluateImportCall(the first |AssignmentExpression|, the second |AssignmentExpression|).</del>
360-
</emu-alg>
361-
362348
<emu-grammar>ImportCall : `import` ImportCallArguments</emu-grammar>
363349
<emu-alg>
364350
1. Return ? EvaluateImportCall(|ImportCallArguments|, ~evaluation~).
@@ -406,21 +392,13 @@ contributors: Guy Bedford, Marco Ippolito
406392
EvaluateImportCall (
407393
_arguments_: a Parse Node,
408394
_phase_: ~defer~ or ~evaluation~,
409-
<del>_specifierExpression_: a Parse Node,</del>
410-
<del>optional _optionsExpression_: a Parse Node,</del>
411395
): either a normal completion containing a Promise or an abrupt completion
412396
</h1>
413397
<dl class="header"></dl>
414398
<emu-alg>
415399
1. Let _referrer_ be GetActiveScriptOrModule().
416400
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
417-
1. <del>Let _specifierRef_ be ? Evaluation of _specifierExpression_.</del>
418401
1. Let _specifier_ be ? <del>GetValue(_specifierRef_)</del>EvaluateImportCallSpecifier of _arguments_.
419-
1. <del>If _optionsExpression_ is present, then</del>
420-
1. <del>Let _optionsRef_ be ? Evaluation of _optionsExpression_.</del>
421-
1. <del>Let _options_ be ? GetValue(_optionsRef_).</del>
422-
1. <del>Else,</del>
423-
1. <del>Let _options_ be *undefined*.</del>
424402
1. Let _options_ be ? EvaluateImportCallOptions of _arguments_.
425403
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
426404
1. Let _specifierString_ be Completion(ToString(_specifier_)).
@@ -482,7 +460,6 @@ contributors: Guy Bedford, Marco Ippolito
482460
1. If _link_ is an abrupt completion, then
483461
1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, &laquo; _link_.[[Value]] &raquo;).
484462
1. Return ~unused~.
485-
1. <del>Let _evaluatePromise_ be _module_.Evaluate().</del>
486463
1. Let _fulfilledClosure_ be a new Abstract Closure with no parameters that captures _module_, _phase_, and _promiseCapability_ and performs the following steps when called:
487464
1. Let _namespace_ be GetModuleNamespace(_module_, _phase_).
488465
1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, &laquo; _namespace_ &raquo;).
@@ -677,10 +654,6 @@ contributors: Guy Bedford, Marco Ippolito
677654
1. Let _attributes_ be WithClauseToAttributes of |WithClause|.
678655
1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Attributes]]: _attributes_, [[Phase]]: ~defer~ }.
679656
</emu-alg>
680-
<emu-grammar><del>ModuleSpecifier : StringLiteral</del></emu-grammar>
681-
<emu-alg>
682-
1. <del>Return a List whose sole element is the SV of |StringLiteral|.</del>
683-
</emu-alg>
684657
<emu-grammar>
685658
ExportDeclaration : `export` ExportFromClause FromClause `;`
686659
</emu-grammar>
@@ -856,7 +829,6 @@ contributors: Guy Bedford, Marco Ippolito
856829
</dl>
857830

858831
<emu-alg>
859-
1. <del>Assert: This call to Evaluate is not happening at the same time as another call to Evaluate within the surrounding agent.</del>.
860832
1. Assert: None of _module_ or any of its recursive dependencies have [[Status]] set to ~evaluating~, ~linking~, ~unlinked~, or ~new~.
861833
1. Assert: _module_.[[Status]] is one of ~linked~, ~evaluating-async~, or ~evaluated~.
862834
1. If _module_.[[Status]] is either ~evaluating-async~ or ~evaluated~, set _module_ to _module_.[[CycleRoot]].
@@ -899,10 +871,6 @@ contributors: Guy Bedford, Marco Ippolito
899871

900872
<emu-alg>
901873
1. If _module_ is not a Cyclic Module Record, then
902-
1. <del>Let _promise_ be ! _module_.Evaluate().</del>
903-
1. <del>Assert: _promise_.[[PromiseState]] is not ~pending~.</del>
904-
1. <del>If _promise_.[[PromiseState]] is ~rejected~, then</del>
905-
1. <del>Return ThrowCompletion(_promise_.[[PromiseResult]]).</del>
906874
1. Perform ? EvaluateSync(_module_).
907875
1. Return _index_.
908876
1. If _module_.[[Status]] is either ~evaluating-async~ or ~evaluated~, then
@@ -926,8 +894,6 @@ contributors: Guy Bedford, Marco Ippolito
926894
1. Else if _evaluationList_ does not contain _requiredModule_, then
927895
1. Append _requiredModule_ to _evaluationList_.
928896
1. Append _module_ to _stack_.
929-
1. <del>For each ModuleRequest Record _request_ of _module_.[[RequestedModules]], do</del>
930-
1. <del>Let _requiredModule_ be GetImportedModule(_module_, _request_).</del>
931897
1. For each Module Record _requiredModule_ of _evaluationList_, do
932898
1. Set _index_ to ? InnerModuleEvaluation(_requiredModule_, _stack_, _index_).
933899
1. If _requiredModule_ is a Cyclic Module Record, then
@@ -1904,7 +1870,7 @@ contributors: Guy Bedford, Marco Ippolito
19041870
</emu-alg>
19051871
<emu-grammar>ImportDeclaration : `import` ImportClause FromClause WithClause? `;`</emu-grammar>
19061872
<emu-alg>
1907-
1. Let _module_ be <del>the sole element of ModuleRequests</del>SV of |FromClause|.
1873+
1. Let _module_ be SV of |FromClause|.
19081874
1. Return ImportEntriesForModule of |ImportClause| with arguments _module_.
19091875
</emu-alg>
19101876
<emu-grammar>ImportDeclaration : `import` `defer` NameSpaceImport FromClause WithClause? `;`</emu-grammar>
@@ -1920,19 +1886,3 @@ contributors: Guy Bedford, Marco Ippolito
19201886
</emu-clause>
19211887
</emu-clause>
19221888
</emu-clause>
1923-
1924-
<emu-clause id="sec-reflection" number="28">
1925-
<h1>Reflection</h1>
1926-
1927-
<emu-clause id="sec-module-namespace-objects" number="3">
1928-
<h1><del>Module Namespace Objects</del></h1>
1929-
<p><del>A Module Namespace Object is a module namespace exotic object that provides runtime property-based access to a module's exported bindings. There is no constructor function for Module Namespace Objects. Instead, such an object is created for each module that is imported by an |ImportDeclaration| that contains a |NameSpaceImport|.</del></p>
1930-
<p><del>In addition to the properties specified in <emu-xref href="#sec-module-namespace-exotic-objects"></emu-xref> each Module Namespace Object has the following own property:</del></p>
1931-
1932-
<emu-clause oldids="sec-@@tostringtag" id="sec-%symbol.tostringtag%">
1933-
<h1><del>%Symbol.toStringTag%</del></h1>
1934-
<p><del>The initial value of the %Symbol.toStringTag% property is the String value *"Module"*.</del></p>
1935-
<p><del>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.</del></p>
1936-
</emu-clause>
1937-
</emu-clause>
1938-
</emu-clause>

0 commit comments

Comments
 (0)