Skip to content

Commit c6db789

Browse files
Update to PureScript v0.15.0 (#8)
* Migrated FFI to ES modules via 'lebab' * Replaced 'export var' with 'export const' * Removed '"use strict";' in FFI files * Update to CI to use 'unstable' purescript * Add CI test: verify 'bower.json' file works via pulp * Ignore spago-based tests (temporarily) * Update Bower dependencies to master or main * Update packages.dhall to 'prepare-0.15' package set * Removed unneeded 'psci-support' package * Add quickcheck-laws as bower dev dep * Move psci-support to dev dep * Added changelog entry * Update .github/workflows/ci.yml Co-authored-by: Thomas Honeyman <hello@thomashoneyman.com>
1 parent fb5e605 commit c6db789

File tree

6 files changed

+44
-153
lines changed

6 files changed

+44
-153
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- name: Set up a PureScript toolchain
1717
uses: purescript-contrib/setup-purescript@main
1818
with:
19+
purescript: "unstable"
1920
purs-tidy: "latest"
2021

2122
- name: Cache PureScript dependencies
@@ -38,8 +39,17 @@ jobs:
3839
- name: Build tests
3940
run: spago -x test.dhall build --no-install --purs-args '--censor-lib --strict'
4041

41-
- name: Run tests
42-
run: spago -x test.dhall test --no-install
42+
# - name: Run tests
43+
# run: spago -x test.dhall test --no-install
4344

4445
- name: Check formatting
4546
run: purs-tidy check src test
47+
48+
- name: Verify Bower & Pulp
49+
run: |
50+
npm install bower pulp@16.0.0-0
51+
npx bower install
52+
npx pulp build -- --censor-lib --strict
53+
if [ -d "test" ]; then
54+
npx pulp test
55+
fi

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Notable changes to this project are documented in this file. The format is based
44

55
## [Unreleased]
66

7+
Breaking changes:
8+
- Migrate FFI to ES modules (#8 by @JordanMartinez)
9+
710
## v1.0.0 2021-06-23
811

912
Thank you Athan Clark for donating this package to __purescript-contrib__.

bower.json

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
{
2-
"name": "purescript-float32",
3-
"license": [
4-
"BSD-3-Clause"
5-
],
6-
"repository": {
7-
"type": "git",
8-
"url": "https://github.com/purescript-contrib/purescript-float32.git"
9-
},
10-
"ignore": [
11-
"**/.*",
12-
"node_modules",
13-
"bower_components",
14-
"output"
15-
],
16-
"dependencies": {
17-
"purescript-gen": "^v3.0.0",
18-
"purescript-maybe": "^v5.0.0",
19-
"purescript-prelude": "^v5.0.0",
20-
"purescript-psci-support": "^v5.0.0"
21-
}
2+
"name": "purescript-float32",
3+
"license": [
4+
"BSD-3-Clause"
5+
],
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/purescript-contrib/purescript-float32.git"
9+
},
10+
"ignore": [
11+
"**/.*",
12+
"node_modules",
13+
"bower_components",
14+
"output"
15+
],
16+
"dependencies": {
17+
"purescript-gen": "master",
18+
"purescript-maybe": "master",
19+
"purescript-prelude": "master"
20+
},
21+
"devDependencies": {
22+
"purescript-psci-support": "master",
23+
"purescript-quickcheck-laws": "main"
24+
}
2225
}

packages.dhall

Lines changed: 2 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,4 @@
1-
{-
2-
Welcome to your new Dhall package-set!
3-
4-
Below are instructions for how to edit this file for most use
5-
cases, so that you don't need to know Dhall to use it.
6-
7-
## Warning: Don't Move This Top-Level Comment!
8-
9-
Due to how `dhall format` currently works, this comment's
10-
instructions cannot appear near corresponding sections below
11-
because `dhall format` will delete the comment. However,
12-
it will not delete a top-level comment like this one.
13-
14-
## Use Cases
15-
16-
Most will want to do one or both of these options:
17-
1. Override/Patch a package's dependency
18-
2. Add a package not already in the default package set
19-
20-
This file will continue to work whether you use one or both options.
21-
Instructions for each option are explained below.
22-
23-
### Overriding/Patching a package
24-
25-
Purpose:
26-
- Change a package's dependency to a newer/older release than the
27-
default package set's release
28-
- Use your own modified version of some dependency that may
29-
include new API, changed API, removed API by
30-
using your custom git repo of the library rather than
31-
the package set's repo
32-
33-
Syntax:
34-
Replace the overrides' "{=}" (an empty record) with the following idea
35-
The "//" or "⫽" means "merge these two records and
36-
when they have the same value, use the one on the right:"
37-
-------------------------------
38-
let overrides =
39-
{ packageName =
40-
upstream.packageName // { updateEntity1 = "new value", updateEntity2 = "new value" }
41-
, packageName =
42-
upstream.packageName // { version = "v4.0.0" }
43-
, packageName =
44-
upstream.packageName // { repo = "https://www.example.com/path/to/new/repo.git" }
45-
}
46-
-------------------------------
47-
48-
Example:
49-
-------------------------------
50-
let overrides =
51-
{ halogen =
52-
upstream.halogen // { version = "master" }
53-
, halogen-vdom =
54-
upstream.halogen-vdom // { version = "v4.0.0" }
55-
}
56-
-------------------------------
57-
58-
### Additions
59-
60-
Purpose:
61-
- Add packages that aren't already included in the default package set
62-
63-
Syntax:
64-
Replace the additions' "{=}" (an empty record) with the following idea:
65-
-------------------------------
66-
let additions =
67-
{ package-name =
68-
{ dependencies =
69-
[ "dependency1"
70-
, "dependency2"
71-
]
72-
, repo =
73-
"https://example.com/path/to/git/repo.git"
74-
, version =
75-
"tag ('v4.0.0') or branch ('master')"
76-
}
77-
, package-name =
78-
{ dependencies =
79-
[ "dependency1"
80-
, "dependency2"
81-
]
82-
, repo =
83-
"https://example.com/path/to/git/repo.git"
84-
, version =
85-
"tag ('v4.0.0') or branch ('master')"
86-
}
87-
, etc.
88-
}
89-
-------------------------------
90-
91-
Example:
92-
-------------------------------
93-
let additions =
94-
{ benchotron =
95-
{ dependencies =
96-
[ "arrays"
97-
, "exists"
98-
, "profunctor"
99-
, "strings"
100-
, "quickcheck"
101-
, "lcg"
102-
, "transformers"
103-
, "foldable-traversable"
104-
, "exceptions"
105-
, "node-fs"
106-
, "node-buffer"
107-
, "node-readline"
108-
, "datetime"
109-
, "now"
110-
]
111-
, repo =
112-
"https://github.com/hdgarrood/purescript-benchotron.git"
113-
, version =
114-
"v7.0.0"
115-
}
116-
}
117-
-------------------------------
118-
-}
1191
let upstream =
120-
https://github.com/purescript/package-sets/releases/download/psc-0.14.3-20210722/packages.dhall sha256:1ceb43aa59436bf5601bac45f6f3781c4e1f0e4c2b8458105b018e5ed8c30f8c
121-
122-
let overrides = {=}
123-
124-
let additions = {=}
2+
https://raw.githubusercontent.com/purescript/package-sets/prepare-0.15/src/packages.dhall
1253

126-
in upstream // overrides // additions
4+
in upstream

spago.dhall

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[ "gen"
55
, "maybe"
66
, "prelude"
7-
, "psci-support"
87
]
98
, packages = ./packages.dhall
109
, sources = [ "src/**/*.purs" ]

src/Data/Float32.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
"use strict";
1+
export const float32Top = 3.40282e38;
2+
export const float32Bottom = -3.40282e38;
23

3-
4-
exports.float32Top = 3.40282e38;
5-
exports.float32Bottom = -3.40282e38;
6-
exports.fromNumberImpl = function fromNumberImpl (x) {
4+
export function fromNumberImpl(x) {
75
if (typeof Math.fround !== 'undefined') {
86
return Math.fround(x);
97
} else {
@@ -17,5 +15,5 @@ exports.fromNumberImpl = function fromNumberImpl (x) {
1715
return r[0];
1816
}
1917
}
20-
};
18+
}
2119

0 commit comments

Comments
 (0)