rapydscript-ng 0.7.21 → 0.7.23

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.
@@ -5,7 +5,7 @@ env:
5
5
 
6
6
  jobs:
7
7
  test:
8
- name: Test on ${{ matrix.os }} Node ${{ matrix.node }} LANG ${{ matrix.lang }}
8
+ name: Test on ${{ matrix.os }} LANG ${{ matrix.lang }}
9
9
  runs-on: ${{ matrix.os }}
10
10
  env:
11
11
  LANG: ${{ matrix.lang }}
@@ -13,12 +13,12 @@ jobs:
13
13
  strategy:
14
14
  matrix:
15
15
  include:
16
- - { node: 10.x, os: ubuntu-latest, lang: en_US.UTF-8 }
17
- - { node: 12.x, os: ubuntu-latest, lang: de_DE.UTF-8}
18
- - { node: 15.x, os: ubuntu-latest, lang: hi_IN.UTF-8 }
16
+ - { os: ubuntu-latest, lang: en_US.UTF-8 }
17
+ - { os: ubuntu-latest, lang: de_DE.UTF-8}
18
+ - { os: ubuntu-latest, lang: hi_IN.UTF-8 }
19
19
 
20
- - { node: 15.x, os: macos-latest, lang: en_US.UTF-8 }
21
- - { node: 15.x, os: windows-latest, lang: en_US.UTF-8 }
20
+ - { os: macos-latest, lang: en_US.UTF-8 }
21
+ - { os: windows-latest, lang: en_US.UTF-8 }
22
22
 
23
23
  steps:
24
24
  - name: Checkout source code
@@ -28,8 +28,6 @@ jobs:
28
28
 
29
29
  - name: Set up Node ${{ matrix.node }}
30
30
  uses: actions/setup-node@master
31
- with:
32
- node-version: ${{ matrix.node }}
33
31
 
34
32
  - name: Install deps
35
33
  run:
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ version 0.7.23
2
+ =======================
3
+
4
+ * Fix consecutive of f-strings without concatenation operator causing a syntax error
5
+
6
+ version 0.7.22
7
+ =======================
8
+
9
+ * Fix assignment operators other than the plain = not working with overload_getitem
10
+ * Fix dict.popitem() removing the first rather than the last item
11
+
1
12
  version 0.7.21
2
13
  =======================
3
14
 
package/README.md CHANGED
@@ -114,7 +114,7 @@ From NPM for use in your own node project:
114
114
 
115
115
  From Git:
116
116
 
117
- git clone git://github.com/kovidgoyal/rapydscript-ng.git
117
+ git clone https://github.com/kovidgoyal/rapydscript-ng.git
118
118
  cd rapydscript-ng
119
119
  sudo npm link .
120
120
  npm install # This will automatically install the dependencies for RapydScript
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "start": "node bin/rapydscript",
15
15
  "build-self": "node bin/rapydscript self --complete"
16
16
  },
17
- "version": "0.7.21",
17
+ "version": "0.7.23",
18
18
  "license": "BSD-2-Clause",
19
19
  "engines": {
20
20
  "node": ">=0.12.0"
package/publish.py CHANGED
@@ -33,4 +33,5 @@ gh_pages = os.path.join(os.path.dirname(base), 'kovidgoyal.github.io')
33
33
  subprocess.check_call([os.path.join(gh_pages, 'update-rapyd-repl.py')])
34
34
 
35
35
  # Publish to NPM
36
+ subprocess.check_call(['npm', 'login'])
36
37
  subprocess.check_call(['npm', 'publish', base])
@@ -706,7 +706,6 @@ if (!ρσ_list_extend.__argnames__) Object.defineProperties(ρσ_list_extend, {
706
706
  });
707
707
 
708
708
  function ρσ_list_index(val, start, stop) {
709
- var idx;
710
709
  start = start || 0;
711
710
  if (start < 0) {
712
711
  start = this.length + start;
@@ -715,11 +714,7 @@ function ρσ_list_index(val, start, stop) {
715
714
  throw new ValueError(val + " is not in list");
716
715
  }
717
716
  if (stop === undefined) {
718
- idx = this.indexOf(val, start);
719
- if (idx === -1) {
720
- throw new ValueError(val + " is not in list");
721
- }
722
- return idx;
717
+ stop = this.length;
723
718
  }
724
719
  if (stop < 0) {
725
720
  stop = this.length + stop;
@@ -756,12 +751,13 @@ if (!ρσ_list_pop.__argnames__) Object.defineProperties(ρσ_list_pop, {
756
751
  });
757
752
 
758
753
  function ρσ_list_remove(value) {
759
- var idx;
760
- idx = this.indexOf(value);
761
- if (idx === -1) {
762
- throw new ValueError(value + " not in list");
754
+ for (var i = 0; i < this.length; i++) {
755
+ if (((ρσ_expr_temp = this)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i] === value || typeof (ρσ_expr_temp = this)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i] === "object" && ρσ_equals((ρσ_expr_temp = this)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i], value))) {
756
+ this.splice(i, 1);
757
+ return;
758
+ }
763
759
  }
764
- this.splice(idx, 1);
760
+ throw new ValueError(value + " not in list");
765
761
  };
766
762
  if (!ρσ_list_remove.__argnames__) Object.defineProperties(ρσ_list_remove, {
767
763
  __argnames__ : {value: ["value"]},
@@ -2002,7 +1998,7 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
2002
1998
  });
2003
1999
  return ρσ_anonfunc;
2004
2000
  })();
2005
- ρσ_dict.prototype.set_default = (function() {
2001
+ ρσ_dict.prototype.set_default = ρσ_dict.prototype.setdefault = (function() {
2006
2002
  var ρσ_anonfunc = function (key, defval) {
2007
2003
  var j;
2008
2004
  j = this.jsmap;
@@ -2066,13 +2062,20 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
2066
2062
  })();
2067
2063
  ρσ_dict.prototype.popitem = (function() {
2068
2064
  var ρσ_anonfunc = function () {
2069
- var r;
2070
- r = this.jsmap.entries().next();
2071
- if (r.done) {
2072
- throw new KeyError("dict is empty");
2065
+ var last, e, r;
2066
+ last = null;
2067
+ e = this.jsmap.entries();
2068
+ while (true) {
2069
+ r = e.next();
2070
+ if (r.done) {
2071
+ if (last === null) {
2072
+ throw new KeyError("dict is empty");
2073
+ }
2074
+ this.jsmap.delete(last.value[0]);
2075
+ return last.value;
2076
+ }
2077
+ last = r;
2073
2078
  }
2074
- this.jsmap.delete(r.value[0]);
2075
- return r.value;
2076
2079
  };
2077
2080
  if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2078
2081
  __module__ : {value: "__main__"}
@@ -2697,6 +2700,7 @@ function ρσ_setitem(obj, key, val) {
2697
2700
  }
2698
2701
  obj[(typeof key === "number" && key < 0) ? obj.length + key : key] = val;
2699
2702
  }
2703
+ return val;
2700
2704
  };
2701
2705
  if (!ρσ_setitem.__argnames__) Object.defineProperties(ρσ_setitem, {
2702
2706
  __argnames__ : {value: ["obj", "key", "val"]},