From c0cb9a06d222d6b54f32838fc4c4bd4ec16ee6e4 Mon Sep 17 00:00:00 2001 From: justinwoo Date: Thu, 12 May 2022 21:37:05 +0300 Subject: [PATCH] more updates --- bower.json | 20 ++++++++++---------- ci.nix | 34 +++++++++++++++++----------------- src/Simple/JSON.js | 4 ++-- src/Simple/JSON.purs | 1 + test.bash | 10 +++------- test/index.mjs | 3 +++ 6 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 test/index.mjs diff --git a/bower.json b/bower.json index cac5e2a..d53cfc8 100644 --- a/bower.json +++ b/bower.json @@ -12,17 +12,17 @@ "output" ], "dependencies": { - "purescript-prelude": "^5.0.0", - "purescript-typelevel-prelude": "^6.0.0", - "purescript-record": "^3.0.0", - "purescript-variant": "^7.0.1", - "purescript-nullable": "^5.0.0", - "purescript-foreign-object": "^3.0.0", - "purescript-foreign": "^6.0.0", - "purescript-exceptions": "^5.0.0", - "purescript-arrays": "^6.0.0" + "purescript-prelude": "^6.0.0", + "purescript-typelevel-prelude": "^7.0.0", + "purescript-record": "^4.0.0", + "purescript-variant": "^8.0.0", + "purescript-nullable": "^6.0.0", + "purescript-foreign-object": "^4.0.0", + "purescript-foreign": "^7.0.0", + "purescript-exceptions": "^6.0.0", + "purescript-arrays": "^7.0.0" }, "devDependencies": { - "purescript-assert": "^5.0.0" + "purescript-assert": "^6.0.0" } } diff --git a/ci.nix b/ci.nix index 21391e1..f37e3f4 100644 --- a/ci.nix +++ b/ci.nix @@ -5,22 +5,22 @@ let }; in -{ pkgs ? import nixpkgs {} }: +{ pkgs ? import nixpkgs { } }: - let - ezPscSrc = pkgs.fetchFromGitHub { - owner = "justinwoo"; - repo = "easy-purescript-nix"; - rev = "e8a1ffafafcdf2e81adba419693eb35f3ee422f8"; - sha256 = "0bk32wckk82f1j5i5gva63f3b3jl8swc941c33bqc3pfg5cgkyyf"; - }; - ezPsc = import ezPscSrc { inherit pkgs; }; - in +let + ezPscSrc = pkgs.fetchFromGitHub { + owner = "justinwoo"; + repo = "easy-purescript-nix"; + rev = "0ad5775c1e80cdd952527db2da969982e39ff592"; + sha256 = "0x53ads5v8zqsk4r1mfpzf5913byifdpv5shnvxpgw634ifyj1kg"; + }; + ezPsc = import ezPscSrc { inherit pkgs; }; +in - pkgs.mkShell { - buildInputs = [ - ezPsc.purs-0_14_0 - pkgs.nodePackages_10_x.bower - pkgs.nodePackages_10_x.pulp - ]; - } +pkgs.mkShell { + buildInputs = [ + ezPsc.purs-0_15_0 + ezPsc.pulp + pkgs.nodePackages_10_x.bower + ]; +} diff --git a/src/Simple/JSON.js b/src/Simple/JSON.js index fcb2730..dea1f65 100644 --- a/src/Simple/JSON.js +++ b/src/Simple/JSON.js @@ -1,5 +1,5 @@ -export function _parseJSON() { return JSON.parse.apply(this, arguments) }; +export const _parseJSON = JSON.parse; export const _undefined = undefined; -export function _unsafeStringify() { return JSON.stringify.apply(this, arguments) }; +export const _unsafeStringify = JSON.stringify; diff --git a/src/Simple/JSON.purs b/src/Simple/JSON.purs index 05cde98..4d49b4b 100644 --- a/src/Simple/JSON.purs +++ b/src/Simple/JSON.purs @@ -8,6 +8,7 @@ module Simple.JSON , read , read' , read_ +, readAsForeign , parseJSON , undefined , unsafeStringify diff --git a/test.bash b/test.bash index 69a3688..ce9dbbb 100755 --- a/test.bash +++ b/test.bash @@ -3,10 +3,6 @@ bower install -# NOTE: The following bug has been fixed, but the fix hasn't been upstreamed -# to the version of nixpkgs pinned in this repo: -# -# https://github.com/purescript-contrib/pulp/issues/392 -# -# Once pulp has been updated, drop '--no-check-main' -pulp test --no-check-main +pulp build --include test + +node ./test/index.mjs diff --git a/test/index.mjs b/test/index.mjs new file mode 100644 index 0000000..6c2c897 --- /dev/null +++ b/test/index.mjs @@ -0,0 +1,3 @@ +import { main } from "../output/Test.Main/index.js"; + +main();