Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@glimmer/program

Package Overview
Dependencies
Maintainers
10
Versions
243
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glimmer/program - npm Package Compare versions

Comparing version 0.29.8 to 0.29.9

9

dist/amd/es5/glimmer-program.js

@@ -12,2 +12,4 @@ define('@glimmer/program', ['exports', '@glimmer/encoder'], function (exports, _glimmer_encoder) { 'use strict';

var UNRESOLVED = {};
var WELL_KNOWN_EMPTY_ARRAY_POSITION = 0;
var WELL_KNOW_EMPTY_ARRAY = Object.freeze([]);

@@ -20,3 +22,3 @@ var WriteOnlyConstants = function () {

this.strings = [];
this.arrays = [];
this.arrays = [WELL_KNOW_EMPTY_ARRAY];
this.tables = [];

@@ -59,2 +61,5 @@ this.handles = [];

WriteOnlyConstants.prototype.array = function array(values) {
if (values.length === 0) {
return WELL_KNOWN_EMPTY_ARRAY_POSITION;
}
var index = this.arrays.indexOf(values);

@@ -551,2 +556,2 @@ if (index > -1) {

//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xpbW1lci1wcm9ncmFtLmpzIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9jb25zdGFudHMudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9vcGNvZGUudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9wcm9ncmFtLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE9wYXF1ZSwgU3ltYm9sVGFibGUsIFJ1bnRpbWVSZXNvbHZlciwgQ29tcGlsZVRpbWVDb25zdGFudHMgfSBmcm9tIFwiQGdsaW1tZX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QUdiLElBQUk7O1dBR047Ozs7Ozs7Ozs7Ozs7OzsifQ==

@@ -7,2 +7,4 @@ "use strict";

const UNRESOLVED = {};
const WELL_KNOWN_EMPTY_ARRAY_POSITION = 0;
const WELL_KNOW_EMPTY_ARRAY = Object.freeze([]);
class WriteOnlyConstants {

@@ -12,3 +14,3 @@ constructor() {

this.strings = [];
this.arrays = [];
this.arrays = [WELL_KNOW_EMPTY_ARRAY];
this.tables = [];

@@ -46,2 +48,5 @@ this.handles = [];

array(values) {
if (values.length === 0) {
return WELL_KNOWN_EMPTY_ARRAY_POSITION;
}
let index = this.arrays.indexOf(values);

@@ -202,2 +207,2 @@ if (index > -1) {

exports.LazyConstants = LazyConstants;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcGFja2FnZXMvQGdsaW1tZXIvcHJvZ3JhbS9saWIvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBRUEsTUFBTSxBQUFVLGFBQUcsQUFBRSxBQUFDLEFBb0J0QixBQUFNOztrQkFDSixBQUFpQjtBQUVQO2FBQU8sVUFBYSxBQUFFLEFBQUMsQUFDdkI7YUFBTSxTQUFlLEFBQUUsQUFBQyxBQUN4QjthQUFNLFNBQWtCLEFBQUUsQUFBQyxBQUMzQjthQUFPLFVBQWEsQUFBRSxBQUFDLEFBQ3ZCO2FBQWEsZ0JBQWEsQUFBRSxBQUFDLEFBQzdCO2FBQVEsV0FBYSxBQUFFLEFBQUMsQUFDeEI7YUFBTSxTQUFhLEFBQUUsQUFBQyxBQUN0QjthQUFTLFlBQWEsQUFBRSxBQUFDLEFBa0ZyQyxBQUFDO0FBaEZDLEFBQUs7VUFBQyxBQUFhLE9BQ2pCO1lBQUksQUFBSyxRQUFHLEFBQUksS0FBQyxBQUFN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GVyKTtcbiAgfVxufVxuIl19

@@ -33,2 +33,4 @@ "use strict";

var UNRESOLVED = {};
var WELL_KNOWN_EMPTY_ARRAY_POSITION = 0;
var WELL_KNOW_EMPTY_ARRAY = Object.freeze([]);

@@ -41,3 +43,3 @@ var WriteOnlyConstants = function () {

this.strings = [];
this.arrays = [];
this.arrays = [WELL_KNOW_EMPTY_ARRAY];
this.tables = [];

@@ -80,2 +82,5 @@ this.handles = [];

WriteOnlyConstants.prototype.array = function array(values) {
if (values.length === 0) {
return WELL_KNOWN_EMPTY_ARRAY_POSITION;
}
var index = this.arrays.indexOf(values);

@@ -287,2 +292,2 @@ if (index > -1) {

exports.LazyConstants = LazyConstants;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcGFja2FnZXMvQGdsaW1tZXIvcHJvZ3JhbS9saWIvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQSxJQUFNLEFBQVUsYUFBRyxBQUFFLEFBQUMsQUFvQnRCLEFBQU07O0lBQU47a0NBQ0UsQUFBaUI7OEJBRVA7OzthQUFPLFVBQWEsQUFBRSxBQUFDLEFBQ3ZCO2FBQU0sU0FBZSxBQUFFLEFBQUMsQUFDeEI7YUFBTSxTQUFrQixBQUFFLEFBQUMsQUFDM0I7YUFBTyxVQUFhLEFBQUUsQUFBQyxBQUN2QjthQUFhLGdCQUFhLEFBQUUsQUFBQyxBQUM3QjthQUFRLFdBQWEsQUFBRSxBQUFDLEFBQ3hCO2FBQU0sU0FBYSxBQUFFLEFBQUMsQUFDdEI7YUFBUyxZQUFhLEFBQUUsQUFBQyxBQWtGckMsQUFBQyxBQWhGQyxBQUFLOzs7d0RBQUMsQUF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KHM6IG51bWJlcik6IFQge1xuICAgIHJldHVybiB0aGlzLnNlcmlhbGl6YWJsZXNbc10gYXMgVDtcbiAgfVxufVxuXG5leHBvcnQgY2xhc3MgTGF6eUNvbnN0YW50cyBleHRlbmRzIENvbnN0YW50czxPcGFxdWU+IHtcbiAgcHJpdmF0ZSBvdGhlcnM6IE9wYXF1ZVtdID0gW107XG5cbiAgZ2V0T3RoZXI8VD4odmFsdWU6IG51bWJlcik6IFQge1xuICAgIHJldHVybiB0aGlzLm90aGVyc1t2YWx1ZSAtIDFdIGFzIFQ7XG4gIH1cblxuICBvdGhlcihvdGhlcjogT3BhcXVlKTogbnVtYmVyIHtcbiAgICByZXR1cm4gdGhpcy5vdGhlcnMucHVzaChvdGhlcik7XG4gIH1cbn1cbiJdfQ==
const UNRESOLVED = {};
const WELL_KNOWN_EMPTY_ARRAY_POSITION = 0;
const WELL_KNOW_EMPTY_ARRAY = Object.freeze([]);
export class WriteOnlyConstants {

@@ -6,3 +8,3 @@ constructor() {

this.strings = [];
this.arrays = [];
this.arrays = [WELL_KNOW_EMPTY_ARRAY];
this.tables = [];

@@ -40,2 +42,5 @@ this.handles = [];

array(values) {
if (values.length === 0) {
return WELL_KNOWN_EMPTY_ARRAY_POSITION;
}
let index = this.arrays.indexOf(values);

@@ -192,2 +197,2 @@ if (index > -1) {

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcGFja2FnZXMvQGdsaW1tZXIvcHJvZ3JhbS9saWIvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sQUFBVSxhQUFHLEFBQUUsQUFBQztBQW9CdEIsQUFBTTtBQUFOO0FBQ0UsQUFBaUI7QUFFUCxhQUFPLFVBQWEsQUFBRSxBQUFDO0FBQ3ZCLGF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Xhwb3J0IGNsYXNzIExhenlDb25zdGFudHMgZXh0ZW5kcyBDb25zdGFudHM8T3BhcXVlPiB7XG4gIHByaXZhdGUgb3RoZXJzOiBPcGFxdWVbXSA9IFtdO1xuXG4gIGdldE90aGVyPFQ+KHZhbHVlOiBudW1iZXIpOiBUIHtcbiAgICByZXR1cm4gdGhpcy5vdGhlcnNbdmFsdWUgLSAxXSBhcyBUO1xuICB9XG5cbiAgb3RoZXIob3RoZXI6IE9wYXF1ZSk6IG51bWJlciB7XG4gICAgcmV0dXJuIHRoaXMub3RoZXJzLnB1c2gob3RoZXIpO1xuICB9XG59XG4iXX0=

@@ -10,2 +10,4 @@ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }

var UNRESOLVED = {};
var WELL_KNOWN_EMPTY_ARRAY_POSITION = 0;
var WELL_KNOW_EMPTY_ARRAY = Object.freeze([]);

@@ -18,3 +20,3 @@ var WriteOnlyConstants = function () {

this.strings = [];
this.arrays = [];
this.arrays = [WELL_KNOW_EMPTY_ARRAY];
this.tables = [];

@@ -57,2 +59,5 @@ this.handles = [];

WriteOnlyConstants.prototype.array = function array(values) {
if (values.length === 0) {
return WELL_KNOWN_EMPTY_ARRAY_POSITION;
}
var index = this.arrays.indexOf(values);

@@ -265,2 +270,2 @@ if (index > -1) {

export { LazyConstants };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcGFja2FnZXMvQGdsaW1tZXIvcHJvZ3JhbS9saWIvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBRUEsSUFBTSxBQUF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2ZWRbaW5kZXhdO1xuXG4gICAgaWYgKHJlc29sdmVkID09PSBVTlJFU09MVkVEKSB7XG4gICAgICBsZXQgaGFuZGxlID0gdGhpcy5oYW5kbGVzW2luZGV4XTtcbiAgICAgIHJlc29sdmVkID0gdGhpcy5yZXNvbHZlZFtpbmRleF0gPSB0aGlzLnJlc29sdmVyLnJlc29sdmUoaGFuZGxlKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcmVzb2x2ZWQgYXMgVDtcbiAgfVxuXG4gIGdldFNlcmlhbGl6YWJsZTxUPihzOiBudW1iZXIpOiBUIHtcbiAgICByZXR1cm4gdGhpcy5zZXJpYWxpemFibGVzW3NdIGFzIFQ7XG4gIH1cbn1cblxuZXhwb3J0IGNsYXNzIExhenlDb25zdGFudHMgZXh0ZW5kcyBDb25zdGFudHM8T3BhcXVlPiB7XG4gIHByaXZhdGUgb3RoZXJzOiBPcGFxdWVbXSA9IFtdO1xuXG4gIGdldE90aGVyPFQ+KHZhbHVlOiBudW1iZXIpOiBUIHtcbiAgICByZXR1cm4gdGhpcy5vdGhlcnNbdmFsdWUgLSAxXSBhcyBUO1xuICB9XG5cbiAgb3RoZXIob3RoZXI6IE9wYXF1ZSk6IG51bWJlciB7XG4gICAgcmV0dXJuIHRoaXMub3RoZXJzLnB1c2gob3RoZXIpO1xuICB9XG59XG4iXX0=
import { Opaque, SymbolTable, RuntimeResolver, CompileTimeConstants } from "@glimmer/interfaces";
export declare type EMPTY_ARRAY = Array<ReadonlyArray<never>>;
export interface ConstantPool {
strings: string[];
arrays: number[][];
arrays: number[][] | EMPTY_ARRAY;
tables: SymbolTable[];

@@ -20,3 +21,3 @@ handles: number[];

protected strings: string[];
protected arrays: number[][];
protected arrays: number[][] | EMPTY_ARRAY;
protected tables: SymbolTable[];

@@ -41,3 +42,3 @@ protected handles: number[];

protected strings: string[];
protected arrays: number[][];
protected arrays: number[][] | EMPTY_ARRAY;
protected tables: SymbolTable[];

@@ -44,0 +45,0 @@ protected handles: number[];

{
"name": "@glimmer/program",
"version": "0.29.8",
"version": "0.29.9",
"repository": "https://github.com/glimmerjs/glimmer-vm/tree/master/packages/@glimmer/program",
"dependencies": {
"@glimmer/util": "^0.29.8",
"@glimmer/interfaces": "^0.29.8",
"@glimmer/encoder": "^0.29.8"
"@glimmer/util": "^0.29.9",
"@glimmer/interfaces": "^0.29.9",
"@glimmer/encoder": "^0.29.9"
},

@@ -10,0 +10,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc