@fluidframework/common-utils
Advanced tools
Comparing version 0.33.1000-60833 to 0.33.1000-74526
@@ -8,3 +8,3 @@ /*! | ||
"extends": [ | ||
"@fluidframework/eslint-config-fluid" | ||
require.resolve("@fluidframework/eslint-config-fluid") | ||
], | ||
@@ -15,8 +15,3 @@ "parserOptions": { | ||
"rules": { | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/strict-boolean-expressions": "off", | ||
"no-bitwise": "off", | ||
"no-null/no-null": "off", | ||
"prefer-rest-params": "off" | ||
} | ||
} |
@@ -1,5 +0,5 @@ | ||
{"/mnt/vss/_work/1/s/common/lib/common-utils/src/assert.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/assert.ts","statementMap":{"0":{"start":{"line":14,"column":5},"end":{"line":16,"column":null}},"1":{"start":{"line":15,"column":9},"end":{"line":15,"column":110}},"2":{"start":{"line":13,"column":1},"end":{"line":13,"column":17}}},"fnMap":{"0":{"name":"assert","decl":{"start":{"line":13,"column":17},"end":{"line":13,"column":23}},"loc":{"start":{"line":13,"column":68},"end":{"line":17,"column":2}}}},"branchMap":{"0":{"loc":{"start":{"line":14,"column":5},"end":{"line":16,"column":null}},"type":"if","locations":[{"start":{"line":14,"column":5},"end":{"line":16,"column":null}},{"start":{"line":14,"column":5},"end":{"line":16,"column":null}}]},"1":{"loc":{"start":{"line":15,"column":55},"end":{"line":15,"column":98}},"type":"cond-expr","locations":[{"start":{"line":15,"column":55},"end":{"line":15,"column":98}},{"start":{"line":15,"column":101},"end":{"line":15,"column":108}}]}},"s":{"0":4,"1":0,"2":1},"f":{"0":4},"b":{"0":[0,4],"1":[0,0]}} | ||
,"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferBrowser.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferBrowser.ts","statementMap":{"0":{"start":{"line":6,"column":0},"end":{"line":6,"column":38}},"1":{"start":{"line":7,"column":0},"end":{"line":7,"column":34}},"2":{"start":{"line":18,"column":4},"end":{"line":30,"column":null}},"3":{"start":{"line":20,"column":12},"end":{"line":20,"column":47}},"4":{"start":{"line":25,"column":12},"end":{"line":25,"column":49}},"5":{"start":{"line":28,"column":12},"end":{"line":28,"column":60}},"6":{"start":{"line":17,"column":0},"end":{"line":17,"column":16}},"7":{"start":{"line":37,"column":30},"end":{"line":38,"column":42}},"8":{"start":{"line":38,"column":4},"end":{"line":38,"column":42}},"9":{"start":{"line":37,"column":13},"end":{"line":37,"column":30}},"10":{"start":{"line":47,"column":30},"end":{"line":48,"column":44}},"11":{"start":{"line":48,"column":5},"end":{"line":48,"column":44}},"12":{"start":{"line":47,"column":13},"end":{"line":47,"column":30}},"13":{"start":{"line":61,"column":18},"end":{"line":61,"column":81}},"14":{"start":{"line":62,"column":4},"end":{"line":68,"column":39}},"15":{"start":{"line":60,"column":0},"end":{"line":60,"column":16}},"16":{"start":{"line":82,"column":8},"end":{"line":82,"column":50}},"17":{"start":{"line":91,"column":8},"end":{"line":103,"column":null}},"18":{"start":{"line":92,"column":12},"end":{"line":92,"column":87}},"19":{"start":{"line":94,"column":15},"end":{"line":103,"column":null}},"20":{"start":{"line":96,"column":12},"end":{"line":96,"column":88}},"21":{"start":{"line":97,"column":12},"end":{"line":97,"column":113}},"22":{"start":{"line":98,"column":12},"end":{"line":98,"column":107}},"23":{"start":{"line":99,"column":15},"end":{"line":103,"column":null}},"24":{"start":{"line":100,"column":12},"end":{"line":100,"column":100}},"25":{"start":{"line":102,"column":12},"end":{"line":102,"column":34}},"26":{"start":{"line":107,"column":23},"end":{"line":107,"column":38}},"27":{"start":{"line":108,"column":28},"end":{"line":108,"column":73}},"28":{"start":{"line":109,"column":8},"end":{"line":114,"column":null}},"29":{"start":{"line":113,"column":12},"end":{"line":113,"column":35}},"30":{"start":{"line":116,"column":8},"end":{"line":116,"column":63}},"31":{"start":{"line":120,"column":8},"end":{"line":135,"column":null}},"32":{"start":{"line":122,"column":40},"end":{"line":122,"column":64}},"33":{"start":{"line":123,"column":32},"end":{"line":123,"column":69}},"34":{"start":{"line":124,"column":16},"end":{"line":124,"column":53}},"35":{"start":{"line":129,"column":32},"end":{"line":129,"column":61}},"36":{"start":{"line":130,"column":16},"end":{"line":130,"column":53}},"37":{"start":{"line":133,"column":16},"end":{"line":133,"column":64}},"38":{"start":{"line":139,"column":8},"end":{"line":139,"column":41}},"39":{"start":{"line":148,"column":27},"end":{"line":148,"column":30}},"40":{"start":{"line":151,"column":8},"end":{"line":151,"column":50}},"41":{"start":{"line":155,"column":8},"end":{"line":155,"column":61}},"42":{"start":{"line":159,"column":8},"end":{"line":162,"column":null}},"43":{"start":{"line":160,"column":33},"end":{"line":160,"column":55}},"44":{"start":{"line":161,"column":12},"end":{"line":161,"column":66}},"45":{"start":{"line":163,"column":8},"end":{"line":163,"column":28}},"46":{"start":{"line":74,"column":0},"end":{"line":74,"column":13}}},"fnMap":{"0":{"name":"Uint8ArrayToString","decl":{"start":{"line":17,"column":16},"end":{"line":17,"column":34}},"loc":{"start":{"line":17,"column":69},"end":{"line":31,"column":1}}},"1":{"name":"(anonymous_7)","decl":{"start":{"line":37,"column":30},"end":{"line":37,"column":31}},"loc":{"start":{"line":38,"column":4},"end":{"line":38,"column":42}}},"2":{"name":"(anonymous_8)","decl":{"start":{"line":47,"column":30},"end":{"line":47,"column":31}},"loc":{"start":{"line":48,"column":5},"end":{"line":48,"column":44}}},"3":{"name":"isArrayBuffer","decl":{"start":{"line":60,"column":16},"end":{"line":60,"column":29}},"loc":{"start":{"line":60,"column":38},"end":{"line":69,"column":1}}},"4":{"name":"(anonymous_10)","decl":{"start":{"line":81,"column":11},"end":{"line":81,"column":19}},"loc":{"start":{"line":81,"column":37},"end":{"line":83,"column":5}}},"5":{"name":"(anonymous_11)","decl":{"start":{"line":90,"column":4},"end":{"line":90,"column":10}},"loc":{"start":{"line":90,"column":49},"end":{"line":104,"column":5}}},"6":{"name":"(anonymous_12)","decl":{"start":{"line":106,"column":4},"end":{"line":106,"column":10}},"loc":{"start":{"line":106,"column":93},"end":{"line":117,"column":5}}},"7":{"name":"(anonymous_13)","decl":{"start":{"line":119,"column":4},"end":{"line":119,"column":10}},"loc":{"start":{"line":119,"column":52},"end":{"line":136,"column":5}}},"8":{"name":"(anonymous_14)","decl":{"start":{"line":138,"column":4},"end":{"line":138,"column":10}},"loc":{"start":{"line":138,"column":28},"end":{"line":140,"column":5}}},"9":{"name":"(anonymous_15)","decl":{"start":{"line":147,"column":12},"end":{"line":147,"column":18}},"loc":{"start":{"line":147,"column":45},"end":{"line":164,"column":5}}}},"branchMap":{"0":{"loc":{"start":{"line":19,"column":8},"end":{"line":21,"column":null}},"type":"switch","locations":[{"start":{"line":19,"column":8},"end":{"line":21,"column":null}},{"start":{"line":22,"column":8},"end":{"line":22,"column":20}},{"start":{"line":23,"column":8},"end":{"line":23,"column":21}},{"start":{"line":24,"column":8},"end":{"line":26,"column":null}},{"start":{"line":27,"column":8},"end":{"line":29,"column":null}}]},"1":{"loc":{"start":{"line":62,"column":11},"end":{"line":62,"column":37}},"type":"binary-expr","locations":[{"start":{"line":62,"column":11},"end":{"line":62,"column":37}},{"start":{"line":63,"column":8},"end":{"line":63,"column":33}},{"start":{"line":64,"column":11},"end":{"line":64,"column":25}},{"start":{"line":65,"column":11},"end":{"line":65,"column":47}},{"start":{"line":66,"column":11},"end":{"line":66,"column":44}},{"start":{"line":67,"column":11},"end":{"line":67,"column":41}},{"start":{"line":68,"column":11},"end":{"line":68,"column":37}}]},"2":{"loc":{"start":{"line":91,"column":8},"end":{"line":103,"column":null}},"type":"if","locations":[{"start":{"line":91,"column":8},"end":{"line":103,"column":null}},{"start":{"line":91,"column":8},"end":{"line":103,"column":null}}]},"3":{"loc":{"start":{"line":94,"column":15},"end":{"line":103,"column":null}},"type":"if","locations":[{"start":{"line":94,"column":15},"end":{"line":103,"column":null}},{"start":{"line":94,"column":15},"end":{"line":103,"column":null}}]},"4":{"loc":{"start":{"line":94,"column":19},"end":{"line":94,"column":33}},"type":"binary-expr","locations":[{"start":{"line":94,"column":19},"end":{"line":94,"column":33}},{"start":{"line":94,"column":37},"end":{"line":94,"column":62}},{"start":{"line":94,"column":66},"end":{"line":94,"column":93}}]},"5":{"loc":{"start":{"line":99,"column":15},"end":{"line":103,"column":null}},"type":"if","locations":[{"start":{"line":99,"column":15},"end":{"line":103,"column":null}},{"start":{"line":99,"column":15},"end":{"line":103,"column":null}}]},"6":{"loc":{"start":{"line":107,"column":23},"end":{"line":107,"column":33}},"type":"cond-expr","locations":[{"start":{"line":107,"column":23},"end":{"line":107,"column":33}},{"start":{"line":107,"column":37},"end":{"line":107,"column":38}}]},"7":{"loc":{"start":{"line":107,"column":23},"end":{"line":107,"column":37}},"type":"binary-expr","locations":[{"start":{"line":107,"column":23},"end":{"line":107,"column":37}},{"start":{"line":107,"column":23},"end":{"line":107,"column":37}}]},"8":{"loc":{"start":{"line":108,"column":28},"end":{"line":108,"column":38}},"type":"cond-expr","locations":[{"start":{"line":108,"column":28},"end":{"line":108,"column":38}},{"start":{"line":108,"column":42},"end":{"line":108,"column":73}}]},"9":{"loc":{"start":{"line":108,"column":28},"end":{"line":108,"column":42}},"type":"binary-expr","locations":[{"start":{"line":108,"column":28},"end":{"line":108,"column":42}},{"start":{"line":108,"column":28},"end":{"line":108,"column":42}}]},"10":{"loc":{"start":{"line":109,"column":8},"end":{"line":114,"column":null}},"type":"if","locations":[{"start":{"line":109,"column":8},"end":{"line":114,"column":null}},{"start":{"line":109,"column":8},"end":{"line":114,"column":null}}]},"11":{"loc":{"start":{"line":109,"column":12},"end":{"line":109,"column":22}},"type":"binary-expr","locations":[{"start":{"line":109,"column":12},"end":{"line":109,"column":22}},{"start":{"line":110,"column":12},"end":{"line":110,"column":43}},{"start":{"line":111,"column":12},"end":{"line":111,"column":27}},{"start":{"line":112,"column":12},"end":{"line":112,"column":57}}]},"12":{"loc":{"start":{"line":121,"column":12},"end":{"line":125,"column":null}},"type":"switch","locations":[{"start":{"line":121,"column":12},"end":{"line":125,"column":null}},{"start":{"line":126,"column":12},"end":{"line":126,"column":24}},{"start":{"line":127,"column":12},"end":{"line":127,"column":25}},{"start":{"line":128,"column":12},"end":{"line":131,"column":null}},{"start":{"line":132,"column":12},"end":{"line":134,"column":null}}]},"13":{"loc":{"start":{"line":159,"column":8},"end":{"line":162,"column":null}},"type":"if","locations":[{"start":{"line":159,"column":8},"end":{"line":162,"column":null}},{"start":{"line":159,"column":8},"end":{"line":162,"column":null}}]}},"s":{"0":1,"1":1,"2":42,"3":21,"4":21,"5":0,"6":1,"7":1,"8":4,"9":1,"10":1,"11":6,"12":1,"13":18,"14":18,"15":1,"16":40,"17":42,"18":32,"19":10,"20":2,"21":2,"22":2,"23":8,"24":8,"25":0,"26":10,"27":10,"28":10,"29":0,"30":10,"31":32,"32":17,"33":17,"34":17,"35":15,"36":15,"37":0,"38":0,"39":17,"40":17,"41":17,"42":17,"43":9,"44":9,"45":17,"46":1},"f":{"0":42,"1":4,"2":6,"3":18,"4":40,"5":42,"6":10,"7":32,"8":0,"9":17},"b":{"0":[21,4,6,21,0],"1":[18,8,0,0,0,0,0],"2":[32,10],"3":[2,8],"4":[10,10,10],"5":[8,0],"6":[0,10],"7":[10,10],"8":[0,10],"9":[10,10],"10":[0,10],"11":[10,10,10,10],"12":[17,2,2,15,0],"13":[9,8]}} | ||
,"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferNode.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferNode.ts","statementMap":{"0":{"start":{"line":21,"column":13},"end":{"line":21,"column":32}},"1":{"start":{"line":34,"column":4},"end":{"line":38,"column":null}},"2":{"start":{"line":35,"column":8},"end":{"line":35,"column":38}},"3":{"start":{"line":37,"column":8},"end":{"line":37,"column":51}},"4":{"start":{"line":32,"column":0},"end":{"line":32,"column":16}},"5":{"start":{"line":46,"column":16},"end":{"line":46,"column":47}},"6":{"start":{"line":50,"column":4},"end":{"line":52,"column":76}},"7":{"start":{"line":45,"column":0},"end":{"line":45,"column":16}},"8":{"start":{"line":62,"column":30},"end":{"line":63,"column":43}},"9":{"start":{"line":63,"column":4},"end":{"line":63,"column":43}},"10":{"start":{"line":62,"column":13},"end":{"line":62,"column":30}}},"fnMap":{"0":{"name":"Uint8ArrayToString","decl":{"start":{"line":32,"column":16},"end":{"line":32,"column":34}},"loc":{"start":{"line":32,"column":69},"end":{"line":39,"column":1}}},"1":{"name":"stringToBuffer","decl":{"start":{"line":45,"column":16},"end":{"line":45,"column":30}},"loc":{"start":{"line":45,"column":62},"end":{"line":53,"column":1}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":62,"column":30},"end":{"line":62,"column":31}},"loc":{"start":{"line":63,"column":4},"end":{"line":63,"column":43}}}},"branchMap":{"0":{"loc":{"start":{"line":34,"column":4},"end":{"line":38,"column":null}},"type":"if","locations":[{"start":{"line":34,"column":4},"end":{"line":38,"column":null}},{"start":{"line":34,"column":4},"end":{"line":38,"column":null}}]},"1":{"loc":{"start":{"line":51,"column":10},"end":{"line":51,"column":20}},"type":"cond-expr","locations":[{"start":{"line":51,"column":10},"end":{"line":51,"column":20}},{"start":{"line":52,"column":10},"end":{"line":52,"column":75}}]}},"s":{"0":1,"1":2,"2":0,"3":2,"4":1,"5":4,"6":4,"7":1,"8":1,"9":6,"10":1},"f":{"0":2,"1":4,"2":6},"b":{"0":[0,2],"1":[0,4]}} | ||
{"/mnt/vss/_work/1/s/common/lib/common-utils/src/assert.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/assert.ts","statementMap":{"0":{"start":{"line":16,"column":5},"end":{"line":18,"column":null}},"1":{"start":{"line":17,"column":9},"end":{"line":17,"column":111}},"2":{"start":{"line":15,"column":1},"end":{"line":15,"column":17}}},"fnMap":{"0":{"name":"assert","decl":{"start":{"line":15,"column":17},"end":{"line":15,"column":23}},"loc":{"start":{"line":15,"column":68},"end":{"line":19,"column":2}}}},"branchMap":{"0":{"loc":{"start":{"line":16,"column":5},"end":{"line":18,"column":null}},"type":"if","locations":[{"start":{"line":16,"column":5},"end":{"line":18,"column":null}},{"start":{"line":16,"column":5},"end":{"line":18,"column":null}}]},"1":{"loc":{"start":{"line":17,"column":55},"end":{"line":17,"column":99}},"type":"cond-expr","locations":[{"start":{"line":17,"column":55},"end":{"line":17,"column":99}},{"start":{"line":17,"column":102},"end":{"line":17,"column":109}}]}},"s":{"0":4,"1":0,"2":1},"f":{"0":4},"b":{"0":[0,4],"1":[0,0]}} | ||
,"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferBrowser.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferBrowser.ts","statementMap":{"0":{"start":{"line":6,"column":0},"end":{"line":6,"column":38}},"1":{"start":{"line":7,"column":0},"end":{"line":7,"column":34}},"2":{"start":{"line":18,"column":4},"end":{"line":30,"column":null}},"3":{"start":{"line":20,"column":12},"end":{"line":20,"column":47}},"4":{"start":{"line":25,"column":12},"end":{"line":25,"column":49}},"5":{"start":{"line":28,"column":12},"end":{"line":28,"column":60}},"6":{"start":{"line":17,"column":0},"end":{"line":17,"column":16}},"7":{"start":{"line":37,"column":30},"end":{"line":38,"column":42}},"8":{"start":{"line":38,"column":4},"end":{"line":38,"column":42}},"9":{"start":{"line":37,"column":13},"end":{"line":37,"column":30}},"10":{"start":{"line":47,"column":30},"end":{"line":48,"column":44}},"11":{"start":{"line":48,"column":5},"end":{"line":48,"column":44}},"12":{"start":{"line":47,"column":13},"end":{"line":47,"column":30}},"13":{"start":{"line":61,"column":18},"end":{"line":61,"column":81}},"14":{"start":{"line":62,"column":4},"end":{"line":68,"column":39}},"15":{"start":{"line":60,"column":0},"end":{"line":60,"column":16}},"16":{"start":{"line":82,"column":8},"end":{"line":82,"column":50}},"17":{"start":{"line":91,"column":8},"end":{"line":103,"column":null}},"18":{"start":{"line":92,"column":12},"end":{"line":92,"column":87}},"19":{"start":{"line":94,"column":15},"end":{"line":103,"column":null}},"20":{"start":{"line":96,"column":12},"end":{"line":96,"column":88}},"21":{"start":{"line":97,"column":12},"end":{"line":97,"column":113}},"22":{"start":{"line":98,"column":12},"end":{"line":98,"column":107}},"23":{"start":{"line":99,"column":15},"end":{"line":103,"column":null}},"24":{"start":{"line":100,"column":12},"end":{"line":100,"column":100}},"25":{"start":{"line":102,"column":12},"end":{"line":102,"column":34}},"26":{"start":{"line":107,"column":23},"end":{"line":107,"column":38}},"27":{"start":{"line":108,"column":28},"end":{"line":108,"column":73}},"28":{"start":{"line":109,"column":8},"end":{"line":114,"column":null}},"29":{"start":{"line":113,"column":12},"end":{"line":113,"column":35}},"30":{"start":{"line":116,"column":8},"end":{"line":116,"column":63}},"31":{"start":{"line":120,"column":8},"end":{"line":135,"column":null}},"32":{"start":{"line":122,"column":40},"end":{"line":122,"column":64}},"33":{"start":{"line":123,"column":32},"end":{"line":123,"column":69}},"34":{"start":{"line":124,"column":16},"end":{"line":124,"column":53}},"35":{"start":{"line":129,"column":32},"end":{"line":129,"column":61}},"36":{"start":{"line":130,"column":16},"end":{"line":130,"column":53}},"37":{"start":{"line":133,"column":16},"end":{"line":133,"column":64}},"38":{"start":{"line":139,"column":8},"end":{"line":139,"column":41}},"39":{"start":{"line":147,"column":27},"end":{"line":147,"column":30}},"40":{"start":{"line":150,"column":8},"end":{"line":150,"column":50}},"41":{"start":{"line":154,"column":8},"end":{"line":154,"column":61}},"42":{"start":{"line":158,"column":8},"end":{"line":161,"column":null}},"43":{"start":{"line":159,"column":33},"end":{"line":159,"column":55}},"44":{"start":{"line":160,"column":12},"end":{"line":160,"column":66}},"45":{"start":{"line":162,"column":8},"end":{"line":162,"column":28}},"46":{"start":{"line":74,"column":0},"end":{"line":74,"column":13}}},"fnMap":{"0":{"name":"Uint8ArrayToString","decl":{"start":{"line":17,"column":16},"end":{"line":17,"column":34}},"loc":{"start":{"line":17,"column":69},"end":{"line":31,"column":1}}},"1":{"name":"(anonymous_7)","decl":{"start":{"line":37,"column":30},"end":{"line":37,"column":31}},"loc":{"start":{"line":38,"column":4},"end":{"line":38,"column":42}}},"2":{"name":"(anonymous_8)","decl":{"start":{"line":47,"column":30},"end":{"line":47,"column":31}},"loc":{"start":{"line":48,"column":5},"end":{"line":48,"column":44}}},"3":{"name":"isArrayBuffer","decl":{"start":{"line":60,"column":16},"end":{"line":60,"column":29}},"loc":{"start":{"line":60,"column":38},"end":{"line":69,"column":1}}},"4":{"name":"(anonymous_10)","decl":{"start":{"line":81,"column":11},"end":{"line":81,"column":19}},"loc":{"start":{"line":81,"column":37},"end":{"line":83,"column":5}}},"5":{"name":"(anonymous_11)","decl":{"start":{"line":90,"column":4},"end":{"line":90,"column":10}},"loc":{"start":{"line":90,"column":49},"end":{"line":104,"column":5}}},"6":{"name":"(anonymous_12)","decl":{"start":{"line":106,"column":4},"end":{"line":106,"column":10}},"loc":{"start":{"line":106,"column":93},"end":{"line":117,"column":5}}},"7":{"name":"(anonymous_13)","decl":{"start":{"line":119,"column":4},"end":{"line":119,"column":10}},"loc":{"start":{"line":119,"column":52},"end":{"line":136,"column":5}}},"8":{"name":"(anonymous_14)","decl":{"start":{"line":138,"column":4},"end":{"line":138,"column":10}},"loc":{"start":{"line":138,"column":28},"end":{"line":140,"column":5}}},"9":{"name":"(anonymous_15)","decl":{"start":{"line":146,"column":12},"end":{"line":146,"column":18}},"loc":{"start":{"line":146,"column":45},"end":{"line":163,"column":5}}}},"branchMap":{"0":{"loc":{"start":{"line":19,"column":8},"end":{"line":21,"column":null}},"type":"switch","locations":[{"start":{"line":19,"column":8},"end":{"line":21,"column":null}},{"start":{"line":22,"column":8},"end":{"line":22,"column":20}},{"start":{"line":23,"column":8},"end":{"line":23,"column":21}},{"start":{"line":24,"column":8},"end":{"line":26,"column":null}},{"start":{"line":27,"column":8},"end":{"line":29,"column":null}}]},"1":{"loc":{"start":{"line":62,"column":11},"end":{"line":62,"column":37}},"type":"binary-expr","locations":[{"start":{"line":62,"column":11},"end":{"line":62,"column":37}},{"start":{"line":63,"column":8},"end":{"line":63,"column":33}},{"start":{"line":64,"column":11},"end":{"line":64,"column":25}},{"start":{"line":65,"column":11},"end":{"line":65,"column":47}},{"start":{"line":66,"column":11},"end":{"line":66,"column":44}},{"start":{"line":67,"column":11},"end":{"line":67,"column":41}},{"start":{"line":68,"column":11},"end":{"line":68,"column":37}}]},"2":{"loc":{"start":{"line":91,"column":8},"end":{"line":103,"column":null}},"type":"if","locations":[{"start":{"line":91,"column":8},"end":{"line":103,"column":null}},{"start":{"line":91,"column":8},"end":{"line":103,"column":null}}]},"3":{"loc":{"start":{"line":94,"column":15},"end":{"line":103,"column":null}},"type":"if","locations":[{"start":{"line":94,"column":15},"end":{"line":103,"column":null}},{"start":{"line":94,"column":15},"end":{"line":103,"column":null}}]},"4":{"loc":{"start":{"line":94,"column":19},"end":{"line":94,"column":33}},"type":"binary-expr","locations":[{"start":{"line":94,"column":19},"end":{"line":94,"column":33}},{"start":{"line":94,"column":37},"end":{"line":94,"column":62}},{"start":{"line":94,"column":66},"end":{"line":94,"column":93}}]},"5":{"loc":{"start":{"line":99,"column":15},"end":{"line":103,"column":null}},"type":"if","locations":[{"start":{"line":99,"column":15},"end":{"line":103,"column":null}},{"start":{"line":99,"column":15},"end":{"line":103,"column":null}}]},"6":{"loc":{"start":{"line":107,"column":23},"end":{"line":107,"column":33}},"type":"cond-expr","locations":[{"start":{"line":107,"column":23},"end":{"line":107,"column":33}},{"start":{"line":107,"column":37},"end":{"line":107,"column":38}}]},"7":{"loc":{"start":{"line":107,"column":23},"end":{"line":107,"column":37}},"type":"binary-expr","locations":[{"start":{"line":107,"column":23},"end":{"line":107,"column":37}},{"start":{"line":107,"column":23},"end":{"line":107,"column":37}}]},"8":{"loc":{"start":{"line":108,"column":28},"end":{"line":108,"column":38}},"type":"cond-expr","locations":[{"start":{"line":108,"column":28},"end":{"line":108,"column":38}},{"start":{"line":108,"column":42},"end":{"line":108,"column":73}}]},"9":{"loc":{"start":{"line":108,"column":28},"end":{"line":108,"column":42}},"type":"binary-expr","locations":[{"start":{"line":108,"column":28},"end":{"line":108,"column":42}},{"start":{"line":108,"column":28},"end":{"line":108,"column":42}}]},"10":{"loc":{"start":{"line":109,"column":8},"end":{"line":114,"column":null}},"type":"if","locations":[{"start":{"line":109,"column":8},"end":{"line":114,"column":null}},{"start":{"line":109,"column":8},"end":{"line":114,"column":null}}]},"11":{"loc":{"start":{"line":109,"column":12},"end":{"line":109,"column":22}},"type":"binary-expr","locations":[{"start":{"line":109,"column":12},"end":{"line":109,"column":22}},{"start":{"line":110,"column":12},"end":{"line":110,"column":43}},{"start":{"line":111,"column":12},"end":{"line":111,"column":27}},{"start":{"line":112,"column":12},"end":{"line":112,"column":57}}]},"12":{"loc":{"start":{"line":121,"column":12},"end":{"line":125,"column":null}},"type":"switch","locations":[{"start":{"line":121,"column":12},"end":{"line":125,"column":null}},{"start":{"line":126,"column":12},"end":{"line":126,"column":24}},{"start":{"line":127,"column":12},"end":{"line":127,"column":25}},{"start":{"line":128,"column":12},"end":{"line":131,"column":null}},{"start":{"line":132,"column":12},"end":{"line":134,"column":null}}]},"13":{"loc":{"start":{"line":158,"column":8},"end":{"line":161,"column":null}},"type":"if","locations":[{"start":{"line":158,"column":8},"end":{"line":161,"column":null}},{"start":{"line":158,"column":8},"end":{"line":161,"column":null}}]}},"s":{"0":1,"1":1,"2":42,"3":21,"4":21,"5":0,"6":1,"7":1,"8":4,"9":1,"10":1,"11":6,"12":1,"13":18,"14":18,"15":1,"16":40,"17":42,"18":32,"19":10,"20":2,"21":2,"22":2,"23":8,"24":8,"25":0,"26":10,"27":10,"28":10,"29":0,"30":10,"31":32,"32":17,"33":17,"34":17,"35":15,"36":15,"37":0,"38":0,"39":17,"40":17,"41":17,"42":17,"43":9,"44":9,"45":17,"46":1},"f":{"0":42,"1":4,"2":6,"3":18,"4":40,"5":42,"6":10,"7":32,"8":0,"9":17},"b":{"0":[21,4,6,21,0],"1":[18,8,0,0,0,0,0],"2":[32,10],"3":[2,8],"4":[10,10,10],"5":[8,0],"6":[0,10],"7":[10,10],"8":[0,10],"9":[10,10],"10":[0,10],"11":[10,10,10,10],"12":[17,2,2,15,0],"13":[9,8]}} | ||
,"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferNode.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferNode.ts","statementMap":{"0":{"start":{"line":21,"column":13},"end":{"line":21,"column":32}},"1":{"start":{"line":34,"column":4},"end":{"line":34,"column":95}},"2":{"start":{"line":32,"column":0},"end":{"line":32,"column":16}},"3":{"start":{"line":42,"column":16},"end":{"line":42,"column":47}},"4":{"start":{"line":46,"column":4},"end":{"line":48,"column":76}},"5":{"start":{"line":41,"column":0},"end":{"line":41,"column":16}},"6":{"start":{"line":58,"column":30},"end":{"line":59,"column":43}},"7":{"start":{"line":59,"column":4},"end":{"line":59,"column":43}},"8":{"start":{"line":58,"column":13},"end":{"line":58,"column":30}}},"fnMap":{"0":{"name":"Uint8ArrayToString","decl":{"start":{"line":32,"column":16},"end":{"line":32,"column":34}},"loc":{"start":{"line":32,"column":69},"end":{"line":35,"column":1}}},"1":{"name":"stringToBuffer","decl":{"start":{"line":41,"column":16},"end":{"line":41,"column":30}},"loc":{"start":{"line":41,"column":62},"end":{"line":49,"column":1}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":58,"column":30},"end":{"line":58,"column":31}},"loc":{"start":{"line":59,"column":4},"end":{"line":59,"column":43}}}},"branchMap":{"0":{"loc":{"start":{"line":34,"column":34},"end":{"line":34,"column":56}},"type":"cond-expr","locations":[{"start":{"line":34,"column":34},"end":{"line":34,"column":56}},{"start":{"line":34,"column":59},"end":{"line":34,"column":94}}]},"1":{"loc":{"start":{"line":47,"column":10},"end":{"line":47,"column":20}},"type":"cond-expr","locations":[{"start":{"line":47,"column":10},"end":{"line":47,"column":20}},{"start":{"line":48,"column":10},"end":{"line":48,"column":75}}]}},"s":{"0":1,"1":2,"2":1,"3":4,"4":4,"5":1,"6":1,"7":6,"8":1},"f":{"0":2,"1":4,"2":6},"b":{"0":[0,2],"1":[0,4]}} | ||
,"/mnt/vss/_work/1/s/common/lib/common-utils/src/hashFileNode.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/hashFileNode.ts","statementMap":{"0":{"start":{"line":7,"column":0},"end":{"line":7,"column":31}},"1":{"start":{"line":9,"column":0},"end":{"line":9,"column":35}},"2":{"start":{"line":30,"column":4},"end":{"line":39,"column":null}},"3":{"start":{"line":32,"column":12},"end":{"line":32,"column":32}},"4":{"start":{"line":33,"column":12},"end":{"line":33,"column":18}},"5":{"start":{"line":36,"column":12},"end":{"line":36,"column":34}},"6":{"start":{"line":37,"column":12},"end":{"line":37,"column":18}},"7":{"start":{"line":40,"column":4},"end":{"line":40,"column":62}},"8":{"start":{"line":23,"column":1},"end":{"line":23,"column":8}},"9":{"start":{"line":51,"column":17},"end":{"line":51,"column":32}},"10":{"start":{"line":52,"column":23},"end":{"line":52,"column":73}},"11":{"start":{"line":53,"column":19},"end":{"line":53,"column":29}},"12":{"start":{"line":54,"column":4},"end":{"line":56,"column":33}},"13":{"start":{"line":50,"column":0},"end":{"line":50,"column":7}}},"fnMap":{"0":{"name":"hashFile","decl":{"start":{"line":23,"column":23},"end":{"line":23,"column":31}},"loc":{"start":{"line":26,"column":42},"end":{"line":41,"column":1}}},"1":{"name":"gitHashFile","decl":{"start":{"line":50,"column":22},"end":{"line":50,"column":33}},"loc":{"start":{"line":50,"column":49},"end":{"line":57,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":25,"column":37},"end":{"line":25,"column":44}},"type":"default-arg","locations":[{"start":{"line":25,"column":37},"end":{"line":25,"column":44}}]},"1":{"loc":{"start":{"line":26,"column":37},"end":{"line":26,"column":42}},"type":"default-arg","locations":[{"start":{"line":26,"column":37},"end":{"line":26,"column":42}}]},"2":{"loc":{"start":{"line":31,"column":8},"end":{"line":34,"column":null}},"type":"switch","locations":[{"start":{"line":31,"column":8},"end":{"line":34,"column":null}},{"start":{"line":35,"column":8},"end":{"line":38,"column":null}}]}},"s":{"0":1,"1":1,"2":3,"3":1,"4":1,"5":2,"6":2,"7":3,"8":1,"9":6,"10":6,"11":6,"12":6,"13":1},"f":{"0":3,"1":6},"b":{"0":[0],"1":[1],"2":[1,2]}} | ||
} |
@@ -10,5 +10,7 @@ /*! | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specificed manually. Run policy-check to get shortcode number assigned. | ||
* A number should not be specificed manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
*/ | ||
export declare function assert(condition: boolean, message: string | number): asserts condition; | ||
//# sourceMappingURL=assert.d.ts.map |
@@ -13,3 +13,5 @@ "use strict"; | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specificed manually. Run policy-check to get shortcode number assigned. | ||
* A number should not be specificed manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
*/ | ||
@@ -16,0 +18,0 @@ function assert(condition, message) { |
@@ -46,3 +46,3 @@ /*! | ||
* and only utf8 and base64 encodings | ||
* @param encoding | ||
* @param encoding - encoding to use | ||
*/ | ||
@@ -62,3 +62,2 @@ toString(encoding?: string): string; | ||
* is not as tolerant of the same malformed base64 as Node's Buffer is. | ||
* @param str | ||
*/ | ||
@@ -65,0 +64,0 @@ private static sanitizeBase64; |
@@ -97,3 +97,3 @@ "use strict"; | ||
* and only utf8 and base64 encodings | ||
* @param encoding | ||
* @param encoding - encoding to use | ||
*/ | ||
@@ -115,4 +115,4 @@ toString(encoding) { | ||
// Support currently for full array, no view ports! (though it can be added in future) | ||
assert_1.assert(value.byteOffset === 0, 0x000 /* "nonzero isobuffer byte offset" */); | ||
assert_1.assert(value.byteLength === value.buffer.byteLength, 0x001 /* "unexpected isobuffer byte length" */); | ||
(0, assert_1.assert)(value.byteOffset === 0, 0x000 /* "nonzero isobuffer byte offset" */); | ||
(0, assert_1.assert)(value.byteLength === value.buffer.byteLength, 0x001 /* "unexpected isobuffer byte length" */); | ||
return IsoBuffer.fromArrayBuffer(value.buffer, encodingOrOffset, length); | ||
@@ -162,3 +162,2 @@ } | ||
* is not as tolerant of the same malformed base64 as Node's Buffer is. | ||
* @param str | ||
*/ | ||
@@ -165,0 +164,0 @@ static sanitizeBase64(str) { |
@@ -19,8 +19,3 @@ "use strict"; | ||
// Make this check because Buffer.from(arr) will always do a buffer copy | ||
if (Buffer.isBuffer(arr)) { | ||
return arr.toString(encoding); | ||
} | ||
else { | ||
return Buffer.from(arr).toString(encoding); | ||
} | ||
return Buffer.isBuffer(arr) ? arr.toString(encoding) : Buffer.from(arr).toString(encoding); | ||
} | ||
@@ -27,0 +22,0 @@ exports.Uint8ArrayToString = Uint8ArrayToString; |
@@ -68,3 +68,3 @@ "use strict"; | ||
const sources = this.forwardingEvents.get(event); | ||
if (sources === null || sources === void 0 ? void 0 : sources.has(source)) { | ||
if ((sources === null || sources === void 0 ? void 0 : sources.has(source)) === true) { | ||
if (this.listenerCount(event) === 0) { | ||
@@ -71,0 +71,0 @@ const listenerRemover = sources.get(source); |
@@ -51,2 +51,3 @@ "use strict"; | ||
this.fixdown(1); | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
return x.value; | ||
@@ -104,2 +105,3 @@ } | ||
while (this.isGreaterThanParent(k)) { | ||
// eslint-disable-next-line no-bitwise | ||
const parent = k >> 1; | ||
@@ -111,2 +113,3 @@ this.swap(k, parent); | ||
isGreaterThanParent(k) { | ||
// eslint-disable-next-line no-bitwise | ||
return k > 1 && (this.comp.compare(this.L[k >> 1].value, this.L[k].value) > 0); | ||
@@ -116,3 +119,5 @@ } | ||
let k = pos; | ||
// eslint-disable-next-line no-bitwise | ||
while ((k << 1) <= this.count()) { | ||
// eslint-disable-next-line no-bitwise | ||
let j = k << 1; | ||
@@ -119,0 +124,0 @@ if ((j < this.count()) && (this.comp.compare(this.L[j].value, this.L[j + 1].value) > 0)) { |
@@ -34,2 +34,3 @@ "use strict"; | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
return this._value; | ||
@@ -36,0 +37,0 @@ } |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/common-utils"; | ||
export declare const pkgVersion = "0.33.1000-60833"; | ||
export declare const pkgVersion = "0.33.1000-74526"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
exports.pkgName = "@fluidframework/common-utils"; | ||
exports.pkgVersion = "0.33.1000-60833"; | ||
exports.pkgVersion = "0.33.1000-74526"; | ||
//# sourceMappingURL=packageVersion.js.map |
@@ -71,8 +71,11 @@ "use strict"; | ||
async then(onfulfilled, onrejected) { | ||
// eslint-disable-next-line prefer-rest-params | ||
return this.getPromise().then(...arguments); | ||
} | ||
async catch(onrejected) { | ||
// eslint-disable-next-line prefer-rest-params | ||
return this.getPromise().catch(...arguments); | ||
} | ||
async finally(onfinally) { | ||
// eslint-disable-next-line prefer-rest-params | ||
return this.getPromise().finally(...arguments); | ||
@@ -79,0 +82,0 @@ } |
@@ -29,3 +29,3 @@ "use strict"; | ||
else { | ||
this.ranges = cloneDeep_1.default(primary.ranges); | ||
this.ranges = (0, cloneDeep_1.default)(primary.ranges); | ||
this.lastPrimary = primary.lastPrimary; | ||
@@ -61,3 +61,3 @@ this.lastSecondary = primary.lastSecondary; | ||
lastSecondary: this.lastSecondary, | ||
ranges: cloneDeep_1.default(this.ranges), | ||
ranges: (0, cloneDeep_1.default)(this.ranges), | ||
}; | ||
@@ -74,5 +74,5 @@ } | ||
// below to check invariants | ||
assert_1.assert(primary >= this.lastPrimary, 0x003 /* "Primary to add to range < last primary!" */); | ||
(0, assert_1.assert)(primary >= this.lastPrimary, 0x003 /* "Primary to add to range < last primary!" */); | ||
if (this.lastSecondary !== undefined) { | ||
assert_1.assert(secondary >= this.lastSecondary, 0x004 /* "Secondary to add to range < last secondary!" */); | ||
(0, assert_1.assert)(secondary >= this.lastSecondary, 0x004 /* "Secondary to add to range < last secondary!" */); | ||
} | ||
@@ -84,2 +84,3 @@ this.lastPrimary = primary; | ||
const primaryHead = head.primary + head.length; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const secondaryHead = head.secondary + head.length; | ||
@@ -122,3 +123,3 @@ // Same secondary indicates this is not a true inflection point - we can ignore it | ||
get(primary) { | ||
assert_1.assert(primary >= this.ranges[0].primary, 0x005 /* "Target primary to retrieve < first range's primary!" */); | ||
(0, assert_1.assert)(primary >= this.ranges[0].primary, 0x005 /* "Target primary to retrieve < first range's primary!" */); | ||
// Find the first range where the starting position is greater than the primary. Our target range is | ||
@@ -132,6 +133,7 @@ // the one before it. | ||
} | ||
assert_1.assert(primary >= this.ranges[index - 1].primary, 0x006 /* "Target primary to retrieve < last range's primary!" */); | ||
(0, assert_1.assert)(primary >= this.ranges[index - 1].primary, 0x006 /* "Target primary to retrieve < last range's primary!" */); | ||
// If the difference is within the stored range use it - otherwise add in the length - 1 as the highest | ||
// stored secondary value to use. | ||
const closestRange = this.ranges[index - 1]; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
return Math.min(primary - closestRange.primary, closestRange.length) + closestRange.secondary; | ||
@@ -145,3 +147,3 @@ } | ||
updateBase(primary) { | ||
assert_1.assert(primary >= this.ranges[0].primary, 0x007 /* "Target primary to update < first range's primary!" */); | ||
(0, assert_1.assert)(primary >= this.ranges[0].primary, 0x007 /* "Target primary to update < first range's primary!" */); | ||
// Walk the ranges looking for the first one that is greater than the primary. Primary is then within the | ||
@@ -156,6 +158,7 @@ // previous index by definition (since it's less than the current index's primary but greather than the | ||
} | ||
assert_1.assert(primary >= this.ranges[index - 1].primary, 0x008 /* "Target primary to update < last range's primary!" */); | ||
(0, assert_1.assert)(primary >= this.ranges[index - 1].primary, 0x008 /* "Target primary to update < last range's primary!" */); | ||
// Update the last range values | ||
const range = this.ranges[index - 1]; | ||
const delta = primary - range.primary; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
range.secondary = range.secondary + Math.min(delta, range.length); | ||
@@ -167,3 +170,3 @@ range.length = Math.max(range.length - delta, 0); | ||
// Assert that the lowest value is now the input to this method | ||
assert_1.assert(primary === this.ranges[0].primary, 0x009 /* "After update, target primary is not first range's primary!" */); | ||
(0, assert_1.assert)(primary === this.ranges[0].primary, 0x009 /* "After update, target primary is not first range's primary!" */); | ||
} | ||
@@ -170,0 +173,0 @@ } |
@@ -37,2 +37,3 @@ "use strict"; | ||
approvedList.push(message); | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
} | ||
@@ -39,0 +40,0 @@ else if (this.requestMap.get(key) + this.windowMSec > currentTime) { |
@@ -127,3 +127,3 @@ "use strict"; | ||
handler() { | ||
assert_1.assert(!!this.runningState, 0x00a /* "Running timer missing handler" */); | ||
(0, assert_1.assert)(!!this.runningState, 0x00a /* "Running timer missing handler" */); | ||
const restart = this.runningState.restart; | ||
@@ -176,3 +176,3 @@ if (restart !== undefined) { | ||
handler(); | ||
assert_1.assert(!!this.deferred, 0x00b /* "Handler executed without deferred" */); | ||
(0, assert_1.assert)(!!this.deferred, 0x00b /* "Handler executed without deferred" */); | ||
this.deferred.resolve({ timerResult: "timeout" }); | ||
@@ -179,0 +179,0 @@ this.deferred = undefined; |
@@ -10,5 +10,7 @@ /*! | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specificed manually. Run policy-check to get shortcode number assigned. | ||
* A number should not be specificed manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
*/ | ||
export declare function assert(condition: boolean, message: string | number): asserts condition; | ||
//# sourceMappingURL=assert.d.ts.map |
@@ -10,3 +10,5 @@ /*! | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specificed manually. Run policy-check to get shortcode number assigned. | ||
* A number should not be specificed manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
*/ | ||
@@ -13,0 +15,0 @@ export function assert(condition, message) { |
@@ -46,3 +46,3 @@ /*! | ||
* and only utf8 and base64 encodings | ||
* @param encoding | ||
* @param encoding - encoding to use | ||
*/ | ||
@@ -62,3 +62,2 @@ toString(encoding?: string): string; | ||
* is not as tolerant of the same malformed base64 as Node's Buffer is. | ||
* @param str | ||
*/ | ||
@@ -65,0 +64,0 @@ private static sanitizeBase64; |
@@ -71,3 +71,3 @@ /*! | ||
* and only utf8 and base64 encodings | ||
* @param encoding | ||
* @param encoding - encoding to use | ||
*/ | ||
@@ -135,3 +135,2 @@ toString(encoding) { | ||
* is not as tolerant of the same malformed base64 as Node's Buffer is. | ||
* @param str | ||
*/ | ||
@@ -138,0 +137,0 @@ static sanitizeBase64(str) { |
@@ -16,8 +16,3 @@ /*! | ||
// Make this check because Buffer.from(arr) will always do a buffer copy | ||
if (Buffer.isBuffer(arr)) { | ||
return arr.toString(encoding); | ||
} | ||
else { | ||
return Buffer.from(arr).toString(encoding); | ||
} | ||
return Buffer.isBuffer(arr) ? arr.toString(encoding) : Buffer.from(arr).toString(encoding); | ||
} | ||
@@ -24,0 +19,0 @@ /** |
@@ -65,3 +65,3 @@ /*! | ||
const sources = this.forwardingEvents.get(event); | ||
if (sources === null || sources === void 0 ? void 0 : sources.has(source)) { | ||
if ((sources === null || sources === void 0 ? void 0 : sources.has(source)) === true) { | ||
if (this.listenerCount(event) === 0) { | ||
@@ -68,0 +68,0 @@ const listenerRemover = sources.get(source); |
@@ -48,2 +48,3 @@ /*! | ||
this.fixdown(1); | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
return x.value; | ||
@@ -101,2 +102,3 @@ } | ||
while (this.isGreaterThanParent(k)) { | ||
// eslint-disable-next-line no-bitwise | ||
const parent = k >> 1; | ||
@@ -108,2 +110,3 @@ this.swap(k, parent); | ||
isGreaterThanParent(k) { | ||
// eslint-disable-next-line no-bitwise | ||
return k > 1 && (this.comp.compare(this.L[k >> 1].value, this.L[k].value) > 0); | ||
@@ -113,3 +116,5 @@ } | ||
let k = pos; | ||
// eslint-disable-next-line no-bitwise | ||
while ((k << 1) <= this.count()) { | ||
// eslint-disable-next-line no-bitwise | ||
let j = k << 1; | ||
@@ -116,0 +121,0 @@ if ((j < this.count()) && (this.comp.compare(this.L[j].value, this.L[j + 1].value) > 0)) { |
@@ -31,2 +31,3 @@ /*! | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
return this._value; | ||
@@ -33,0 +34,0 @@ } |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/common-utils"; | ||
export declare const pkgVersion = "0.33.1000-60833"; | ||
export declare const pkgVersion = "0.33.1000-74526"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -8,3 +8,3 @@ /*! | ||
export const pkgName = "@fluidframework/common-utils"; | ||
export const pkgVersion = "0.33.1000-60833"; | ||
export const pkgVersion = "0.33.1000-74526"; | ||
//# sourceMappingURL=packageVersion.js.map |
@@ -67,8 +67,11 @@ /*! | ||
async then(onfulfilled, onrejected) { | ||
// eslint-disable-next-line prefer-rest-params | ||
return this.getPromise().then(...arguments); | ||
} | ||
async catch(onrejected) { | ||
// eslint-disable-next-line prefer-rest-params | ||
return this.getPromise().catch(...arguments); | ||
} | ||
async finally(onfinally) { | ||
// eslint-disable-next-line prefer-rest-params | ||
return this.getPromise().finally(...arguments); | ||
@@ -75,0 +78,0 @@ } |
@@ -75,2 +75,3 @@ /*! | ||
const primaryHead = head.primary + head.length; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const secondaryHead = head.secondary + head.length; | ||
@@ -126,2 +127,3 @@ // Same secondary indicates this is not a true inflection point - we can ignore it | ||
const closestRange = this.ranges[index - 1]; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
return Math.min(primary - closestRange.primary, closestRange.length) + closestRange.secondary; | ||
@@ -149,2 +151,3 @@ } | ||
const delta = primary - range.primary; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
range.secondary = range.secondary + Math.min(delta, range.length); | ||
@@ -151,0 +154,0 @@ range.length = Math.max(range.length - delta, 0); |
@@ -34,2 +34,3 @@ /*! | ||
approvedList.push(message); | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
} | ||
@@ -36,0 +37,0 @@ else if (this.requestMap.get(key) + this.windowMSec > currentTime) { |
{ | ||
"name": "@fluidframework/common-utils", | ||
"version": "0.33.1000-60833", | ||
"version": "0.33.1000-74526", | ||
"description": "Collection of utility functions for Fluid", | ||
@@ -23,4 +23,4 @@ "homepage": "https://fluidframework.com", | ||
"bench": "ts-node bench/src/index.ts", | ||
"build": "npm run build:gen && concurrently npm:build:compile npm:lint && npm run build:docs", | ||
"build:commonjs": "npm run tsc && npm run build:test", | ||
"build": "npm run build:genver && concurrently npm:build:compile npm:lint && npm run build:docs", | ||
"build:commonjs": "npm run tsc && npm run typetests:gen && npm run build:test", | ||
"build:compile": "concurrently npm:build:commonjs npm:build:esnext", | ||
@@ -31,4 +31,3 @@ "build:docs": "api-extractor run --local --typescript-compiler-folder ./node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/", | ||
"build:full:compile": "npm run build:compile", | ||
"build:gen": "concurrently npm:build:gen:ver npm:typetests:gen", | ||
"build:gen:ver": "gen-version", | ||
"build:genver": "gen-version", | ||
"build:test": "concurrently npm:build:test:mocha npm:build:test:jest npm:build:test:types", | ||
@@ -39,3 +38,3 @@ "build:test:jest": "tsc --project ./src/test/jest/tsconfig.json", | ||
"bump-version": "npm version minor --no-push --no-git-tag-version && npm run build:gen:bump", | ||
"ci:build": "npm run build:gen && npm run build:compile", | ||
"ci:build": "npm run build:genver && npm run build:compile", | ||
"ci:build:docs": "api-extractor run --typescript-compiler-folder ./node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/", | ||
@@ -92,6 +91,6 @@ "ci:test": "npm run test:report", | ||
"@fluidframework/build-common": "^0.23.0", | ||
"@fluidframework/build-tools": "^0.2.60108", | ||
"@fluidframework/build-tools": "^0.2.71273", | ||
"@fluidframework/common-utils-previous": "npm:@fluidframework/common-utils@^0.32.0", | ||
"@fluidframework/eslint-config-fluid": "^0.27.2000-59622", | ||
"@microsoft/api-extractor": "^7.16.1", | ||
"@fluidframework/eslint-config-fluid": "^0.28.2000", | ||
"@microsoft/api-extractor": "^7.22.2", | ||
"@rushstack/eslint-config": "^2.5.1", | ||
@@ -102,7 +101,5 @@ "@types/base64-js": "^1.3.0", | ||
"@types/jest-environment-puppeteer": "2.2.0", | ||
"@types/mocha": "^8.2.2", | ||
"@types/mocha": "^9.1.1", | ||
"@types/puppeteer": "1.3.0", | ||
"@types/sinon": "^7.0.13", | ||
"@typescript-eslint/eslint-plugin": "~5.9.0", | ||
"@typescript-eslint/parser": "~5.9.0", | ||
"benchmark": "^2.1.4", | ||
@@ -112,12 +109,6 @@ "concurrently": "^6.2.0", | ||
"eslint": "~8.6.0", | ||
"eslint-plugin-editorconfig": "~3.2.0", | ||
"eslint-plugin-eslint-comments": "~3.2.0", | ||
"eslint-plugin-import": "~2.25.4", | ||
"eslint-plugin-no-null": "~1.0.2", | ||
"eslint-plugin-react": "~7.28.0", | ||
"eslint-plugin-unicorn": "~40.0.0", | ||
"jest": "^26.6.3", | ||
"jest-junit": "^10.0.0", | ||
"jest-puppeteer": "^4.4.0", | ||
"mocha": "^8.4.0", | ||
"mocha": "^10.0.0", | ||
"nyc": "^15.0.0", | ||
@@ -130,3 +121,3 @@ "puppeteer": "^2.1.0", | ||
"ts-node": "^7.0.1", | ||
"typescript": "~4.1.3", | ||
"typescript": "~4.5.5", | ||
"typescript-formatter": "7.1.0" | ||
@@ -141,11 +132,9 @@ }, | ||
"broken": { | ||
"0.32.1": { | ||
"RemovedFunctionDeclaration_extractLogSafeErrorProperties": { | ||
"forwardCompat": false, | ||
"backCompat": false | ||
}, | ||
"RemovedClassDeclaration_BatchManager": { | ||
"forwardCompat": false, | ||
"backCompat": false | ||
} | ||
"RemovedFunctionDeclaration_extractLogSafeErrorProperties": { | ||
"forwardCompat": false, | ||
"backCompat": false | ||
}, | ||
"RemovedClassDeclaration_BatchManager": { | ||
"forwardCompat": false, | ||
"backCompat": false | ||
} | ||
@@ -152,0 +141,0 @@ } |
@@ -11,8 +11,10 @@ /*! | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specificed manually. Run policy-check to get shortcode number assigned. | ||
* A number should not be specificed manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
*/ | ||
export function assert(condition: boolean, message: string | number): asserts condition { | ||
if (!condition) { | ||
throw new Error(typeof message === "number" ? `0x${message.toString(16).padStart(3,"0")}` : message); | ||
throw new Error(typeof message === "number" ? `0x${message.toString(16).padStart(3, "0")}` : message); | ||
} | ||
} |
@@ -79,3 +79,3 @@ /*! | ||
* and only utf8 and base64 encodings | ||
* @param encoding | ||
* @param encoding - encoding to use | ||
*/ | ||
@@ -146,3 +146,2 @@ public toString(encoding?: string): string { | ||
* is not as tolerant of the same malformed base64 as Node's Buffer is. | ||
* @param str | ||
*/ | ||
@@ -149,0 +148,0 @@ private static sanitizeBase64(str: string): string { |
@@ -34,7 +34,3 @@ /*! | ||
// Make this check because Buffer.from(arr) will always do a buffer copy | ||
if (Buffer.isBuffer(arr)) { | ||
return arr.toString(encoding); | ||
} else { | ||
return Buffer.from(arr).toString(encoding); | ||
} | ||
return Buffer.isBuffer(arr) ? arr.toString(encoding) : Buffer.from(arr).toString(encoding); | ||
} | ||
@@ -41,0 +37,0 @@ |
@@ -79,3 +79,3 @@ /*! | ||
const sources = this.forwardingEvents.get(event); | ||
if (sources?.has(source)) { | ||
if ((sources?.has(source)) === true) { | ||
if (this.listenerCount(event) === 0) { | ||
@@ -82,0 +82,0 @@ const listenerRemover = sources.get(source); |
@@ -79,2 +79,3 @@ /*! | ||
this.fixdown(1); | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
return x!.value; | ||
@@ -138,2 +139,3 @@ } | ||
while (this.isGreaterThanParent(k)) { | ||
// eslint-disable-next-line no-bitwise | ||
const parent = k >> 1; | ||
@@ -146,2 +148,3 @@ this.swap(k, parent); | ||
private isGreaterThanParent(k: number): boolean { | ||
// eslint-disable-next-line no-bitwise | ||
return k > 1 && (this.comp.compare(this.L[k >> 1].value, this.L[k].value) > 0); | ||
@@ -152,3 +155,5 @@ } | ||
let k = pos; | ||
// eslint-disable-next-line no-bitwise | ||
while ((k << 1) <= this.count()) { | ||
// eslint-disable-next-line no-bitwise | ||
let j = k << 1; | ||
@@ -155,0 +160,0 @@ if ((j < this.count()) && (this.comp.compare(this.L[j].value, this.L[j + 1].value) > 0)) { |
@@ -33,4 +33,5 @@ /*! | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
return this._value!; | ||
} | ||
} |
@@ -9,2 +9,2 @@ /*! | ||
export const pkgName = "@fluidframework/common-utils"; | ||
export const pkgVersion = "0.33.1000-60833"; | ||
export const pkgVersion = "0.33.1000-74526"; |
@@ -13,6 +13,6 @@ /*! | ||
export type PromiseCacheExpiry = { | ||
policy: "indefinite" | ||
policy: "indefinite"; | ||
} | { | ||
policy: "absolute" | "sliding", | ||
durationMs: number, | ||
policy: "absolute" | "sliding"; | ||
durationMs: number; | ||
}; | ||
@@ -25,5 +25,5 @@ | ||
/** Common expiration policy for all items added to this cache */ | ||
expiry?: PromiseCacheExpiry, | ||
expiry?: PromiseCacheExpiry; | ||
/** If the stored Promise is rejected with a particular error, should the given key be removed? */ | ||
removeOnError?: (e: any) => boolean, | ||
removeOnError?: (e: any) => boolean; | ||
} | ||
@@ -30,0 +30,0 @@ |
@@ -81,2 +81,3 @@ /*! | ||
Promise<TResult1 | TResult2> { | ||
// eslint-disable-next-line prefer-rest-params | ||
return this.getPromise().then<TResult1, TResult2>(...arguments); | ||
@@ -88,2 +89,3 @@ } | ||
Promise<T | TResult> { | ||
// eslint-disable-next-line prefer-rest-params | ||
return this.getPromise().catch<TResult>(...arguments); | ||
@@ -93,2 +95,3 @@ } | ||
public async finally(onfinally?: (() => void) | null | undefined): Promise<T> { | ||
// eslint-disable-next-line prefer-rest-params | ||
return this.getPromise().finally(...arguments); | ||
@@ -95,0 +98,0 @@ } |
@@ -106,2 +106,3 @@ /*! | ||
const primaryHead = head.primary + head.length; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const secondaryHead = head.secondary! + head.length; | ||
@@ -160,2 +161,3 @@ | ||
const closestRange = this.ranges[index - 1]; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
return Math.min(primary - closestRange.primary, closestRange.length) + closestRange.secondary!; | ||
@@ -187,2 +189,3 @@ } | ||
const delta = primary - range.primary; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
range.secondary = range.secondary! + Math.min(delta, range.length); | ||
@@ -189,0 +192,0 @@ range.length = Math.max(range.length - delta, 0); |
@@ -38,2 +38,3 @@ /*! | ||
approvedList.push(message); | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
} else if (this.requestMap.get(key)! + this.windowMSec > currentTime) { | ||
@@ -40,0 +41,0 @@ continue; |
@@ -181,3 +181,3 @@ /*! | ||
(timer: number) => { | ||
if(this.runningState !== undefined) { | ||
if (this.runningState !== undefined) { | ||
this.runningState.timeout = timer; | ||
@@ -184,0 +184,0 @@ } |
@@ -11,3 +11,3 @@ /*! | ||
// this allow us to correctly handle either type | ||
export type EventEmitterEventType = EventEmitter extends { on(event: infer E, listener: any) } ? E : never; | ||
export type EventEmitterEventType = EventEmitter extends { on(event: infer E, listener: any); } ? E : never; | ||
@@ -14,0 +14,0 @@ export type TypedEventTransform<TThis, TEvent> = |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
590165
30
6975