fix: tests

This commit is contained in:
orion 2023-12-16 15:12:33 -06:00
parent 6148009a0b
commit 07306d60a0
Signed by: orion
GPG Key ID: 6D4165AE4C928719
13 changed files with 85 additions and 391 deletions

View File

@ -1,5 +0,0 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true

8
.prettierrc.cjs Normal file
View File

@ -0,0 +1,8 @@
module.exports = {
tabWidth: 2,
trailingComma: 'all',
singleQuote: true,
semi: false,
arrowParens: 'avoid',
plugins: [],
}

View File

@ -1,10 +0,0 @@
{
"importSort": "source",
"importWrap": "source",
"indent": 2,
"operatorsFile": null,
"ribbon": 1,
"typeArrowPlacement": "first",
"unicode": "never",
"width": null
}

3
.tool-versions Normal file
View File

@ -0,0 +1,3 @@
bun 1.0.18
purescript 0.15.12
nodejs 20.9.0

View File

@ -1,13 +0,0 @@
all: build test
.PHONY: build
build: src/Database/PostgreSQL/Row.purs
pulp build
.PHONY: test
test: src/Database/PostgreSQL/Row.purs
pulp test
src/Database/PostgreSQL/Row.purs: Rows.pl
mkdir -p $(dir $@)
perl Rows.pl $@

View File

@ -1,63 +0,0 @@
{
"name": "purescript-postgresql-client",
"license": [
"BSD-3-Clause"
],
"repository": {
"type": "git",
"url": "https://github.com/rightfold/purescript-postgresql-client.git"
},
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"output"
],
"dependencies": {
"purescript-aff": "^v7.1.0",
"purescript-argonaut": "^v9.0.0",
"purescript-arrays": "^v7.1.0",
"purescript-assert": "^v6.0.0",
"purescript-bifunctors": "^v6.0.0",
"purescript-bytestrings": "https://github.com/martyall/purescript-bytestrings.git#e51cf868a4137c1c48c98d32115bb2014c9f7624",
"purescript-datetime": "^v6.1.0",
"purescript-debug": "^v6.0.2",
"purescript-decimals": "^v7.1.0",
"purescript-dotenv": "^v3.0.0",
"purescript-effect": "^v4.0.0",
"purescript-either": "^v6.1.0",
"purescript-enums": "^v6.0.1",
"purescript-exceptions": "^v6.0.0",
"purescript-foldable-traversable": "^v6.0.0",
"purescript-foreign": "^v7.0.0",
"purescript-foreign-generic": "https://github.com/paluh/purescript-foreign-generic.git#a5c23d29e72619624978446293ac9bb45ccd2fde",
"purescript-foreign-object": "^v4.1.0",
"purescript-identity": "^v6.0.0",
"purescript-integers": "^v6.0.0",
"purescript-js-date": "^v8.0.0",
"purescript-js-unsafe-stringify": "https://github.com/paluh/purescript-js-unsafe-stringify.git#master",
"purescript-lists": "^v7.0.0",
"purescript-maybe": "^v6.0.0",
"purescript-newtype": "^v5.0.0",
"purescript-node-process": "^v10.0.0",
"purescript-nullable": "^v6.0.0",
"purescript-numbers": "^v9.0.0",
"purescript-ordered-collections": "^v3.0.0",
"purescript-partial": "^v4.0.0",
"purescript-polyform": "^v0.9.2",
"purescript-polyform-batteries-core": "https://github.com/purescript-polyform/batteries-core.git#v0.3.0",
"purescript-polyform-batteries-env": "https://github.com/purescript-polyform/batteries-env.git#v0.2.0",
"purescript-prelude": "^v6.0.1",
"purescript-profunctor": "^v6.0.0",
"purescript-psci-support": "^v6.0.0",
"purescript-record": "^v4.0.0",
"purescript-string-parsers": "^v8.0.0",
"purescript-strings": "^v6.0.1",
"purescript-test-unit": "^v17.0.0",
"purescript-transformers": "^v6.0.0",
"purescript-tuples": "^v7.0.0",
"purescript-typelevel-prelude": "^v7.0.0",
"purescript-unsafe-coerce": "^v6.0.0",
"purescript-validation": "^v6.0.0"
}
}

BIN
bun.lockb Executable file

Binary file not shown.

View File

@ -1,78 +0,0 @@
{
"nodes": {
"easyPSSrc": {
"flake": false,
"locked": {
"lastModified": 1671011575,
"narHash": "sha256-tESal32bcqqdZO+aKnBzc1GoL2mtnaDtj2y7ociCRGA=",
"owner": "justinwoo",
"repo": "easy-purescript-nix",
"rev": "11d3bd58ce6e32703bf69cec04dc7c38eabe14ba",
"type": "github"
},
"original": {
"owner": "justinwoo",
"repo": "easy-purescript-nix",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakeUtils": {
"inputs": {
"flake-utils": "flake-utils"
},
"locked": {
"lastModified": 1657226504,
"narHash": "sha256-GIYNjuq4mJlFgqKsZ+YrgzWm0IpA4axA3MCrdKYj7gs=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "2bf0f91643c2e5ae38c1b26893ac2927ac9bd82a",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1669809720,
"narHash": "sha256-RMT77f6CPOYtLLQ2esj+EJ1BPVWxf4RDidjrSvA5OhI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "227de2b3bbec142f912c09d5e8a1b4e778aa54fb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"easyPSSrc": "easyPSSrc",
"flakeUtils": "flakeUtils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,62 +0,0 @@
{
# nixConfig = {
# bash-prompt-suffix = "[dev]";
# };
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flakeUtils.url = "github:gytis-ivaskevicius/flake-utils-plus";
easyPSSrc = {
flake = false;
url = "github:justinwoo/easy-purescript-nix";
};
};
outputs = { self, nixpkgs, flakeUtils, easyPSSrc }:
flakeUtils.lib.eachSystem ["x86_64-linux"] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
easyPS = pkgs.callPackage easyPSSrc { inherit pkgs; };
nodejs-16 = pkgs.writeShellScriptBin "nodejs-16" ''
${ pkgs.nodejs-16_x.out}/bin/node $@
'';
in {
devShell = pkgs.mkShell {
buildInputs = [
# Please update spago and purescript in `package.json` `scripts` section
easyPS."purs-0_15_7"
easyPS.purescript-language-server
easyPS.pscid
easyPS.purs-tidy
easyPS.pulp
easyPS.spago
pkgs.jq
pkgs.docker
pkgs.nodePackages.bower
pkgs.nodePackages.jshint
pkgs.nodePackages.nodemon
pkgs.nodePackages.yarn
pkgs.nodePackages.webpack
pkgs.nodePackages.webpack-cli
pkgs.nodePackages.webpack-dev-server
pkgs.dhall
pkgs.nodejs-18_x
nodejs-16
pkgs.pkgconfig
pkgs.postgresql
pkgs.python27
pkgs.python37
pkgs.unzip
pkgs.nixpacks
];
shellHook = ''
npm install
NODE_OPTIONS=--experimental-fetch --trace-warnings
export PATH=$PATH:./node_modules/.bin/:./bin
export PS1="\n\[\033[1;32m\][nix develop:\w]\$\[\033[0m\] ";
'';
};
}
);
}

View File

@ -7,9 +7,10 @@
"postgres": "^1.0.2" "postgres": "^1.0.2"
}, },
"devDependencies": { "devDependencies": {
"better-sqlite3": "^9.2.2",
"github-release-notes": "^0.17.1", "github-release-notes": "^0.17.1",
"paluh-litps": "^0.1.4", "paluh-litps": "^0.1.4",
"pulp": "^15.0.0" "spago": "next"
}, },
"scripts": { "scripts": {
"pretest": "paluh-litps compile --file README.md; mv README.purs test/README.purs", "pretest": "paluh-litps compile --file README.md; mv README.purs test/README.purs",

View File

@ -1,106 +0,0 @@
let mkPackage =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.0-20190626/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.15.4-20221201/packages.dhall
sha256:d1a68fa15709eaa686515eb5b9950d82c743f7bf73e3d87a4abe9e1be6fda571
in upstream
with
polyform =
mkPackage
[ "heterogeneous", "js-unsafe-stringify", "newtype" ,"ordered-collections"
, "variant", "profunctor", "invariant", "foreign-object"
, "run", "transformers","validation", "foreign"
]
"https://github.com/purescript-polyform/polyform.git"
"v0.9.2"
with
polyform-batteries-core = mkPackage
[ "debug", "decimals", "filterable", "numbers"
, "polyform", "prelude", "record-extra", "test-unit"
]
"https://github.com/purescript-polyform/batteries-core.git"
"v0.3.0"
with
polyform-batteries-urlencoded =
mkPackage
[ "argonaut" , "console" , "debug" , "effect" , "form-urlencoded"
, "polyform-batteries-core" , "psci-support" , "spec"
]
"https://github.com/purescript-polyform/batteries-urlencoded.git"
"v0.4.1"
with polyform-batteries-env =
{ dependencies =
[ "arrays"
, "identity"
, "maybe"
, "ordered-collections"
, "polyform"
, "polyform-batteries-core"
, "prelude"
, "psci-support"
, "typelevel-prelude"
]
, repo = "https://github.com/purescript-polyform/batteries-env.git"
, version = "v0.2.0"
}
with bytestrings =
mkPackage
[ "arrays"
, "console"
, "effect"
, "exceptions"
, "foldable-traversable"
, "integers"
, "leibniz"
, "maybe"
, "newtype"
, "node-buffer"
, "partial"
, "prelude"
, "quickcheck"
, "quickcheck-laws"
, "quotient"
, "unsafe-coerce"
]
"https://github.com/martyall/purescript-bytestrings.git"
"e51cf868a4137c1c48c98d32115bb2014c9f7624"
with quotient =
mkPackage
[ "prelude", "quickcheck" ]
"https://github.com/rightfold/purescript-quotient.git"
"v3.0.0"
with foreign-generic =
mkPackage
[ "arrays"
, "assert"
, "bifunctors"
, "console"
, "control"
, "effect"
, "either"
, "exceptions"
, "foldable-traversable"
, "foreign"
, "foreign-object"
, "identity"
, "lists"
, "maybe"
, "newtype"
, "partial"
, "prelude"
, "record"
, "strings"
, "transformers"
, "tuples"
, "unsafe-coerce"
]
"https://github.com/paluh/purescript-foreign-generic.git"
"a5c23d29e72619624978446293ac9bb45ccd2fde"
with js-unsafe-stringify =
mkPackage
([] : List Text)
"https://github.com/paluh/purescript-js-unsafe-stringify.git"
"master"

View File

@ -1,53 +0,0 @@
{ name = "postgresql-client"
, license = "BSD-3-Clause"
, dependencies =
[ "aff"
, "argonaut"
, "arrays"
, "assert"
, "bifunctors"
, "bytestrings"
, "datetime"
, "debug"
, "decimals"
, "dotenv"
, "effect"
, "either"
, "enums"
, "exceptions"
, "foldable-traversable"
, "foreign"
, "foreign-generic"
, "foreign-object"
, "identity"
, "integers"
, "js-date"
, "js-unsafe-stringify"
, "lists"
, "maybe"
, "newtype"
, "node-process"
, "nullable"
, "numbers"
, "ordered-collections"
, "partial"
, "polyform"
, "polyform-batteries-core"
, "polyform-batteries-env"
, "prelude"
, "profunctor"
, "psci-support"
, "record"
, "string-parsers"
, "strings"
, "test-unit"
, "transformers"
, "tuples"
, "typelevel-prelude"
, "unsafe-coerce"
, "validation"
]
, packages = ./packages.dhall
, repository = "https://github.com/rightfold/purescript-postgresql-client.git"
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
}

View File

@ -34,8 +34,80 @@ package:
- "tuples" - "tuples"
- "unsafe-coerce" - "unsafe-coerce"
name: postgresql-client name: postgresql-client
test:
main: Test.Main
dependencies:
- debug
- dotenv
- js-unsafe-stringify
- node-process
- polyform
- polyform-batteries-core
- polyform-batteries-env
- test-unit
workspace: workspace:
extra_packages: extra_packages:
polyform:
dependencies:
[
"heterogeneous",
"js-unsafe-stringify",
"newtype",
"ordered-collections",
"variant",
"profunctor",
"invariant",
"foreign-object",
"run",
"transformers",
"validation",
"foreign"
]
git: "https://github.com/purescript-polyform/polyform.git"
ref: "v0.9.2"
polyform-batteries-core:
dependencies:
[
"debug",
"decimals",
"filterable",
"numbers",
"polyform",
"prelude",
"record-extra",
"test-unit"
]
git: "https://github.com/purescript-polyform/batteries-core.git"
ref: "v0.3.0"
polyform-batteries-urlencoded:
dependencies:
[
"argonaut",
"console",
"debug",
"effect",
"form-urlencoded",
"polyform-batteries-core",
"psci-support",
"spec"
]
git: "https://github.com/purescript-polyform/batteries-urlencoded.git"
ref: "v0.4.1"
polyform-batteries-env:
dependencies:
[
"arrays",
"identity",
"maybe",
"ordered-collections",
"polyform",
"polyform-batteries-core",
"prelude",
"psci-support",
"typelevel-prelude"
]
git: "https://github.com/purescript-polyform/batteries-env.git"
ref: "v0.2.0"
bytestrings: bytestrings:
dependencies: dependencies:
[ [