less 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cda87971c710025bff8ade858b229def9f977d87
4
- data.tar.gz: 2507829b7fd2c2973021a9ecc5f6719bd935e50d
3
+ metadata.gz: c3a4db88aefa8acebc9d23dd991e81dd607c9914
4
+ data.tar.gz: 76ec06952260ffbb08bf7bdc01233280cf6f851a
5
5
  SHA512:
6
- metadata.gz: 83a398fda51b41c60604cf740a6c63cfc5c4b1d07977d552973bf1412860929028ccef6e622c483b90698c4f938b63670a55d11f736993542d137ca191eb0b68
7
- data.tar.gz: 504a2ccd28f704ba2f349975329bf5b929d516dada140c0072914c6c242e4b2a0a8e57d393d44e54e20383239cac791fd73e74d2ac1d43fcbb9ca4ece3f962de
6
+ metadata.gz: 970d9d1d41cb14a8381c4877424af2287cf2d0771b6ddc7ba994c734a47b271e49bb9a8169c91cb8304e0f10b2517e283734aed4c62bd2a9227383c6101561bb
7
+ data.tar.gz: f363f10d080ad4e04ff62b6f5678167741840b707cb7323a02f4c15d2ac78eee03335e781ec6d43d4690a0a544481c5d1b601d9bfef1054447c933d75ea6b030
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.5.1 2014/5/30
4
+
5
+ * upgrade to less 1.6.3
6
+
3
7
  ## 2.5.0 2014/02/17
4
8
 
5
9
  * upgrade to less 1.6.2
@@ -13,11 +13,11 @@ end
13
13
  module Less
14
14
  module JavaScript
15
15
  class RhinoContext
16
-
16
+
17
17
  def self.instance
18
18
  return new # NOTE: for Rhino a context should be kept open per thread !
19
19
  end
20
-
20
+
21
21
  def initialize(globals = nil)
22
22
  @rhino_context = Rhino::Context.new :java => true
23
23
  if @rhino_context.respond_to?(:version)
@@ -32,7 +32,7 @@ module Less
32
32
  def unwrap
33
33
  @rhino_context
34
34
  end
35
-
35
+
36
36
  def exec(&block)
37
37
  @rhino_context.open(&block)
38
38
  rescue Rhino::JSError => e
@@ -41,7 +41,7 @@ module Less
41
41
 
42
42
  def eval(source, options = {})
43
43
  source = source.encode('UTF-8') if source.respond_to?(:encode)
44
-
44
+
45
45
  source_name = options[:source_name] || "<eval>"
46
46
  line_number = options[:line_number] || 1
47
47
  @rhino_context.eval("(#{source})", source_name, line_number)
@@ -51,14 +51,14 @@ module Less
51
51
 
52
52
  def call(properties, *args)
53
53
  options = args.last.is_a?(::Hash) ? args.pop : {} # extract_option!
54
-
54
+
55
55
  source_name = options[:source_name] || "<eval>"
56
56
  line_number = options[:line_number] || 1
57
57
  @rhino_context.eval(properties, source_name, line_number).call(*args)
58
58
  rescue Rhino::JSError => e
59
59
  handle_js_error(e)
60
60
  end
61
-
61
+
62
62
  def method_missing(symbol, *args)
63
63
  if @rhino_context.respond_to?(symbol)
64
64
  @rhino_context.send(symbol, *args)
@@ -66,35 +66,35 @@ module Less
66
66
  super
67
67
  end
68
68
  end
69
-
69
+
70
70
  private
71
-
71
+
72
72
  def handle_js_error(e)
73
73
  if e.value && ( e.value['message'] || e.value['type'].is_a?(String) )
74
74
  raise Less::ParseError.new(e, e.value) # LessError
75
75
  end
76
- if e.unwrap.to_s =~ /missing closing `\}`/
76
+ if e.unwrap.to_s =~ /missing opening `\(`/
77
77
  raise Less::ParseError.new(e.unwrap.to_s)
78
78
  end
79
79
  if e.message && e.message[0, 12] == "Syntax Error"
80
80
  raise Less::ParseError.new(e)
81
81
  else
82
82
  raise Less::Error.new(e)
83
- end
83
+ end
84
84
  end
85
-
85
+
86
86
  def apply_1_8_compatibility!
87
87
  # TODO rather load ecma-5.js ...
88
88
  @rhino_context.eval("
89
89
  // String
90
- if ( ! String.prototype.trim ) {
91
- String.prototype.trim = function () {
92
- return this.replace(/^\s+|\s+$/g,'');
93
- };
90
+ if ( ! String.prototype.trim ) {
91
+ String.prototype.trim = function () {
92
+ return this.replace(/^\s+|\s+$/g,'');
93
+ };
94
94
  }
95
95
  ")
96
96
  end
97
-
97
+
98
98
  end
99
99
  end
100
100
  end
@@ -1,3 +1,9 @@
1
+ # 1.6.3
2
+
3
+ 2014-02-08
4
+
5
+ - Fix issue with calling toCSS twice not working in some situations (like with bootstrap 2)
6
+
1
7
  # 1.6.2
2
8
 
3
9
  2014-02-02
@@ -1,4 +1,4 @@
1
- # [Less.js v1.6.2](http://lesscss.org)
1
+ # [Less.js v1.6.3](http://lesscss.org)
2
2
 
3
3
  > The **dynamic** stylesheet language. [http://lesscss.org](http://lesscss.org).
4
4
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "less",
3
- "version": "1.6.2",
4
- "main": "./dist/less-1.6.2.js",
3
+ "version": "1.6.3",
4
+ "main": "./dist/less-1.6.3.js",
5
5
  "ignore": [
6
6
  "**/.*",
7
7
  "benchmark",
@@ -4,7 +4,7 @@ var path = require('path'),
4
4
  fs = require('fs');
5
5
 
6
6
  var less = {
7
- version: [1, 6, 2],
7
+ version: [1, 6, 3],
8
8
  Parser: require('./parser').Parser,
9
9
  tree: require('./tree'),
10
10
  render: function (input, options, callback) {
@@ -18,6 +18,9 @@
18
18
  },
19
19
 
20
20
  visitMixinDefinition: function (mixinNode, visitArgs) {
21
+ // mixin definitions do not get eval'd - this means they keep state
22
+ // so we have to clear that state here so it isn't used if toCSS is called twice
23
+ mixinNode.frames = [];
21
24
  return [];
22
25
  },
23
26
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "less",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "Leaner CSS",
5
5
  "homepage": "http://lesscss.org",
6
6
  "author": {
@@ -31,7 +31,7 @@
31
31
  "test": "./test"
32
32
  },
33
33
  "jam": {
34
- "main": "./dist/less-1.5.0.js"
34
+ "main": "./dist/less-1.6.3.js"
35
35
  },
36
36
  "engines": {
37
37
  "node": ">=0.4.2"
@@ -41,7 +41,7 @@
41
41
  .tst2 {
42
42
  color: white;
43
43
  }
44
- /* line 27, c:\git\less.js\test\less\debug\linenumbers.less */
44
+ /* line 27, {path}linenumbers.less */
45
45
  @media -sass-debug-info{filename{font-family:file\:\/\/{pathesc}linenumbers\.less}line{font-family:\0000327}}
46
46
  .test {
47
47
  color: red;
@@ -227,6 +227,8 @@ module.exports = function() {
227
227
  } else {
228
228
  try {
229
229
  css = tree.toCSS(options);
230
+ var css2 = tree.toCSS(options); // integration test that 2nd call gets same output
231
+ if (css2 !== css) { throw new Error("css not equal to 2nd call"); }
230
232
  callback(null, css);
231
233
  } catch (e) {
232
234
  callback(e);
@@ -1,3 +1,3 @@
1
1
  module Less
2
- VERSION = '2.5.0'
2
+ VERSION = '2.5.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: less
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Lowell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-17 00:00:00.000000000 Z
11
+ date: 2014-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commonjs