Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rescript-nodejs

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rescript-nodejs - npm Package Compare versions

Comparing version 14.4.0 to 15.0.0

.github/workflows/ci.yml

10

bsconfig.json

@@ -28,10 +28,8 @@ {

"bs-dependencies": [],
"bs-dev-dependencies": [
"@dusty-phillips/rescript-zora",
"@ryyppy/rescript-promise"
],
"bs-dev-dependencies": ["@dusty-phillips/rescript-zora"],
"warnings": {
"number": "A-4-40-41-42-43-44+101-102-103",
"error": "false"
}
}
},
"uncurried": false
}

2

lib/js/examples/ReadFileByLine.bs.js

@@ -14,3 +14,3 @@ // Generated by ReScript, PLEASE EDIT WITH CARE

rl.on("line", (function (line) {
console.log("Received: " + line + "");
console.log("Received: " + line);
}));

@@ -17,0 +17,0 @@

@@ -76,3 +76,3 @@ // Generated by ReScript, PLEASE EDIT WITH CARE

var b = -a | 0;
t.equal(-BigInt(a), BigInt(b), "");
t.equal(- BigInt(a), BigInt(b), "");
}));

@@ -82,3 +82,3 @@ t.test("BigInt.(~-)", (function (t) {

var b = -a | 0;
t.equal(-BigInt(a), BigInt(b), "");
t.equal(- BigInt(a), BigInt(b), "");
}));

@@ -85,0 +85,0 @@ t.test("BigInt.modulo", (function (t) {

@@ -54,3 +54,3 @@ // Generated by ReScript, PLEASE EDIT WITH CARE

var tmp;
tmp = match.TAG === /* String */0 ? true : false;
tmp = match.TAG === "String" ? true : false;
t.ok(tmp, "");

@@ -61,3 +61,3 @@ }));

var tmp;
tmp = match.TAG === /* Buffer */1 ? true : false;
tmp = match.TAG === "Buffer" ? true : false;
t.ok(tmp, "");

@@ -68,3 +68,3 @@ }));

var tmp;
tmp = match.TAG === /* Uint8Array */2 ? true : false;
tmp = match.TAG === "Uint8Array" ? true : false;
t.ok(tmp, "");

@@ -75,3 +75,3 @@ }));

var tmp;
tmp = match.TAG === /* Int8Array */3 ? true : false;
tmp = match.TAG === "Int8Array" ? true : false;
t.ok(tmp, "");

@@ -82,3 +82,3 @@ }));

var tmp;
tmp = match.TAG === /* Uint8ClampedArray */4 ? true : false;
tmp = match.TAG === "Uint8ClampedArray" ? true : false;
t.ok(tmp, "");

@@ -89,3 +89,3 @@ }));

var tmp;
tmp = match.TAG === /* Uint16Array */5 ? true : false;
tmp = match.TAG === "Uint16Array" ? true : false;
t.ok(tmp, "");

@@ -96,3 +96,3 @@ }));

var tmp;
tmp = match.TAG === /* Int16Array */6 ? true : false;
tmp = match.TAG === "Int16Array" ? true : false;
t.ok(tmp, "");

@@ -99,0 +99,0 @@ }));

@@ -5,36 +5,22 @@ // Generated by ReScript, PLEASE EDIT WITH CARE

var Fs = require("fs");
var Zora = require("@dusty-phillips/rescript-zora/lib/js/src/Zora.bs.js");
var Zora$1 = require("zora");
var Zora = require("zora");
var Js_string = require("rescript/lib/js/js_string.js");
Zora$1.test("Fs", (function (t) {
t.test("readFile should read entire file", (function (t) {
return Zora.then(Zora.then(Fs.promises.open(__filename, "r"), (function (fh) {
return Zora.then(fh.readFile(), (function (buffer) {
return Zora.then(fh.close(), (function (param) {
return Zora.done(buffer);
}));
}));
})), (function (buffer) {
t.ok(buffer.indexOf("Random string: Gh2e71pdHhPxU") > 1, "buffer index was not greater than zero");
return Zora.done(undefined);
}));
Zora.test("Fs", (async function (t) {
t.test("readFile should read entire file", (async function (t) {
var fh = await Fs.promises.open(__filename, "r");
var buffer = await fh.readFile();
await fh.close();
t.ok(buffer.indexOf("Random string: Gh2e71pdHhPxU") > 1, "buffer index was not greater than zero");
}));
t.test("readFileWith should read entire file as a string", (function (t) {
return Zora.then(Zora.then(Fs.promises.open(__filename, "r"), (function (fh) {
return Zora.then(fh.readFile({
encoding: "UTF-8"
}), (function (buffer) {
return Zora.then(fh.close(), (function (param) {
return Zora.done(buffer);
}));
}));
})), (function (content) {
t.ok(Js_string.indexOf("Random string: uCF6c5f3Arrq", content) > 0, "buffer string indexOf was not greater than zero");
return Zora.done(undefined);
}));
t.test("readFileWith should read entire file as a string", (async function (t) {
var fh = await Fs.promises.open(__filename, "r");
var buffer = await fh.readFile({
encoding: "UTF-8"
});
await fh.close();
t.ok(Js_string.indexOf("Random string: uCF6c5f3Arrq", buffer) > 0, "buffer string indexOf was not greater than zero");
}));
return Zora.done(undefined);
}));
/* Not a pure module */

@@ -25,3 +25,3 @@ // Generated by ReScript, PLEASE EDIT WITH CARE

var dummyError = new Error("Expected error: Stream destroyed");
return new Promise((function (resolve, _reject) {
return new Promise((function (resolve, param) {
var stream = StreamTestLib$NodeJs.makeReadableEmpty(undefined).on("error", (function (err) {

@@ -68,3 +68,3 @@ t.equal(err, dummyError, "");

};
return new Promise((function (resolve, _reject) {
return new Promise((function (resolve, param) {
var writeStream = new Stream.Writable(options);

@@ -71,0 +71,0 @@ writeStream.write(42, (function (param) {

{
"name": "rescript-nodejs",
"version": "14.4.0",
"version": "15.0.0",
"scripts": {

@@ -29,8 +29,8 @@ "build": "rescript || rescript",

"devDependencies": {
"@dusty-phillips/rescript-zora": "^3.0.0",
"@dusty-phillips/rescript-zora": "^4.0.0",
"onchange": "^7.1.0",
"pta": "^1.0.0",
"rescript": "^10.0.1",
"zora": "^5.0.0"
"pta": "^1.2.0",
"rescript": "^11.0.0-beta.3",
"zora": "^5.2.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc