From e10ceff503b702b513ab61233bde06ef00281df1 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Wed, 28 Nov 2018 17:12:17 -0600 Subject: [PATCH] Update JS impls: use ffi-napi and Ubuntu 18.04 --- .gitignore | 3 +++ clojure/Dockerfile | 11 +++++++---- clojure/package.json | 4 ++-- clojure/project.clj | 2 +- clojure/src/mal/node_readline.js | 2 +- clojure/src/mal/readline.cljs | 2 +- coffee/Dockerfile | 12 +++++------- coffee/node_readline.coffee | 2 +- coffee/package.json | 4 ++-- crystal/Dockerfile | 4 ++-- elm/Dockerfile | 14 +++++++++----- elm/node_readline.js | 2 +- elm/package.json | 2 +- es6/Dockerfile | 8 ++++---- es6/core.mjs | 8 +++++--- es6/node_readline.js | 2 +- es6/package.json | 6 +++--- es6/run | 2 +- es6/step0_repl.mjs | 3 ++- es6/step1_read_print.mjs | 3 ++- es6/step2_eval.mjs | 3 ++- es6/step3_env.mjs | 3 ++- es6/step4_if_fn_do.mjs | 3 ++- es6/step5_tco.mjs | 3 ++- es6/step6_file.mjs | 3 ++- es6/step7_quote.mjs | 3 ++- es6/step8_macros.mjs | 3 ++- es6/step9_try.mjs | 3 ++- es6/stepA_mal.mjs | 3 ++- haxe/Dockerfile | 10 ++++------ haxe/node_readline.js | 2 +- haxe/package.json | 2 +- js/Dockerfile | 11 ++++------- js/node_readline.js | 2 +- js/package.json | 2 +- livescript/Dockerfile | 8 ++++---- livescript/node_readline.js | 2 +- livescript/package.json | 4 ++-- miniMAL/Dockerfile | 10 ++++------ miniMAL/node_readline.js | 2 +- miniMAL/package.json | 2 +- ts/Dockerfile | 12 +++++++++--- ts/node_readline.ts | 2 +- ts/package.json | 4 ++-- 44 files changed, 109 insertions(+), 89 deletions(-) diff --git a/.gitignore b/.gitignore index a7558f61..f3eac16c 100644 --- a/.gitignore +++ b/.gitignore @@ -71,6 +71,8 @@ haxe/*.js java/mal.jar java/target/ java/dependency-reduced-pom.xml +.npm/ +.node-gyp/ js/mal.js js/web/mal.js kotlin/*.jar @@ -103,6 +105,7 @@ ps/mal.ps python/mal.pyz r/mal.r ruby/mal.rb +.cargo/ rust/target/ rust/Cargo.lock rust/.cargo diff --git a/clojure/Dockerfile b/clojure/Dockerfile index 5060a803..2d1dea49 100644 --- a/clojure/Dockerfile +++ b/clojure/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:17.10 +FROM ubuntu:18.04 MAINTAINER Joel Martin ########################################################## @@ -40,12 +40,15 @@ ENV LEIN_JVM_OPTS -Duser.home=/mal # For building node modules RUN apt-get -y install g++ -# Add nodesource apt repo config for 8.X -RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - +# Add nodesource apt repo config for 10.x stable +RUN apt-get -y install gnupg +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - -# Install nodejs. +# Install nodejs RUN apt-get -y install nodejs +ENV NPM_CONFIG_CACHE /mal/.npm + ## Install ffi and lumo-cljs modules globally #RUN npm install -g ffi lumo-cljs diff --git a/clojure/package.json b/clojure/package.json index e2248254..904cd367 100644 --- a/clojure/package.json +++ b/clojure/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Make a Lisp (mal) language implemented in ClojureScript", "dependencies": { - "ffi": "2.2.x", - "lumo-cljs": "1.7.x" + "ffi-napi": "2.4.x", + "lumo-cljs": "1.9.x" } } diff --git a/clojure/project.clj b/clojure/project.clj index f2eea933..5bb5f960 100644 --- a/clojure/project.clj +++ b/clojure/project.clj @@ -1,7 +1,7 @@ (defproject mal "0.0.1-SNAPSHOT" :description "Make-A-Lisp" - :dependencies [[org.clojure/clojure "1.8.0-RC4"] + :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/tools.reader "0.8.3"] [net.n01se/clojure-jna "1.0.0"]] diff --git a/clojure/src/mal/node_readline.js b/clojure/src/mal/node_readline.js index dc64e3f6..6042eaa0 100644 --- a/clojure/src/mal/node_readline.js +++ b/clojure/src/mal/node_readline.js @@ -6,7 +6,7 @@ var HISTORY_FILE = require('path').join(process.env.HOME, '.mal-history'); var rlwrap = {}; // namespace for this module in web context -var ffi = require('ffi'), +var ffi = require('ffi-napi'), fs = require('fs'); var rllib = ffi.Library(RL_LIB, { diff --git a/clojure/src/mal/readline.cljs b/clojure/src/mal/readline.cljs index 88f3117a..ea218745 100644 --- a/clojure/src/mal/readline.cljs +++ b/clojure/src/mal/readline.cljs @@ -1,3 +1,3 @@ (ns mal.readline) -(def readline (.-readline (js/require "./src/mal/node_readline.js"))) +(def readline (.-readline (js/require "../src/mal/node_readline.js"))) diff --git a/coffee/Dockerfile b/coffee/Dockerfile index 895a5634..075c304e 100644 --- a/coffee/Dockerfile +++ b/coffee/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:18.04 MAINTAINER Joel Martin ########################################################## @@ -24,18 +24,16 @@ WORKDIR /mal # For building node modules RUN apt-get -y install g++ -# Add nodesource apt repo config for 0.12 stable -RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash - +# Add nodesource apt repo config for 10.x stable +RUN apt-get -y install gnupg +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - # Install nodejs RUN apt-get -y install nodejs -# Link common name -RUN ln -sf nodejs /usr/bin/node - ENV NPM_CONFIG_CACHE /mal/.npm # CoffeeScript specific -RUN npm install -g coffee-script +RUN npm install -g coffeescript RUN touch /.coffee_history && chmod go+w /.coffee_history diff --git a/coffee/node_readline.coffee b/coffee/node_readline.coffee index 87c8d376..fecddc80 100644 --- a/coffee/node_readline.coffee +++ b/coffee/node_readline.coffee @@ -6,7 +6,7 @@ HISTORY_FILE = require('path').join(process.env.HOME, '.mal-history') rlwrap = {} # namespace for this module in web context -ffi = require('ffi') +ffi = require('ffi-napi') fs = require('fs') rllib = ffi.Library(RL_LIB, { diff --git a/coffee/package.json b/coffee/package.json index d28b74bd..98508584 100644 --- a/coffee/package.json +++ b/coffee/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Make a Lisp (mal) language implemented in CoffeeScript", "dependencies": { - "ffi": "1.3.x", - "coffee-script": "~1.8" + "ffi-napi": "2.4.x", + "coffeescript": "~1.8" } } diff --git a/crystal/Dockerfile b/crystal/Dockerfile index 1c24bbd6..0d023752 100644 --- a/crystal/Dockerfile +++ b/crystal/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:18.04 MAINTAINER Joel Martin ########################################################## @@ -25,6 +25,6 @@ WORKDIR /mal RUN apt-get -y install g++ # Crystal -RUN apt-get -y install apt-transport-https +RUN apt-get -y install apt-transport-https gnupg RUN curl http://dist.crystal-lang.org/apt/setup.sh | bash RUN apt-get -y install crystal diff --git a/elm/Dockerfile b/elm/Dockerfile index 5b3bc3e2..b0553bd5 100644 --- a/elm/Dockerfile +++ b/elm/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:18.04 MAINTAINER Joel Martin ########################################################## @@ -21,14 +21,18 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# For building node modules and pulling elm packages -RUN apt-get -y install g++ netbase +# For building node modules +RUN apt-get -y install g++ -# Add nodesource apt repo config for 7.X -RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - +# Add nodesource apt repo config for 10.x stable +RUN apt-get -y install gnupg +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - # Install nodejs RUN apt-get -y install nodejs +# For pulling elm packages +RUN apt-get -y install netbase + ENV HOME /mal ENV NPM_CONFIG_CACHE /mal/.npm diff --git a/elm/node_readline.js b/elm/node_readline.js index e59a62bd..0a50f91f 100644 --- a/elm/node_readline.js +++ b/elm/node_readline.js @@ -6,7 +6,7 @@ var HISTORY_FILE = require('path').join(process.env.HOME, '.mal-history'); var rlwrap = {}; // namespace for this module in web context -var ffi = require('ffi'), +var ffi = require('ffi-napi'), fs = require('fs'); var rllib = ffi.Library(RL_LIB, { diff --git a/elm/package.json b/elm/package.json index dfbc2c7c..67d41278 100644 --- a/elm/package.json +++ b/elm/package.json @@ -4,7 +4,7 @@ "description": "", "main": "bootstrap.js", "dependencies": { - "ffi": "2.0.x" + "ffi-napi": "2.4.x" }, "devDependencies": { "elm": "^0.18.0" diff --git a/es6/Dockerfile b/es6/Dockerfile index ddcadb5b..f7677e91 100644 --- a/es6/Dockerfile +++ b/es6/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:18.04 MAINTAINER Joel Martin ########################################################## @@ -24,11 +24,11 @@ WORKDIR /mal # For building node modules RUN apt-get -y install g++ -# Add nodesource apt repo config for 7.X -RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - +# Add nodesource apt repo config for 10.x stable +RUN apt-get -y install gnupg +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - # Install nodejs RUN apt-get -y install nodejs -# Link common name ENV NPM_CONFIG_CACHE /mal/.npm diff --git a/es6/core.mjs b/es6/core.mjs index 64a7436a..d99c3c5d 100644 --- a/es6/core.mjs +++ b/es6/core.mjs @@ -1,15 +1,17 @@ import { _equal_Q, _clone, _keyword, _keyword_Q } from './types' import { _list_Q, Vector, _assoc_BANG, Atom } from './types' import { pr_str } from './printer' -import { readline } from './node_readline' +import rl from './node_readline' +const readline = rl.readline import { read_str } from './reader' +import { readFileSync } from 'fs' function _error(e) { throw new Error(e) } // String functions function slurp(f) { - if (typeof require !== 'undefined') { - return require('fs').readFileSync(f, 'utf-8') + if (typeof process !== 'undefined') { + return readFileSync(f, 'utf-8') } else { var req = new XMLHttpRequest() req.open('GET', f, false) diff --git a/es6/node_readline.js b/es6/node_readline.js index 9e2fb864..500f8922 100644 --- a/es6/node_readline.js +++ b/es6/node_readline.js @@ -4,7 +4,7 @@ var RL_LIB = "libreadline"; // NOTE: libreadline is GPL var HISTORY_FILE = require('path').join(process.env.HOME, '.mal-history'); -var ffi = require('ffi'), +var ffi = require('ffi-napi'), fs = require('fs'); var rllib = ffi.Library(RL_LIB, { diff --git a/es6/package.json b/es6/package.json index 627da97f..850dff09 100644 --- a/es6/package.json +++ b/es6/package.json @@ -3,10 +3,10 @@ "version": "0.0.1", "description": "Make a Lisp (mal) language implemented in ES6 (ECMAScript 6 / ECMAScript 2015)", "dependencies": { - "@std/esm": "^0.11.0", - "ffi": "2.0.x" + "esm": "3.0.x", + "ffi-napi": "2.4.x" }, - "@std/esm": { + "esm": { "cjs": true } } diff --git a/es6/run b/es6/run index a6c8bf83..ad5a837b 100755 --- a/es6/run +++ b/es6/run @@ -1,2 +1,2 @@ #!/bin/bash -exec node -r @std/esm $(dirname $0)/${STEP:-stepA_mal}.mjs "${@}" +exec node -r esm $(dirname $0)/${STEP:-stepA_mal}.mjs "${@}" diff --git a/es6/step0_repl.mjs b/es6/step0_repl.mjs index 6679a092..6eaca056 100644 --- a/es6/step0_repl.mjs +++ b/es6/step0_repl.mjs @@ -1,4 +1,5 @@ -import { readline } from './node_readline' +import rl from './node_readline.js' +const readline = rl.readline // read const READ = str => str diff --git a/es6/step1_read_print.mjs b/es6/step1_read_print.mjs index 6ff1cee7..8af709fa 100644 --- a/es6/step1_read_print.mjs +++ b/es6/step1_read_print.mjs @@ -1,4 +1,5 @@ -import { readline } from './node_readline' +import rl from './node_readline.js' +const readline = rl.readline import { BlankException, read_str } from './reader' import { pr_str } from './printer' diff --git a/es6/step2_eval.mjs b/es6/step2_eval.mjs index 40abe093..f49b78ad 100644 --- a/es6/step2_eval.mjs +++ b/es6/step2_eval.mjs @@ -1,4 +1,5 @@ -import { readline } from './node_readline' +import rl from './node_readline.js' +const readline = rl.readline import { _list_Q } from './types' import { BlankException, read_str } from './reader' import { pr_str } from './printer' diff --git a/es6/step3_env.mjs b/es6/step3_env.mjs index 0026b347..034315a8 100644 --- a/es6/step3_env.mjs +++ b/es6/step3_env.mjs @@ -1,4 +1,5 @@ -import { readline } from './node_readline' +import rl from './node_readline.js' +const readline = rl.readline import { _list_Q } from './types' import { BlankException, read_str } from './reader' import { pr_str } from './printer' diff --git a/es6/step4_if_fn_do.mjs b/es6/step4_if_fn_do.mjs index 4fe1f90e..e3c70730 100644 --- a/es6/step4_if_fn_do.mjs +++ b/es6/step4_if_fn_do.mjs @@ -1,4 +1,5 @@ -import { readline } from './node_readline' +import rl from './node_readline.js' +const readline = rl.readline import { _list_Q } from './types' import { BlankException, read_str } from './reader' import { pr_str } from './printer' diff --git a/es6/step5_tco.mjs b/es6/step5_tco.mjs index 7bcb7789..bf83f4a6 100644 --- a/es6/step5_tco.mjs +++ b/es6/step5_tco.mjs @@ -1,4 +1,5 @@ -import { readline } from './node_readline' +import rl from './node_readline.js' +const readline = rl.readline import { _list_Q, _malfunc, _malfunc_Q } from './types' import { BlankException, read_str } from './reader' import { pr_str } from './printer' diff --git a/es6/step6_file.mjs b/es6/step6_file.mjs index 7396197d..1053976a 100644 --- a/es6/step6_file.mjs +++ b/es6/step6_file.mjs @@ -1,4 +1,5 @@ -import { readline } from './node_readline' +import rl from './node_readline.js' +const readline = rl.readline import { _list_Q, _malfunc, _malfunc_Q } from './types' import { BlankException, read_str } from './reader' import { pr_str } from './printer' diff --git a/es6/step7_quote.mjs b/es6/step7_quote.mjs index 947c3a21..31642da1 100644 --- a/es6/step7_quote.mjs +++ b/es6/step7_quote.mjs @@ -1,4 +1,5 @@ -import { readline } from './node_readline' +import rl from './node_readline.js' +const readline = rl.readline import { _list_Q, _malfunc, _malfunc_Q } from './types' import { BlankException, read_str } from './reader' import { pr_str } from './printer' diff --git a/es6/step8_macros.mjs b/es6/step8_macros.mjs index 9aa6e1cc..e106975c 100644 --- a/es6/step8_macros.mjs +++ b/es6/step8_macros.mjs @@ -1,4 +1,5 @@ -import { readline } from './node_readline' +import rl from './node_readline.js' +const readline = rl.readline import { _list_Q, _malfunc, _malfunc_Q } from './types' import { BlankException, read_str } from './reader' import { pr_str } from './printer' diff --git a/es6/step9_try.mjs b/es6/step9_try.mjs index ede914d9..389c1c8d 100644 --- a/es6/step9_try.mjs +++ b/es6/step9_try.mjs @@ -1,4 +1,5 @@ -import { readline } from './node_readline' +import rl from './node_readline.js' +const readline = rl.readline import { _list_Q, _malfunc, _malfunc_Q } from './types' import { BlankException, read_str } from './reader' import { pr_str } from './printer' diff --git a/es6/stepA_mal.mjs b/es6/stepA_mal.mjs index c883980e..a8619938 100644 --- a/es6/stepA_mal.mjs +++ b/es6/stepA_mal.mjs @@ -1,4 +1,5 @@ -import { readline } from './node_readline' +import rl from './node_readline.js' +const readline = rl.readline import { _list_Q, _malfunc, _malfunc_Q } from './types' import { BlankException, read_str } from './reader' import { pr_str } from './printer' diff --git a/haxe/Dockerfile b/haxe/Dockerfile index 545c7a61..a0b55723 100644 --- a/haxe/Dockerfile +++ b/haxe/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:18.04 MAINTAINER Joel Martin ########################################################## @@ -27,15 +27,13 @@ WORKDIR /mal # For building node modules RUN apt-get -y install g++ -# Add nodesource apt repo config for 0.12 stable -RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash - +# Add nodesource apt repo config for 10.x stable +RUN apt-get -y install gnupg +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - # Install nodejs RUN apt-get -y install nodejs -# Link common name -RUN ln -sf nodejs /usr/bin/node - ENV NPM_CONFIG_CACHE /mal/.npm diff --git a/haxe/node_readline.js b/haxe/node_readline.js index 2045d666..80885cf2 100644 --- a/haxe/node_readline.js +++ b/haxe/node_readline.js @@ -6,7 +6,7 @@ var HISTORY_FILE = require('path').join(process.env.HOME, '.mal-history'); var rlwrap = {}; // namespace for this module in web context -var ffi = require('ffi'), +var ffi = require('ffi-napi'), fs = require('fs'); var rllib = ffi.Library(RL_LIB, { diff --git a/haxe/package.json b/haxe/package.json index 34fc2399..e84e49ad 100644 --- a/haxe/package.json +++ b/haxe/package.json @@ -3,6 +3,6 @@ "version": "0.0.1", "description": "Make a Lisp (mal) language implemented in Haxe/Javascript", "dependencies": { - "ffi": "1.3.x" + "ffi-napi": "2.4.x" } } diff --git a/js/Dockerfile b/js/Dockerfile index 0559f7a9..f7677e91 100644 --- a/js/Dockerfile +++ b/js/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:18.04 MAINTAINER Joel Martin ########################################################## @@ -24,14 +24,11 @@ WORKDIR /mal # For building node modules RUN apt-get -y install g++ -# Add nodesource apt repo config for 0.12 stable -RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash - +# Add nodesource apt repo config for 10.x stable +RUN apt-get -y install gnupg +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - # Install nodejs RUN apt-get -y install nodejs -# Link common name -RUN ln -sf nodejs /usr/bin/node - ENV NPM_CONFIG_CACHE /mal/.npm - diff --git a/js/node_readline.js b/js/node_readline.js index dc64e3f6..6042eaa0 100644 --- a/js/node_readline.js +++ b/js/node_readline.js @@ -6,7 +6,7 @@ var HISTORY_FILE = require('path').join(process.env.HOME, '.mal-history'); var rlwrap = {}; // namespace for this module in web context -var ffi = require('ffi'), +var ffi = require('ffi-napi'), fs = require('fs'); var rllib = ffi.Library(RL_LIB, { diff --git a/js/package.json b/js/package.json index 4eec2702..e6246a8c 100644 --- a/js/package.json +++ b/js/package.json @@ -3,6 +3,6 @@ "version": "0.0.1", "description": "Make a Lisp (mal) language implemented in Javascript", "dependencies": { - "ffi": "2.0.x" + "ffi-napi": "2.4.x" } } diff --git a/livescript/Dockerfile b/livescript/Dockerfile index edfa6948..f7677e91 100644 --- a/livescript/Dockerfile +++ b/livescript/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:18.04 MAINTAINER Joel Martin ########################################################## @@ -24,11 +24,11 @@ WORKDIR /mal # For building node modules RUN apt-get -y install g++ -# Add nodesource apt repo config for 7.X -RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - +# Add nodesource apt repo config for 10.x stable +RUN apt-get -y install gnupg +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - # Install nodejs RUN apt-get -y install nodejs ENV NPM_CONFIG_CACHE /mal/.npm - diff --git a/livescript/node_readline.js b/livescript/node_readline.js index e59a62bd..0a50f91f 100644 --- a/livescript/node_readline.js +++ b/livescript/node_readline.js @@ -6,7 +6,7 @@ var HISTORY_FILE = require('path').join(process.env.HOME, '.mal-history'); var rlwrap = {}; // namespace for this module in web context -var ffi = require('ffi'), +var ffi = require('ffi-napi'), fs = require('fs'); var rllib = ffi.Library(RL_LIB, { diff --git a/livescript/package.json b/livescript/package.json index af94704c..fe5b5894 100644 --- a/livescript/package.json +++ b/livescript/package.json @@ -4,11 +4,11 @@ "description": "", "main": "index.js", "dependencies": { - "ffi": "2.0.x", + "ffi-napi": "2.4.x", "prelude-ls": "^1.1.2" }, "devDependencies": { - "livescript": "^1.5.0" + "livescript": "^1.6.0" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/miniMAL/Dockerfile b/miniMAL/Dockerfile index 152c82a2..fa54933c 100644 --- a/miniMAL/Dockerfile +++ b/miniMAL/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:18.04 MAINTAINER Joel Martin ########################################################## @@ -24,15 +24,13 @@ WORKDIR /mal # For building node modules RUN apt-get -y install g++ -# Add nodesource apt repo config for 7.X -RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - +# Add nodesource apt repo config for 10.x stable +RUN apt-get -y install gnupg +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - # Install nodejs RUN apt-get -y install nodejs -# Link common name -RUN ln -sf nodejs /usr/bin/node - ENV NPM_CONFIG_CACHE /mal/.npm # install miniMAL diff --git a/miniMAL/node_readline.js b/miniMAL/node_readline.js index dc64e3f6..6042eaa0 100644 --- a/miniMAL/node_readline.js +++ b/miniMAL/node_readline.js @@ -6,7 +6,7 @@ var HISTORY_FILE = require('path').join(process.env.HOME, '.mal-history'); var rlwrap = {}; // namespace for this module in web context -var ffi = require('ffi'), +var ffi = require('ffi-napi'), fs = require('fs'); var rllib = ffi.Library(RL_LIB, { diff --git a/miniMAL/package.json b/miniMAL/package.json index 0c87452b..bd9e2cf6 100644 --- a/miniMAL/package.json +++ b/miniMAL/package.json @@ -4,6 +4,6 @@ "description": "Make a Lisp (mal) language implemented in miniMAL", "dependencies": { "minimal-lisp": "1.0.2", - "ffi": "2.0.x" + "ffi-napi": "2.4.x" } } diff --git a/ts/Dockerfile b/ts/Dockerfile index 1bb0452d..f7677e91 100644 --- a/ts/Dockerfile +++ b/ts/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:18.04 MAINTAINER Joel Martin ########################################################## @@ -21,8 +21,14 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -RUN apt-get -y install build-essential -RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - +# For building node modules +RUN apt-get -y install g++ + +# Add nodesource apt repo config for 10.x stable +RUN apt-get -y install gnupg +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - + +# Install nodejs RUN apt-get -y install nodejs ENV NPM_CONFIG_CACHE /mal/.npm diff --git a/ts/node_readline.ts b/ts/node_readline.ts index cc0af945..6018c92c 100644 --- a/ts/node_readline.ts +++ b/ts/node_readline.ts @@ -1,5 +1,5 @@ import * as path from "path"; -import * as ffi from "ffi"; +import * as ffi from "ffi-napi"; import * as fs from "fs"; // IMPORTANT: choose one diff --git a/ts/package.json b/ts/package.json index 162c7525..6a5bd97e 100644 --- a/ts/package.json +++ b/ts/package.json @@ -19,10 +19,10 @@ "test:stepA": "cd .. && make 'test^ts^stepA'" }, "dependencies": { - "ffi": "^2.2.0" + "ffi-napi": "^2.4.0" }, "devDependencies": { - "@types/ffi": "0.0.19", + "@types/ffi-napi": "2.4.0", "@types/node": "^7.0.5", "typescript": "^2.2.1", "typescript-formatter": "^4.1.2" -- 2.20.1