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

angular-message-format

Package Overview
Dependencies
Maintainers
3
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-message-format - npm Package Versions

1
57

1.5.0-beta.2

Diff

Changelog

Source

1.5.0-beta.2 effective-delegation (2015-11-17)

Bug Fixes

  • $animate: ensure leave animation calls close callback (bfad2a4f, #12278, #12096, #13054)
  • $cacheFactory: check key exists before decreasing cache size count (b9bed7d9, #12321, #12329)
  • $compile:
  • $http: apply transformResponse even when data is empty (7c0731ed, #12976, #12979)
  • $location: ensure $locationChangeSuccess fires even if URL ends with # (4412fe23, #12175, #13251)
  • $parse: evaluate simple expressions in interpolations only once (1caf0b6b, #12983, #13002)
  • $resource: allow XHR request to be cancelled via a timeout promise (4fc73466, #12657, #12675, #10890, #9332)
  • $rootScope: prevent IE9 memory leak when destroying scopes (8fe781fb, #10706, #11786)
  • Angular.js: fix isArrayLike for unusual cases (2c8d87e0, #10186, #8000, #4855, #4751, #10272)
  • isArrayLike: handle jQuery objects of length 0 (773efd08)
  • jqLite:
  • limitTo: start at 0 if begin is negative and exceeds input length (ecf93048, #12775, #12781)
  • merge:
    • ensure that jqlite->jqlite and DOM->DOM (75292a6c)
    • clone elements instead of treating them like simple objects (17715fa3, #12286)
  • ngAria: don't add tabindex to radio and checkbox inputs (662fb282, #12492, #13095)
  • ngInput: change URL_REGEXP to better match RFC3987 (ffb6b2fb, #11341, #11381)
  • ngMessage: make ngMessage compatible with ngBind (4971ef12, #8089, #13074)
  • ngMock: reset cache before every test (fd83d372, #13013)
  • ngOptions:
  • orderByFilter: throw error if input is not array-like (2a85a634, #11255, #11719)

Features

Performance Improvements

  • $compile: use static jquery data method to avoid creating new instances (9b90c32f)
  • $interpolate: provide a simplified result for constant expressions (cf83b4f4)
  • copy:
    • avoid regex in isTypedArray (c8768d12)
    • only validate/clear if the user specifies a destination (33c67ce7, #12068)
  • merge: remove unnecessary wrapping of jqLite element (4daafd3d, #13236)

Breaking Changes

ngMessage is now compiled with a priority of 1, which means directives on the same element as ngMessage with a priority lower than 1 will be applied when ngMessage calls the $transclude function. Previously, they were applied during the initial compile phase and were passed the comment element created by the transclusion of ngMessage. To restore this behavior, custom directives need to have their priority increased to at least "1".

Previously, an non array-like input would pass through the orderBy filter unchanged. Now, an error is thrown. This can be worked around by converting an object to an array, either manually or using a filter such as https://github.com/petebacondarwin/angular-toArrayFilter. (null and undefined still pass through without an error, in order to support asynchronous loading of resources.)

<a name="1.5.0-beta.1"></a>

angularcore
published 1.4.7 •

Changelog

Source

1.4.7 dark-luminescence (2015-09-29)

Bug Fixes

  • $compile: use createMap() for $$observe listeners when initialized from attr interpolation (5a98e806, #10446)
  • $parse:
    • block assigning to fields of a constructor (a7f3761e, #12860)
    • do not convert to string computed properties multiple times (698af191)
  • filters: ensure formatNumber observes i18n decimal separators (4994acd2, #10342, #12850)
  • jqLite: properly handle dash-delimited node names in jqLiteBuildFragment (cdd1227a, #10617, #12759)
  • ngAnimate:
    • ensure anchoring uses body as a container when needed (9d3704ca, #12872)
    • callback detection should only use RAF when necessary (fa8c399f)
  • ngMessages: prevent race condition with ngAnimate (7295c60f, #12856, #12903)
  • ngOptions:

Features

<a name="1.3.20"></a>

angularcore
published 1.5.0-beta.0 •

Changelog

Source

1.5.0-beta.0 intialization-processation (2015-09-17)

Bug Fixes

  • jqLite:: properly handle dash-delimited node names in jqLiteBuildFragment (cdd1227a3, #10617)

<a name="1.4.6"></a>

angularcore
published 1.4.6 •

Changelog

Source

1.4.6 multiplicative-elevation (2015-09-17)

Bug Fixes

Performance Improvements

  • Angular: only create new collection in getBlockNodes if the block has changed (0202663e, #9899)

<a name="1.3.19"></a>

angularcore
published 1.4.5 •

Changelog

Source

1.4.5 permanent-internship (2015-08-28)

Bug Fixes

Breaking Changes

The ngPattern and pattern directives will validate the regex against the viewValue of ngModel, i.e. the value of the model before the $parsers are applied. Previously, the modelValue (the result of the $parsers) was validated.

This fixes issues where input[date] and input[number] cannot be validated because the viewValue string is parsed into Date and Number respectively (starting with AngularJS 1.3). It also brings the directives in line with HTML5 constraint validation, which validates against the input value.

This change is unlikely to cause applications to fail, because even in AngularJS 1.2, the value that was validated by pattern could have been manipulated by the $parsers, as all validation was done inside this pipeline.

If you rely on the pattern being validated against the modelValue, you must create your own validator directive that overwrites the built-in pattern validator:

.directive('patternModelOverwrite', function patternModelOverwriteDirective() {
  return {
    restrict: 'A',
    require: '?ngModel',
    priority: 1,
    compile: function() {
      var regexp, patternExp;

      return {
        pre: function(scope, elm, attr, ctrl) {
          if (!ctrl) return;

          attr.$observe('pattern', function(regex) {
            /**
             * The built-in directive will call our overwritten validator
             * (see below). We just need to update the regex.
             * The preLink fn guarantees our observer is called first.
             */
            if (isString(regex) && regex.length > 0) {
              regex = new RegExp('^' + regex + '$');
            }

            if (regex && !regex.test) {
              //The built-in validator will throw at this point
              return;
            }

            regexp = regex || undefined;
          });

        },
        post: function(scope, elm, attr, ctrl) {
          if (!ctrl) return;

          regexp, patternExp = attr.ngPattern || attr.pattern;

          //The postLink fn guarantees we overwrite the built-in pattern validator
          ctrl.$validators.pattern = function(value) {
            return ctrl.$isEmpty(value) ||
              isUndefined(regexp) ||
              regexp.test(value);
          };
        }
      };
    }
  };
});

<a name="1.3.18"></a>

angularcore
published 1.4.4 •

Changelog

Source

1.4.4 pylon-requirement (2015-08-13)

Bug Fixes

Features

Performance Improvements

Breaking Changes

  • ngAnimate: due to 32d3cbb3, CSS classes added/removed by ngAnimate are now applied synchronously once the first digest has passed.

The previous behavior involved ngAnimate having to wait for one requestAnimationFrame before CSS classes were added/removed. The CSS classes are now applied directly after the first digest that is triggered after $animate.addClass, $animate.removeClass or $animate.setClass is called. If any of your code relies on waiting for one frame before checking for CSS classes on the element then please change this behavior. If a parent class-based animation, however, is run through a JavaScript animation which triggers an animation for beforeAddClass and/or beforeRemoveClass then the CSS classes will not be applied in time for the children (and the parent class-based animation will not be cancelled by any child animations).

  • $q due to 6838c979, When writing tests, there is no need to call $timeout.flush() to resolve a call to $q.when with a value.

The previous behavior involved creating an extra promise that needed to be resolved. This is no longer needed when $q.when is called with a value. In the case that the test is not aware if $q.when is called with a value or another promise, it is possible to replace $timeout.flush(); with $timeout.flush(0);.

describe('$q.when', function() {
  it('should not need a call to $timeout.flush() to resolve already resolved promises',
      inject(function($q, $timeout) {
    $q.when('foo');
    // In AngularJS 1.4.3 a call to `$timeout.flush();` was needed
    $timeout.verifyNoPendingTasks();
  }));

  it('should accept $timeout.flush(0) when not sure if $q.when was called with a value or a promise',
      inject(function($q, $timeout) {
    $q.when('foo');
    $timeout.flush(0);
    $timeout.verifyNoPendingTasks();
  }));

  it('should need a call to $timeout.flush() to resolve $q.when when called with a promise',
        inject(function($q, $timeout) {
    $q.when($q.when('foo'));
    $timeout.flush();
    $timeout.verifyNoPendingTasks();
  }));
});
  • form: Due to 94533e57, the name attribute of form elements can now only contain characters that can be evaluated as part of an Angular expression. This is because Angular uses the value of name as an assignable expression to set the form on the $scope. For example, name="myForm" assigns the form to $scope.myForm and name="myObj.myForm" assigns it to $scope.myObj.myForm.

    Previously, it was possible to also use names such name="my:name", because Angular used a special setter function for the form name. Now the general, more robust $parse setter is used.

    The easiest way to migrate your code is therefore to remove all special characters from the name attribute.

    If you need to keep the special characters, you can use the following directive, which will replace the name with a value that can be evaluated as an expression in the compile function, and then re-set the original name in the postLink function. This ensures that (1), the form is published on the scope, and (2), the form has the original name, which might be important if you are doing server-side form submission.

    angular.module('myApp').directive('form', function() {
      return {
        restrict: 'E',
        priority: 1000,
        compile: function(element, attrs) {
          var unsupportedCharacter = ':'; // change accordingly
          var originalName = attrs.name;
          if (attrs.name && attrs.name.indexOf(unsupportedCharacter) > 0) {
            attrs.$set('name', 'this["' + originalName + '"]');
          }
    
          return postLinkFunction(scope, element) {
            // Don't trigger $observers
            element.setAttribute('name', originalName);
          }
        }
      };
    });
    

<a name="1.4.3"></a>

angularcore
published 1.4.3 •

Changelog

Source

1.4.3 foam-acceleration (2015-07-15)

Bug Fixes

<a name="1.4.2"></a>

angularcore
published 1.4.2 •

Changelog

Source

1.4.2 nebular-readjustment (2015-07-06)

Bug Fixes

Features

Breaking Changes

  • ngInclude: due to 3c6e8ce044446735eb2e70d0061db8c6db050289, the src attribute of ngInclude no longer accepts an expression that returns the result of $sce.trustAsResourceUrl. This will now cause an infinite digest:

Before:

<div ng-include="findTemplate('https://example.com/myTemplate.html')"></div>
$scope.findTemplate = function(templateName) {
  return $sce.trustAsResourceUrl(templateName);
};

To migrate, either cache the result of trustAsResourceUrl(), or put the template url in the resource whitelist in the config() function:

After:

var templateCache = {};
$scope.findTemplate = function(templateName) {
  if (!templateCache[templateName]) {
    templateCache[templateName] = $sce.trustAsResourceUrl(templateName);
  }

  return  templateCache[templateName];
};

// Alternatively, use `$sceDelegateProvider.resourceUrlWhitelist()`:

angular.module('myApp', []).config(function($sceDelegateProvider) {
  $sceDelegateProvider.resourceUrlWhitelist(['self', 'https://example.com/**'])
});

<a name="1.3.17"></a>

angularcore
published 1.4.1 •

Changelog

Source

1.4.1 hyperionic-illumination (2015-06-16)

Bug Fixes

Features

Performance Improvements

  • $compile: avoid jquery data calls when there is no data (9efb0d5e)

<a name="1.3.16"></a>

angularcore
published 1.4.0 •

Changelog

Source

1.4.0 jaracimrman-existence (2015-05-26)

Bug Fixes

  • $animate:
  • $animateCss: ensure that custom durations do not confuse the gcs cache (e0e1b520, #11723, #11852)
  • $http: do not modify the config object passed into $http short methods (f7a4b481)
  • ngAnimate:
    • close follow-up class-based animations when the same class is added/removed when removed/added (db246eb7, #11717)
    • ensure nested class-based animations are spaced out with a RAF (213c2a70, #11812)
    • class-based animations must not set addClass/removeClass CSS classes on the element (3a3db690, #11810)
    • ensure that repeated structural calls during pre-digest function (2327f5a0, #11867)
    • ensure that cancelled class-based animations are properly cleaned up (718ff844, #11652)
    • throw an error if a callback is passed to animate methods (9bb4d6cc, #11826, #11713)
    • ensure anchored animations remove the leave element at correct time (64c66d0e, #11850)
  • select: prevent unknown option being added to select when bound to null property (4090491c, #11872, #11875)

Features

<a name="1.4.0-rc.2"></a>

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