Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- 'test/**/*.purs'
- 'test/**/*.js'
- '*.json'
- '*.dhall'
- 'spago.yaml'
- '.github/workflows/ci.yml'
pull_request:
branches: [master]
Expand All @@ -23,7 +23,7 @@ on:
- 'test/**/*.purs'
- 'test/**/*.js'
- '*.json'
- '*.dhall'
- 'spago.yaml'
- '.github/workflows/ci.yml'

jobs:
Expand All @@ -35,16 +35,21 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v3
with:
node-version: 22

- name: Set up a PureScript toolchain
uses: purescript-contrib/setup-purescript@main
with:
purescript: "unstable"
spago: "1.0.5"
purs-tidy: "latest"

- name: Cache PureScript dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
key: ${{ runner.os }}-spago-${{ hashFiles('spago.yaml') }}
path: |
.spago
output
Expand All @@ -53,19 +58,13 @@ jobs:
run: purs-tidy check examples src test

- name: Install PureScript dependencies
run: spago install
run: spago fetch

- name: Build source
run: spago build --no-install --purs-args '--censor-lib --strict'
run: spago build --strict

- name: Run tests
run: spago -x test.dhall test
run: spago test

- name: Build examples
run: spago -x example.dhall build

- name: Verify Bower & Pulp
run: |
npm install bower pulp@16.0.0-0
npx bower install
npx pulp build -- --censor-lib --strict
run: spago build --purs-args 'examples/**/*.purs'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@
/.purs*
/.psa*
/.spago
/.spec-results
*.swp
/spago.lock
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ To run the [examples](./examples), clone the repository and run one of the follo

[spago](https://github.com/spacchetti/spago):
```
spago run -p example/<example-name>.purs -m Example.<example-name>
spago build --purs-args 'examples/**/*.purs'
node --input-type=module -e "import { main } from './output/Example.<example-name>/index.js'; main();"
```

### Other ```dotenv``` implementations
Expand Down
41 changes: 0 additions & 41 deletions bower.json

This file was deleted.

8 changes: 0 additions & 8 deletions example.dhall

This file was deleted.

10 changes: 0 additions & 10 deletions packages.dhall

This file was deleted.

32 changes: 0 additions & 32 deletions spago.dhall

This file was deleted.

41 changes: 41 additions & 0 deletions spago.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package:
name: dotenv
publish:
version: 4.0.4

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With spago.yaml, the release version needs to be specified in the manifest. I’ve proposed a patch version here, so after merging you can tag this commit as v4.0.4. Of course you can also change it if you want to release as a different version!

license: MIT
location:
githubOwner: nsaunders
githubRepo: purescript-dotenv
dependencies:
- aff: ">=7.1.0 <9.0.0"
- arrays: ">=7.2.1 <8.0.0"
- control: ">=6.0.0 <7.0.0"
- effect: ">=4.0.0 <5.0.0"
- either: ">=6.1.0 <7.0.0"
- exceptions: ">=6.0.0 <7.0.0"
- foldable-traversable: ">=6.0.0 <7.0.0"
- lists: ">=7.0.0 <8.0.0"
- maybe: ">=6.0.0 <7.0.0"
- node-buffer: ">=9.0.0 <10.0.0"
- node-child-process: ">=11.0.0 <12.0.0"
- node-event-emitter: ">=3.0.0 <4.0.0"
- node-fs: ">=9.1.0 <10.0.0"
- node-os: ">=5.1.0 <6.0.0"
- node-process: ">=11.2.0 <12.0.0"
- node-streams: ">=9.0.0 <10.0.0"
- parsing: ">=10.2.0 <12.0.0"
- prelude: ">=6.0.1 <7.0.0"
- refs: ">=6.0.0 <7.0.0"
- run: ">=5.0.0 <6.0.0"
- strings: ">=6.0.1 <7.0.0"
- transformers: ">=6.0.0 <7.0.0"
- tuples: ">=7.0.0 <8.0.0"
- typelevel-prelude: ">=7.0.0 <8.0.0"
test:
main: Test.Main
dependencies:
- console: ">=6.0.0 <7.0.0"
- ordered-collections: ">=3.0.0 <4.0.0"
- spec: ">=7.5.4 <9.0.0"
- spec-node: ">=0.0.3 <0.0.4"
workspace: {}
6 changes: 0 additions & 6 deletions test.dhall

This file was deleted.

5 changes: 2 additions & 3 deletions test/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ module Test.Main where
import Prelude

import Effect (Effect)
import Effect.Aff (launchAff_)
import Test.Apply as Apply
import Test.Parser as Parser
import Test.Resolve as Resolve
import Test.Spec.Reporter.Console (consoleReporter)
import Test.Spec.Runner (runSpec)
import Test.Spec.Runner.Node (runSpecAndExitProcess)

main :: Effect Unit
main = launchAff_ $ runSpec [ consoleReporter ] do
main = runSpecAndExitProcess [ consoleReporter ] do
Apply.tests
Parser.tests
Resolve.tests
Loading