original:
let i = 0;
export let decrement = () => i--;
export let increment = () => i++;sharded:
original:
let i = 0;
export let decrement = () => i--;
export let increment = () => i++;sharded:
| > Using some sort of identifier in the code or using package.json, the combination approach. Why wouldn't it work for all? | |
| bmeck> Implementing it starts to have bad side effects | |
| consider this: make a file `my-first-script.js` | |
| run it as ESM | |
| thats an over simplification | |
| to clarify, why is package.json needed at all when it currently is not? | |
| you can npm install entire dep trees then remove all package.json files | |
| or lets look at a different problem in the impl of modules.root | |
| not in complexity, but in the effect it leaks |
| { | |
| false: true | |
| } |
| class Emitter { | |
| constructor() { | |
| this.watchers = new WeakMap; | |
| this.routes = new Map; | |
| } | |
| unwatch(thenable) { | |
| if (this.watchers.has(thenable)) { | |
| const {key} = this.watchers.get(thenable); | |
| this.watchers.delete(thenable); | |
| this.routes.delete(key); |
Every time the pipeline is started up a few things happen:
$toolname.local.
In the case of IPv6 ff01:b0:1d%lo0 should be preferred where lo0 is the loopback interface for the node.
This is a check to see if a BuildServer is on the local machine.protocol=$ can be used to specify WS, or WSS with WS being the default.| d8> --- Raw source --- | |
| var someDefault;this.foo = this.foo === void 0 ? someDefault : this.foo | |
| --- Code --- | |
| source_position = 0 | |
| kind = FUNCTION | |
| compiler = full-codegen | |
| Instructions (size = 444) | |
| [ function compiled by full code generator | |
| 0x9a8bf686c20 0 488b4c2408 REX.W movq rcx,[rsp+0x8] |
var x = 1;{
"type":"Program",
"scope": {
"dynamic": false,
"variables": [| 'use strict'; | |
| /*:: | |
| type Client = Object; | |
| type Channel = string; | |
| */ | |
| const channels/*: Map<Channel, Set<Client>> */ = new Map; | |
| const clients/*: Map<Client, Set<Channel>> */ = new WeakMap; | |
| const join = (name, client) => { | |
| if (!channels.has(name)) { |
| // Hooks for current package are only importable from that package | |
| // | |
| // package boundaries: | |
| // * dir up to but excluding node_modules/ or ./package.json | |
| // * dirs inside current but excluding node_modules | |
| // | |
| // package wishing to add hooks can use | |
| // | |
| // consumer-pkg/index.js | |
| // import {package as packageHooks} from 'js:context/loader/hooks'; |
| function* tictactoe() { | |
| const board = [ | |
| [null, null, null,], | |
| [null, null, null,], | |
| [null, null, null,], | |
| ]; | |
| let winner = null; | |
| const turn = 'x'; | |
| let res = {type: 'new_game'}; | |
| game: |