Skip to content

Commit

Permalink
fix transpiling
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmiei committed Apr 4, 2022
1 parent 8f22308 commit 420bd1a
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 23 deletions.
13 changes: 8 additions & 5 deletions build/transpile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,8 @@ class Transpiler {
let js = fs.readFileSync (jsFile).toString ()

js = this.regexAll (js, [
[ /[^\n]+require[^\n]+\n/g, '' ],
[ /[^\n]+from[^\n]+\n/g, '' ],
[ /^export default[^\n]+\n/g, '' ],
[/^\/\*.*\s+/mg, ''],
])

Expand Down Expand Up @@ -1401,7 +1402,8 @@ class Transpiler {

js = this.regexAll (js, [
[ /\'use strict\';?\s+/g, '' ],
[ /[^\n]+require[^\n]+\n/g, '' ],
[ /[^\n]+from[^\n]+\n/g, '' ],
[ /^export default[^\n]+\n/g, '' ],
[ /decimalToPrecision/g, 'decimal_to_precision' ],
[ /numberToString/g, 'number_to_string' ],
])
Expand Down Expand Up @@ -1472,7 +1474,8 @@ class Transpiler {

js = this.regexAll (js, [
[ /\'use strict\';?\s+/g, '' ],
[ /[^\n]+require[^\n]+\n/g, '' ],
[ /[^\n]+from[^\n]+\n/g, '' ],
[ /^export default[^\n]+\n/g, '' ],
[ /function equals \([\S\s]+?return true\n}\n/g, '' ],
])

Expand Down Expand Up @@ -1580,8 +1583,8 @@ class Transpiler {

js = this.regexAll (js, [
[ /\'use strict\';?\s+/g, '' ],
[ /[^\n]+require[^\n]+\n/g, '' ],
[ /module.exports\s+=\s+[^;]+;/g, '' ],
[ /[^\n]+from[^\n]+\n/g, '' ],
[ /export default\s+[^\n]+;*\n*/g, '' ],
])

const pythonHeader = [
Expand Down
2 changes: 1 addition & 1 deletion build/update-badges.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


import fs from 'fs';
import ccxt from '../ccxt';
import ccxt from '../ccxt.js';
import log from 'ololog';
import ansicolor from 'ansicolor';

Expand Down
2 changes: 0 additions & 2 deletions js/test/Exchange/test.leverageTier.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import assert from 'assert';

function testLeverageTier (exchange, method, tier) {
Expand Down
2 changes: 0 additions & 2 deletions js/test/Exchange/test.market.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import assert from 'assert'

function testMarket (exchange, market, method) {
Expand Down
2 changes: 0 additions & 2 deletions js/test/Exchange/test.ohlcv.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import assert from 'assert';

function testOHLCV (exchange, ohlcv, symbol, now) {
Expand Down
2 changes: 0 additions & 2 deletions js/test/Exchange/test.order.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import assert from 'assert';

function testOrder (exchange, order, symbol, now) {
Expand Down
2 changes: 0 additions & 2 deletions js/test/Exchange/test.position.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import assert from 'assert';

function testPosition (exchange, position, symbol, now) {
Expand Down
2 changes: 0 additions & 2 deletions js/test/Exchange/test.trade.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import assert from 'assert';

function testTrade (exchange, trade, symbol, now) {
Expand Down
4 changes: 0 additions & 4 deletions js/test/Exchange/test.transaction.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@


// ----------------------------------------------------------------------------

import assert from 'assert';

// ---------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion js/test/base/functions/test.number.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { numberToString, decimalToPrecision, ROUND, TRUNCATE, DECIMAL_PLACES, TICK_SIZE, PAD_WITH_ZERO, SIGNIFICANT_DIGITS } from '../../../../ccxt.js';
import { Precise } from '../../../base/Precise.js'
import { assert } from 'assert';
Expand Down

0 comments on commit 420bd1a

Please sign in to comment.