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
37 changes: 24 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.10.0] - 2019-09-21

Breaking changes (!!!):
- **Flags and arguments that you want to give to `purs` are now passed with `--purs-args`**
- **Flags and arguments that you want to give to `purs` are now passed with `--purs-args` (#353, #366)**

The previous behaviour in which all arguments that could not parse as `spago` arguments
were passed along to `purs` was sometimes confusing (e.g. when using `--path` and multiple
arguments).
- New `--no-search` flag for `spago docs` to skip patching the documentation using `purescript-docs-search`.

Bugfixes:
- Do not compile files twice when using `--watch` and Vim (#346)
- fix Dhall syntax error in packages.dhall template
- Use `git clone` instead of `git fetch` when fetching a package (#373)
- Fixes Windows global cache location; now uses `LocalAppData` as default (#384, #380)
- Fix failure to copy to global cache on a different filesystem (#385)
- Fix watch function on Windows (issue with paths) (#387, #380)
- "Quit" command in watch mode now actually quits (#390, #389)
- Look up remote imports dynamically when doing frozen check (#349)

New features:
- Support watching js files (#407, #205)
- New `--no-search` flag for `spago docs` to skip patching the documentation using `purescript-docs-search` (#400)
- New `-x` flag for specifying the config path location (#357, #329)
- New `spago login` command, to save a GitHub token to the cache so it can be used for various operations hitting GitHub (#391, #403)

Bugfixes:
- "Quit" command in watch mode now actually quits (#390, #389)
- Do not compile files twice when using `--watch` and Vim (#346, #371)
- Use `git clone` instead of `git fetch` when fetching a package, so all tags can be installed (#373, #374)
- Fix Windows global cache location; now uses `LocalAppData` as default (#384, #380)
- Fix naming clash in short flag for repl dependencies (#352, #350)
- Fix failure to copy to global cache on a different filesystem (#385, #386)
- Fix watch function on Windows (issue with paths) (#387, #380, #401)
- Look up remote imports dynamically when doing frozen check, to always find the right `packages.dhall` (#349, #402)

Other Improvements:
- Make no-op `spago install` faster (#409)
- Performance: make no-op `spago install` faster (#409, #412)
- CI: remove reviews limitation on mergify (#354)
- CI: various fixes (#362, #368, #382, #388, #418)
- Docs: fix syntax errors in template comment (#369, #413, #408)
- Docs: fix link for package-set from commit (#405)
- Docs: keep README up to date with new features (#398, #347)
- Deps: upgrade to lts-14 and GHC-8.6 (#395)
- Deps: upgrade to dhall-1.26.0, v10 of the standard (#411, #358)


## [0.9.0] - 2019-07-30
Expand Down
47 changes: 38 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Let's take a look at the two [Dhall][dhall] configuration files that `spago` req
In practice it pulls in the [official package-set][package-sets] as a base,
and you are then able to add any package that might not be in the package set,
or override existing ones.
- `spago.dhall`: this is your project configuration. It includes the above package-set,
- `spago.dhall`: this is your project configuration. It includes the above package set,
the list of your dependencies, the source paths that will be used to build, and any
other project-wide setting that `spago` will use.

Expand Down Expand Up @@ -133,12 +133,14 @@ $ node .
- [Verify that an addition/override doesn't break the package set](#verify-that-an-additionoverride-doesnt-break-the-package-set)
- [Automagically upgrade the package set](#automagically-upgrade-the-package-set)
- [Monorepo](#monorepo)
- [`devDependencies`, `testDependencies`, or in general a situation with many configurations](#devdependencies-testdependencies-or-in-general-a-situation-with-many-configurations)
- [Bundle a project into a single JS file](#bundle-a-project-into-a-single-js-file)
- [1. `spago bundle-app`](#1-spago-bundle-app)
- [2. `spago bundle-module`](#2-spago-bundle-module)
- [Skipping the Build Step](#skipping-the-build-step)
- [Make a project with PureScript + JavaScript](#make-a-project-with-purescript--javascript)
- [Generate documentation for my project](#generate-documentation-for-my-project)
- [Get source maps for my project](#get-source-maps-for-my-project)
- [Publish my library](#publish-my-library)
- [Use this together with `psc-package`](#use-this-together-with-psc-package)
- [Get all the licenses of my dependencies](#get-all-the-licenses-of-my-dependencies)
Expand Down Expand Up @@ -344,7 +346,7 @@ them after `--`.
E.g. the following opens a repl on `localhost:3200`:

```bash
$ spago repl -- --port 3200
$ spago repl --purs-args '--port 3200'
```


Expand Down Expand Up @@ -423,10 +425,10 @@ in `spago.dhall` and then do `spago install`, it will not be downloaded.

### Override a package in the package set with a remote one

Let's now say that we test that our fix works, and we are ready to Pull Request the fix.
Let's now say that we test that our fix from above works, and we are ready to Pull Request the fix.

So we push our fork and open the PR, but while we wait for the fix to land on the next
package-set release, we still want to use the fix in our production build.
`package sets` release, we still want to use the fix in our production build.

In this case, we can just change the override to point to some commit of our fork, like this:

Expand All @@ -448,7 +450,7 @@ commits to a branch, `spago` won't pick them up unless you delete the `.spago` f

### Add a package to the package set

If a package is not in the upstream package-set, you can add it in a similar way,
If a package is not in the upstream package set, you can add it in a similar way,
by changing the `additions` record in the `packages.dhall` file.

E.g. if we want to add the `facebook` package:
Expand All @@ -468,7 +470,7 @@ let additions =
, repo =
"https://github.com/Unisay/purescript-facebook.git"
, version =
"v0.3.0"
"v0.3.0" -- branch, tag, or commit hash
}
}
```
Expand Down Expand Up @@ -636,9 +638,26 @@ in upstream // overrides
}
```

Note that you can also handle as a "monorepo" a simpler situation where you want to "split"
dependencies, so e.g. if you want to not include your test dependencies in your app's
dependencies, you can have a "test" project depend on the "app" project.
### `devDependencies`, `testDependencies`, or in general a situation with many configurations

You might have a simpler situation than a monorepo, where e.g. you just want to "split" dependencies.

A common case is when you don't want to include your test dependencies in your app's dependencies.

E.g. if you want to add `purescript-spec` to your test dependencies you can have a `test.dhall` that looks like this:
```dhall
let conf = ./spago.dhall

in conf // {
sources = [ "test/**/*.purs" ],
dependencies = conf.dependencies # [ "spec" ]
}
```

And then you can run tests like this:
```bash
$ spago -x test.dhall test
```

### Bundle a project into a single JS file

Expand Down Expand Up @@ -728,6 +747,16 @@ $ spago docs --format ctags
```


### Get source maps for my project

Quoting from [this tweet](https://twitter.com/jusrin00/status/1092071407356387328):

1. build with `--purs-args '-g sourcemaps'
2. source output (like `var someModule = require('./output/Whatever/index.js');`) and use
something like `parcel`, to avoid mangling/destroying the sourcemaps
3. now you can see your breakpoints in action


### Publish my library

If you wish to develop a library with `spago` you can definitely do so, and use it to
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: spago
version: 0.9.0.0
version: 0.10.0.0
github: "spacchetti/spago"
license: BSD3
author: "Justin Woo, Fabrizio Ferrai"
Expand Down
2 changes: 1 addition & 1 deletion src/Spago/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ assertDirectory directory = do

-- | Release tag for the `purescript-docs-search` app.
docsSearchVersion :: Text
docsSearchVersion = "v0.0.4"
docsSearchVersion = "v0.0.5"


githubTokenEnvVar :: IsString t => t
Expand Down