From 9573d654691ae50d6d38dcc2558bcb769d3bd19f Mon Sep 17 00:00:00 2001 From: benjmhart Date: Sun, 6 Oct 2019 23:23:44 -0400 Subject: [PATCH 01/25] filter out files in .spago folder from watch list --- src/Spago/Build.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Spago/Build.hs b/src/Spago/Build.hs index 7ddeddd03..db3fd02ea 100644 --- a/src/Spago/Build.hs +++ b/src/Spago/Build.hs @@ -120,7 +120,7 @@ build buildOpts@BuildOptions{..} maybePostBuild = do absoluteJSGlobs <- traverse makeAbsolute jsMatches Watch.watch - (Set.fromAscList $ fmap Glob.compile $ absolutePSGlobs <> absoluteJSGlobs) + (Set.fromAscList $ fmap Glob.compile . removeDotSpago $ absolutePSGlobs <> absoluteJSGlobs) shouldClear (buildAction (wrap <$> psMatches)) @@ -137,6 +137,7 @@ build buildOpts@BuildOptions{..} maybePostBuild = do wrap = Purs.SourcePath . Text.pack unwrap = Text.unpack . Purs.unSourcePath + removeDotSpago = filter $ not . (".spago" `List.isInfixOf`) -- | Start a repl repl From db9198f8b30c13028e14e1121f7c7317e89b8186 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Sun, 6 Oct 2019 23:27:14 -0400 Subject: [PATCH 02/25] add #430 to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fa38ef22..04add0e03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ New features: Bugfixes: - Warn (but don't error) when trying to watch missing directories (#406) - Fix confusing warning when trying to `spago install` a package already present in project dependencies list (#436) +- Do not watch files in `.spago` folder when running `spago build --watch` (#430) ## [0.10.0] - 2019-09-21 From f81ddf970e0eb6dc8c4a6095f0b969ba45b99043 Mon Sep 17 00:00:00 2001 From: Ben Hart Date: Tue, 8 Oct 2019 10:52:41 -0400 Subject: [PATCH 03/25] Update src/Spago/Build.hs Co-Authored-By: Jan Hrcek --- src/Spago/Build.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Spago/Build.hs b/src/Spago/Build.hs index e08733568..c51b096a9 100644 --- a/src/Spago/Build.hs +++ b/src/Spago/Build.hs @@ -139,7 +139,7 @@ build buildOpts@BuildOptions{..} maybePostBuild = do wrap = Purs.SourcePath . Text.pack unwrap = Text.unpack . Purs.unSourcePath - removeDotSpago = filter $ not . (".spago" `List.isInfixOf`) + removeDotSpago = filter (\glob -> ".spago" `notElem` splitDirectories glob) -- | Start a repl repl From 8b32033d43d7da32ff79b4a3f7ed39c2bf93fb3b Mon Sep 17 00:00:00 2001 From: benjmhart Date: Wed, 9 Oct 2019 07:51:00 -0400 Subject: [PATCH 04/25] fix build by importing split directories --- src/Spago/Build.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Spago/Build.hs b/src/Spago/Build.hs index c51b096a9..388dd4c0e 100644 --- a/src/Spago/Build.hs +++ b/src/Spago/Build.hs @@ -29,6 +29,7 @@ import qualified Data.List.NonEmpty as NonEmpty import qualified Data.Set as Set import qualified Data.Text as Text import System.Directory (getCurrentDirectory) +import System.FilePath (splitDirectories) import qualified System.FilePath.Glob as Glob import qualified System.IO as Sys import qualified System.IO.Temp as Temp @@ -139,7 +140,7 @@ build buildOpts@BuildOptions{..} maybePostBuild = do wrap = Purs.SourcePath . Text.pack unwrap = Text.unpack . Purs.unSourcePath - removeDotSpago = filter (\glob -> ".spago" `notElem` splitDirectories glob) + removeDotSpago = filter (\glob -> ".spago" `notElem` (splitDirectories glob)) -- | Start a repl repl From d09ed0af84d4e0cb06302b5d7daed0c493fde3fa Mon Sep 17 00:00:00 2001 From: benjmhart Date: Fri, 18 Oct 2019 23:21:05 -0400 Subject: [PATCH 05/25] added step-by-step guide to setting up a spago + parcel project to documentation --- README.md | 106 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 82 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 52bc26ac3..dbc13b44b 100644 --- a/README.md +++ b/README.md @@ -698,31 +698,89 @@ To skip this build you can add the `--no-build` flag. ### Make a project with PureScript + JavaScript -Take a look at [TodoMVC with react-basic + spago + parcel][todomvc] to have a starting point. - -This generally consists of two separate build steps: - -1. Build the project with `spago`: - - this will compile your project to JS - - you can use either `spago build` - which will create many files that you can require in your JS - - or `spago bundle-module`, which will create only one Dead-Code-Eliminated file that you can require. - - the tradeoff between the two is compile times vs bundle size: `bundle-module` will be more expensive - to build, but will generally be smaller, while just requiring the artifacts from `build` is very fast - to compile but might lead to a bigger bundle (you should benchmark this though) -2. Bundle the project with a JS bundler: - - this will usually bundle everything in a single JS file, after resolving all the `require`s - and including the JS dependencies - - you'll usually have a `index.js` file in your project, that will include something like: - ```js - .. - // So you require the PureScript file from js - var PureScriptMain = require('./output/Main'); - .. - // Then you can just call its functions from js - PureScriptMain.somemethod(); - ``` - - the above example project uses `parcel`, but you can use `webpack`, `browserify`, etc. +Take a look at [TodoMVC with react-basic + spago + parcel][todomvc] for a working example. + +#### Getting Started from Scratch + +To start a project using Spago and Parcel together, here's the cammands and file setup you'll need: + +0. install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` +1. Install Spago: `npm i -g spago purescript` +2. Create a folder for your project: `mkdir ` +3. Move to the project folder: `cd ` +4. Create your PureScript project with Spago: `spago init`, This also produces a `./src/Main.purs` file which contains some starter code. +5. Initialize the JavaScript/NPM project `npm init` +6. Install Parcel as a dependency `npm i parcel` +7. Add a JavaScript file which imports and calls the `main` function from the output of `./src/Main.purs`. This can be placed in the root directory for your project. Traditionally this file is named `index.js`. The `main` function from `Main.purs` can accept arguments, this is useful since parcel will replace environment variables inside of JavaScript. It is recommended to read any environment variables in the JavaScript file and pass them as arguments to `main`. Here is an example JavaScript file: + +``` JavaScript +var Main = require('./output/Main'); + +function main () { + /* + Here we could add variables such as + + var baseUrl = process.env.BASE_URL; + + Parcel will replace `process.env.BASE_URL` + with the string contents of the BASE_URL environment + variable at bundle/build time. + A .env file can also be used to override shell variables + for more information, see https://en.parceljs.org/env.html + + These variables can be supplied to the Main.main function, + however, you will need to change the type to accept variables, by default it is an Effect. + You will probably want to make it a function from String -> Effect () + */ + + Main.main(); + } + +// HMR stuff +// For more info see: https://parceljs.org/hmr.html +if (module.hot) { + module.hot.accept(function () { + console.log('Reloaded, running main again'); + main(); + }); +} + +console.log('Starting app'); + +main(); +``` + +8. Add an HTML file which sources your JavaScript file. This can be named `index.html` and placed in the root directory of your project. Here is an example HTML file: + +``` HTML + + + + + + + +
+ + + +``` + +9. Add a development script to `package.json` which will hot-bundle the PureScript code with Spago, and then hot-reload the resulting JavaScript code using Parcel. Here, we'll call this script `dev`. + +``` +... + "scripts": { + "dev": "spago build --watch & parcel index.html", + }, +... +``` + +This script will simultanously run spago and parcel. When you run it with `npm run dev`, Parcel will tell you which port your application is being served on, by default this will be `localhost:1234`. If you've followed this guide you can navigate there in a browser and open the javascript console. you will see the output of both `index.js` and the compiled `Main.purs` file. When you modify any purescript file in `./src`, you should see Spago and Parcel rebuild your application, and the browser should execute the new code. For some applications you may adjust the JavaScript function that handles hot modules to fully reload the page with `window.location.reload();`. + +10. when you are ready to build and deploy your application as static html/js/css, you may add a `build` script to package.json in order to produce a final bundle, this script is usually something like `spago build && parcel build index.html`. +Other build options are available, using webpack (and purs-loader), or browserify. Parcel is used here for it's low-configuration overhead. ### Generate documentation for my project From b97a3d632bcf6f33605b7ea06137c14ee9557f68 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Fri, 18 Oct 2019 23:25:49 -0400 Subject: [PATCH 06/25] added guide for nodemon setup added webpack config instructions and made corrections on other getting started docs --- CHANGELOG.md | 1 + README.md | 225 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 222 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fa61c41e..597236955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ New features: - `spago build` now uses shared output folder to reduce build duplication. Pass `--no-share-output` flag to disable this behavior (#377) - `spago install purescript-XYZ` will now strip `purescript-` prefix and install XYZ (if it exists in package set) instead of just failing with a warning (#367) - `spago run` now recognizes backend specified in the configuration file and calls the backend with `--run` argument. +- documentation now includes a step-by-step guide on setting up a Spago/Parcel project (#456) Bugfixes: - Warn (but don't error) when trying to watch missing directories (#406) diff --git a/README.md b/README.md index dbc13b44b..a376d5f68 100644 --- a/README.md +++ b/README.md @@ -700,17 +700,17 @@ To skip this build you can add the `--no-build` flag. Take a look at [TodoMVC with react-basic + spago + parcel][todomvc] for a working example. -#### Getting Started from Scratch +#### Getting Started from Scratch With Parcel (For Front End Projects) To start a project using Spago and Parcel together, here's the cammands and file setup you'll need: 0. install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` -1. Install Spago: `npm i -g spago purescript` +1. Install Spago and PureScript: `npm i -g spago purescript` 2. Create a folder for your project: `mkdir ` 3. Move to the project folder: `cd ` 4. Create your PureScript project with Spago: `spago init`, This also produces a `./src/Main.purs` file which contains some starter code. 5. Initialize the JavaScript/NPM project `npm init` -6. Install Parcel as a dependency `npm i parcel` +6. Install Parcel as a dependency `npm i parcel` (this is usually a dev dependancy, add the `--save-dev` flag to prevent installation in production or CI environments) 7. Add a JavaScript file which imports and calls the `main` function from the output of `./src/Main.purs`. This can be placed in the root directory for your project. Traditionally this file is named `index.js`. The `main` function from `Main.purs` can accept arguments, this is useful since parcel will replace environment variables inside of JavaScript. It is recommended to read any environment variables in the JavaScript file and pass them as arguments to `main`. Here is an example JavaScript file: ``` JavaScript @@ -778,10 +778,227 @@ main(); This script will simultanously run spago and parcel. When you run it with `npm run dev`, Parcel will tell you which port your application is being served on, by default this will be `localhost:1234`. If you've followed this guide you can navigate there in a browser and open the javascript console. you will see the output of both `index.js` and the compiled `Main.purs` file. When you modify any purescript file in `./src`, you should see Spago and Parcel rebuild your application, and the browser should execute the new code. For some applications you may adjust the JavaScript function that handles hot modules to fully reload the page with `window.location.reload();`. -10. when you are ready to build and deploy your application as static html/js/css, you may add a `build` script to package.json in order to produce a final bundle, this script is usually something like `spago build && parcel build index.html`. +10. At this point we should be able to test our program by running `npm run dev`, when you navigate a browser to localhost:1234, you should see '🍝' as output in the javascript development console if this was performed successfully + +11. when you are ready to build and deploy your application as static html/js/css, you may add a `build` script to package.json in order to produce a final bundle, this script is usually something like `spago build && parcel build index.html`. Other build options are available, using webpack (and purs-loader), or browserify. Parcel is used here for it's low-configuration overhead. + +#### Getting Started from Scratch With WebPack (For Larger front end projects) + +0. install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` +1. Install Spago and PureScript: `npm i -g spago purescript` +2. Create a folder for your project: `mkdir ` +3. Move to the project folder: `cd ` +4. Create your PureScript project with Spago: `spago init`, This also produces a `./src/Main.purs` file which contains some starter code. +5. Initialize the JavaScript/NPM project `npm init` +6. Add WebPack as a dependancy `npm install webpack webpack-cli webpack-dev-server` (this is usually a dev dependancy, add the `--save-dev` flag to prevent installation in production or CI environments) +7. Install the PureScript loader and HTML plugin for WebPack `npm install purs-loader html-webpack plugin` (This is likely also dev dependancy. Depending on other tools/filetypes you may require additional loaders, This may include css/scss, image files, etc. please refer to the [WebPack documentation][https://webpack.js.org/] for more information) +8. Create an HTML file that will serve as the entry point for your application. Typically this is `index.html`. in your HTML file, be sure to pull in the `bundle.js` file, which will be Webpack's output. here is an example HTML file: + +``` html + + + + + + +
+ + + + +``` + +9. create a `webpack.config.js` file in the root of your project. Here is an example webpack configuration: + +``` JavaScript + +'use strict'; + +const path = require('path'); + +const HtmlWebpackPlugin = require('html-webpack-plugin'); + +const webpack = require('webpack'); + +const isWebpackDevServer = process.argv.some(a => path.basename(a) === 'webpack-dev-server'); + +const isWatch = process.argv.some(a => a === '--watch'); + +const plugins = + isWebpackDevServer || !isWatch ? [] : [ + function(){ + this.plugin('done', function(stats){ + process.stderr.write(stats.toString('errors-only')); + }); + } + ] +; + +module.exports = { + devtool: 'eval-source-map', + + devServer: { + contentBase: path.resolve(__dirname, 'dist'), + port: 4008, + stats: 'errors-only' + }, + + entry: './src/index.js', + + output: { + path: path.resolve(__dirname, 'dist'), + filename: 'bundle.js' + }, + + module: { + rules: [ + { + test: /\.purs$/, + use: [ + { + loader: 'purs-loader', + options: { + src: [ + 'src/**/*.purs' + ], + spago: true, + watch: isWebpackDevServer || isWatch, + pscIde: true + } + } + ] + }, + { + test: /\.(png|jpg|gif)$/i, + use: [ + { + loader: 'url-loader', + options: { + limit: 8192, + }, + }, + ], + }, + ] + }, + + resolve: { + modules: [ 'node_modules' ], + extensions: [ '.purs', '.js'] + }, + + plugins: [ + new webpack.LoaderOptionsPlugin({ + debug: true + }), + new HtmlWebpackPlugin({ + title: 'purescript-webpack-example', + template: 'index.html' + }) + ].concat(plugins) +}; +``` + +10. Add `src/index.js`, this file will import and execute the purescript Main file, and serves as the entry point for the webpack bundler. You can also use this file to refer to environment variables which can then be passed to Purescript code. Please refer to the webpack documentation on environment variable replacement during bundling. Here is an example `index.js` file: + +``` JavaScript + +'use strict'; + +require('./Main.purs').main(); + +if (module.hot) { + module.hot.accept(); +} + +console.log('app starting' ) +``` + +11. Add the following scripts to `package.json` + +``` +... + + "scripts": { + "webpack:server": "webpack-dev-server --progress --inline --hot" + }, +... +``` + +12. At this point we should be able to test our program by running `npm run webpack:server`, once you navigate in a browser to localhost:4008 you should see '🍝' as output in the javascript development console if this was performed successfully. + +13. For production builds, it is recommended to have a seperate build and serve script. Please refer to the [WebPack documentation][https://webpack.js.org/] for more information. Generally production builds use a seperate webpack configuration. + + +#### Getting Started from Scratch With Nodemon (for Backend and/or CLI projects) + +0. install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` +1. Install Spago and PureScript: `npm i -g spago purescript` +2. Create a folder for your project: `mkdir ` +3. Move to the project folder: `cd ` +4. Create your PureScript project with Spago: `spago init`, This also produces a `./src/Main.purs` file which contains some starter code. +5. Initialize the JavaScript/NPM project `npm init` +6. Add Nodemon as a dependancy `npm install nodemon` (this is usually a dev dependancy, add the `--save-dev` flag to prevent installation in production or CI environments) +7. Add a JavaScript file which imports and calls the `main` function from the output of `./src/Main.purs`. This can be placed in the root directory for your project. Traditionally this file is named `index.js`. The `main` function from `Main.purs` can accept arguments, this is useful since the Node runtime will replace environment variables inside of JavaScript. It is recommended to read any environment variables in the JavaScript file and pass them as arguments to `main`. Here is an example JavaScript file: + +``` JavaScript +'use strict' + +var Main = require('./output/Main'); + +function main () { + /* + Here we could add variables such as + + var baseUrl = process.env.BASE_URL; + + Node will replace `process.env.BASE_URL` + with the string contents of the BASE_URL environment + variable at bundle/build time. + + These variables can be supplied to the Main.main function, + however, you will need to change the type to accept variables, by default it is an Effect. + You will probably want to make it a function from String -> Effect () + */ + + Main.main(); +} +``` + +8. At this point we should be able to test our program by running `spago build` followed by `node index.js`, you should see '🍝' as output if this was performed successfully +9. Now we want to enable Nodemon, Nodemon will watch for file changes in the dependancy tree and reload our Node program each time there is a change during development. We'll also tell Spago to watch our PureScript source files so that they are compiled, which in turn will trigger Nodemon to reload. + +To configure this, add the following script to your `package.json` file: + +``` +... + "scripts": { + "dev": "spago build --watch & nodemon \"node index.js\"", + }, +... +``` + +10. You can now run your development environment by running `npm run dev` + +11. For a production build, add the following scripts to your `package.json`: + +``` +... + "scripts": { + "build": "spago build", + "start": "node index.js" + }, +... +``` + +12. To run a production build, you can simply run `npm run build` and to start a production process, call `npm start` + +For publishing CLI programs or npm modules, please refer to the npm documentation + + ### Generate documentation for my project To build documentation for your project and its dependencies (i.e. a "project-local From c67e582d7bebaf128adbb9d6adc614e2a4821b8f Mon Sep 17 00:00:00 2001 From: Justin Woo Date: Sat, 26 Oct 2019 02:07:11 +0300 Subject: [PATCH 07/25] Update to purs 0.13.4 (#469) Also update to Dhall 1.27 --- .travis.yml | 2 +- README.md | 2 +- appveyor.yml | 2 +- src/Spago/Dhall.hs | 5 +- src/Spago/PackageSet.hs | 3 +- src/Spago/Purs.hs | 2 +- src/Spago/Types.hs | 4 +- stack.yaml | 2 +- stack.yaml.lock | 8 +- templates/packages.dhall | 2 +- templates/spago.dhall | 12 +- test/BumpVersionSpec.hs | 4 +- test/SpagoSpec.hs | 21 +-- test/fixtures/alternative2.dhall | 2 +- test/fixtures/bundle-app.js | 6 +- test/fixtures/bundle-module.js | 6 +- test/fixtures/list-packages.json | 171 ++++++++++++-------- test/fixtures/list-packages.txt | 171 ++++++++++++-------- test/fixtures/spago-bower-import.dhall | 9 +- test/fixtures/spago-configV1.dhall | 6 +- test/fixtures/spago-configV2.dhall | 9 +- test/fixtures/spago-configWithBackend.dhall | 17 +- test/fixtures/spago-install-failure.dhall | 12 +- test/fixtures/spago-install-success.dhall | 9 +- test/fixtures/spago-no-comments.dhall | 12 +- test/fixtures/spago-psc-failure.dhall | 12 +- test/fixtures/spago-psc-success.dhall | 12 +- 27 files changed, 288 insertions(+), 235 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8ccc5947b..183a5eb72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,7 +100,7 @@ script: # get newest purescript from github releases TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p') - TAG="v0.13.3" + TAG="v0.13.4" wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/$PURS_OS.tar.gz tar -xvf $HOME/purescript.tar.gz -C $HOME/ chmod a+x $HOME/purescript diff --git a/README.md b/README.md index a376d5f68..a76444b11 100644 --- a/README.md +++ b/README.md @@ -567,7 +567,7 @@ Then: - the top level `packages.dhall` might look like this: ```dhall -let upstream = https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.0-20190626/src/packages.dhall sha256:9905f07c9c3bd62fb3205e2108515811a89d55cff24f4341652f61ddacfcf148 +let upstream = https://github.com/purescript/package-sets/releases/download/psc-0.13.4-20191025/packages.dhall sha256:f9eb600e5c2a439c3ac9543b1f36590696342baedab2d54ae0aa03c9447ce7d4 let overrides = { lib1 = ./lib1/spago.dhall as Location diff --git a/appveyor.yml b/appveyor.yml index c10fd0d55..2e4ff9b0c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,7 +23,7 @@ install: - npm install -g bower - ps: | $releases = "https://api.github.com/repos/purescript/purescript/releases" - $tag = "v0.13.3" + $tag = "v0.13.4" $download = "https://github.com/purescript/purescript/releases/download/$tag/win64.tar.gz" Invoke-WebRequest $download -Out purescript.tar.gz - tar -xvf purescript.tar.gz diff --git a/src/Spago/Dhall.hs b/src/Spago/Dhall.hs index c97d4eb8a..97635fd0b 100644 --- a/src/Spago/Dhall.hs +++ b/src/Spago/Dhall.hs @@ -18,6 +18,7 @@ import qualified Dhall.Map import qualified Dhall.Parser as Parser import qualified Dhall.Pretty import Dhall.TypeCheck (X, typeOf) +import Dhall.Util as Dhall import qualified Lens.Family type DhallExpr a = Dhall.Expr Parser.Src a @@ -31,8 +32,8 @@ format pathText = liftIO $ Left (_e :: SomeException) -> f $ Dhall.Format.Modify path Right _ -> pure () where - f = Dhall.Format.format . Dhall.Format.Format Dhall.Pretty.ASCII - path = Just $ Text.unpack pathText + f = Dhall.Format.format . Dhall.Format.Format Dhall.Pretty.ASCII Dhall.NoCensor + path = Dhall.InputFile $ Text.unpack pathText -- | Prettyprint a Dhall expression adding a comment on top diff --git a/src/Spago/PackageSet.hs b/src/Spago/PackageSet.hs index f3302a6f1..2d1cdf89d 100644 --- a/src/Spago/PackageSet.hs +++ b/src/Spago/PackageSet.hs @@ -252,10 +252,11 @@ freeze path = do echo Messages.freezePackageSet liftIO $ Dhall.Freeze.freeze - (Just path) + (Dhall.InputFile path) Dhall.Freeze.OnlyRemoteImports Dhall.Freeze.Secure Dhall.Pretty.ASCII + Dhall.NoCensor -- | Freeze the file if any of the remote imports are not frozen diff --git a/src/Spago/Purs.hs b/src/Spago/Purs.hs index d241f0f86..ab614cf82 100644 --- a/src/Spago/Purs.hs +++ b/src/Spago/Purs.hs @@ -25,7 +25,7 @@ import qualified Spago.Messages as Messages newtype ModuleName = ModuleName { unModuleName :: Text } newtype TargetPath = TargetPath { unTargetPath :: Text } newtype SourcePath = SourcePath { unSourcePath :: Text } - deriving newtype (Show, Dhall.Interpret) + deriving newtype (Show, Dhall.FromDhall) newtype ExtraArg = ExtraArg { unExtraArg :: Text } deriving newtype (Eq) diff --git a/src/Spago/Types.hs b/src/Spago/Types.hs index d6077b967..d54eeae21 100644 --- a/src/Spago/Types.hs +++ b/src/Spago/Types.hs @@ -12,7 +12,7 @@ import qualified Spago.Messages as Messages newtype PackageName = PackageName { packageName :: Text } deriving (Show) - deriving newtype (Eq, Ord, ToJSON, FromJSON, ToJSONKey, FromJSONKey, Dhall.Interpret) + deriving newtype (Eq, Ord, ToJSON, FromJSON, ToJSONKey, FromJSONKey, Dhall.FromDhall) -- | A package-set package. -- Matches the packages definition in Package.dhall from package-sets @@ -59,7 +59,7 @@ newtype Repo = Repo { unRepo :: Text } instance ToJSON Repo -instance Dhall.Interpret Repo where +instance Dhall.FromDhall Repo where autoWith _ = makeRepo <$> Dhall.strictText where -- We consider a "Remote" anything that `parseURI` thinks is a URI diff --git a/stack.yaml b/stack.yaml index 088b8a668..b46aac118 100644 --- a/stack.yaml +++ b/stack.yaml @@ -2,7 +2,7 @@ resolver: lts-14.3 packages: - . extra-deps: -- dhall-1.26.0 +- dhall-1.27.0 - github-0.22 - async-pool-0.9.0.2@sha256:3aca5861a7b839d02a3f5c52ad6d1ce368631003f68c3d9cb6d711c29e9618db,1599 - binary-instances-1@sha256:cdef50410f2797de38f021d328d38c32b2f4abeaab86bfaf78e0657150863090,2613 diff --git a/stack.yaml.lock b/stack.yaml.lock index 34e1c29a7..3d2f20d3d 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -5,12 +5,12 @@ packages: - completed: - hackage: dhall-1.26.0@sha256:0f559ab8ed9d7b7f1ed0e2a99a9aadee00d8c6c63b92e9be209d84f7f4197b10,33247 + hackage: dhall-1.27.0@sha256:b522d6b534949e65771ed0179afc1488e4de2b185af5ed38e4806a6720db51bf,30519 pantry-tree: - size: 221712 - sha256: cbd35293fc6b2ef77e5d64fca3775b2915aea86ad0c3425e08d21c950fcd06ea + size: 232998 + sha256: 3f79ba6a3eeb0f59c1cf41663d65eebe71f5780f5765169e3d52406789a6f286 original: - hackage: dhall-1.26.0 + hackage: dhall-1.27.0 - completed: hackage: github-0.22@sha256:13f09e904248a40dd173c08f2859d0dfda178a7c27f88df20b70a0d5a7614757,6909 pantry-tree: diff --git a/templates/packages.dhall b/templates/packages.dhall index 978a6b95c..bf7701a26 100644 --- a/templates/packages.dhall +++ b/templates/packages.dhall @@ -119,7 +119,7 @@ let additions = let upstream = - https://github.com/purescript/package-sets/releases/download/psc-0.13.3-20191005/packages.dhall sha256:ba287d858ada09c4164792ad4e643013b742c208cbedf5de2e35ee27b64b6817 + https://github.com/purescript/package-sets/releases/download/psc-0.13.4-20191025/packages.dhall sha256:f9eb600e5c2a439c3ac9543b1f36590696342baedab2d54ae0aa03c9447ce7d4 let overrides = {=} diff --git a/templates/spago.dhall b/templates/spago.dhall index 956aeb765..657fa23e0 100644 --- a/templates/spago.dhall +++ b/templates/spago.dhall @@ -2,12 +2,8 @@ Welcome to a Spago project! You can edit this file as you like. -} -{ name = - "my-project" -, dependencies = - [ "console", "effect", "psci-support" ] -, packages = - ./packages.dhall -, sources = - [ "src/**/*.purs", "test/**/*.purs" ] +{ name = "my-project" +, dependencies = [ "console", "effect", "psci-support" ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] } diff --git a/test/BumpVersionSpec.hs b/test/BumpVersionSpec.hs index a5c1e9f38..c1886fcb4 100644 --- a/test/BumpVersionSpec.hs +++ b/test/BumpVersionSpec.hs @@ -18,8 +18,8 @@ import Spago.Version (VersionBump (..), getNextVersion, parseV -- fix the package set so bower.json is generated with predictable versions packageSet :: Text packageSet = - "let upstream = https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.0-20190614/src/packages.dhall \ - \ sha256:5cbf2418298e7de762401c5719c6eb18eda4c67ba512b3f076b50a793a7fc482 \ + "let upstream = https://github.com/purescript/package-sets/releases/download/psc-0.13.4-20191025/packages.dhall \ + \ sha256:f9eb600e5c2a439c3ac9543b1f36590696342baedab2d54ae0aa03c9447ce7d4 \ \ in upstream" setup :: IO () -> IO () diff --git a/test/SpagoSpec.hs b/test/SpagoSpec.hs index 910d6cd9b..dae9433f3 100644 --- a/test/SpagoSpec.hs +++ b/test/SpagoSpec.hs @@ -166,7 +166,7 @@ spec = around_ setup $ do it "Spago should not change the alternative config if it does not change dependencies" $ do spago ["init"] >>= shouldBeSuccess - writeTextFile "alternative2.dhall" "./spago.dhall // { sources = [ \"src/**/*.purs\" ] }" + writeTextFile "alternative2.dhall" "./spago.dhall // { sources = [ \"src/**/*.purs\" ] }\n" spago ["-x", "alternative2.dhall", "install", "simple-json"] >>= shouldBeSuccess spago ["-x", "alternative2.dhall", "install", "simple-json"] >>= shouldBeSuccessOutput "alternative2install.txt" checkFixture "alternative2.dhall" @@ -416,9 +416,9 @@ spec = around_ setup $ do mv "spago.dhall" "spago-old.dhall" writeTextFile "spago.dhall" configWithBackend - spago ["build"] >>= shouldBeSuccess - - checkFixture "alternate-backend-output.txt" + -- Blocked by https://github.com/purescript/purescript/issues/3743 + -- spago ["-j", "5", "build"] >>= shouldBeSuccess + -- checkFixture "alternate-backend-output.txt" it "Passing `--codegen corefn` with backend option should fail" $ do configWithBackend <- readFixture "spago-configWithBackend.dhall" @@ -426,9 +426,10 @@ spec = around_ setup $ do mv "spago.dhall" "spago-old.dhall" writeTextFile "spago.dhall" configWithBackend - spago ["build"] >>= shouldBeSuccess - spago ["build", "--purs-args", "--codegen", "--purs-args", "corefn"] >>= shouldBeFailureOutput "codegen-opt-with-backend.txt" - spago ["build", "--purs-args", "--codegen", "--purs-args", "docs"] >>= shouldBeFailureOutput "codegen-opt-with-backend.txt" + -- Blocked by https://github.com/purescript/purescript/issues/3743 + -- spago ["-j", "5", "build"] >>= shouldBeSuccess + -- spago ["build", "--purs-args", "--codegen", "--purs-args", "corefn"] >>= shouldBeFailureOutput "codegen-opt-with-backend.txt" + -- spago ["build", "--purs-args", "--codegen", "--purs-args", "docs"] >>= shouldBeFailureOutput "codegen-opt-with-backend.txt" @@ -504,7 +505,7 @@ spec = around_ setup $ do = map Text.strip $ filter (not . null . Text.breakOnAll "https://github.com/purescript/package-sets") $ Text.lines packages - writeTextFile "packages.dhall" "https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.0-20190713/src/packages.dhall sha256:906af79ba3aec7f429b107fd8d12e8a29426db8229d228c6f992b58151e2308e" + writeTextFile "packages.dhall" "https://github.com/purescript/package-sets/releases/download/psc-0.13.4-20191025/packages.dhall sha256:f9eb600e5c2a439c3ac9543b1f36590696342baedab2d54ae0aa03c9447ce7d4" spago ["-v", "upgrade-set"] >>= shouldBeSuccess newPackages <- Text.strip <$> readTextFile "packages.dhall" newPackages `shouldBe` packageSetUrl @@ -572,12 +573,12 @@ spec = around_ setup $ do spago ["init"] >>= shouldBeSuccess mv "packages.dhall" "packages-old.dhall" - writeTextFile "packages.dhall" "https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.0-20190626/src/packages.dhall sha256:9905f07c9c3bd62fb3205e2108515811a89d55cff24f4341652f61ddacfcf148" + writeTextFile "packages.dhall" "https://github.com/purescript/package-sets/releases/download/psc-0.13.4-20191025/packages.dhall sha256:f9eb600e5c2a439c3ac9543b1f36590696342baedab2d54ae0aa03c9447ce7d4" spago ["list-packages"] >>= shouldBeSuccessOutput "list-packages.txt" it "Spago should list-packages in JSON successfully" $ do spago ["init"] >>= shouldBeSuccess mv "packages.dhall" "packages-old.dhall" - writeTextFile "packages.dhall" "https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.0-20190626/src/packages.dhall sha256:9905f07c9c3bd62fb3205e2108515811a89d55cff24f4341652f61ddacfcf148" + writeTextFile "packages.dhall" "https://github.com/purescript/package-sets/releases/download/psc-0.13.4-20191025/packages.dhall sha256:f9eb600e5c2a439c3ac9543b1f36590696342baedab2d54ae0aa03c9447ce7d4" spago ["list-packages", "--json"] >>= shouldBeSuccessOutput "list-packages.json" diff --git a/test/fixtures/alternative2.dhall b/test/fixtures/alternative2.dhall index c691e4ebb..f59b78bfe 100644 --- a/test/fixtures/alternative2.dhall +++ b/test/fixtures/alternative2.dhall @@ -1 +1 @@ -./spago.dhall // { sources = [ "src/**/*.purs" ] } \ No newline at end of file +./spago.dhall // { sources = [ "src/**/*.purs" ] } diff --git a/test/fixtures/bundle-app.js b/test/fixtures/bundle-app.js index d1c4ad257..b8ce4a649 100644 --- a/test/fixtures/bundle-app.js +++ b/test/fixtures/bundle-app.js @@ -1,4 +1,4 @@ -// Generated by purs bundle 0.13.3 +// Generated by purs bundle 0.13.4 var PS = {}; (function(exports) { "use strict"; @@ -11,7 +11,7 @@ var PS = {}; }; })(PS["Effect.Console"] = PS["Effect.Console"] || {}); (function($PS) { - // Generated by purs version 0.13.3 + // Generated by purs version 0.13.4 "use strict"; $PS["Effect.Console"] = $PS["Effect.Console"] || {}; var exports = $PS["Effect.Console"]; @@ -19,7 +19,7 @@ var PS = {}; exports["log"] = $foreign.log; })(PS); (function($PS) { - // Generated by purs version 0.13.3 + // Generated by purs version 0.13.4 "use strict"; $PS["Main"] = $PS["Main"] || {}; var exports = $PS["Main"]; diff --git a/test/fixtures/bundle-module.js b/test/fixtures/bundle-module.js index 58e0c67a0..3ef624d0b 100644 --- a/test/fixtures/bundle-module.js +++ b/test/fixtures/bundle-module.js @@ -1,4 +1,4 @@ -// Generated by purs bundle 0.13.3 +// Generated by purs bundle 0.13.4 var PS = {}; (function(exports) { "use strict"; @@ -11,7 +11,7 @@ var PS = {}; }; })(PS["Effect.Console"] = PS["Effect.Console"] || {}); (function($PS) { - // Generated by purs version 0.13.3 + // Generated by purs version 0.13.4 "use strict"; $PS["Effect.Console"] = $PS["Effect.Console"] || {}; var exports = $PS["Effect.Console"]; @@ -19,7 +19,7 @@ var PS = {}; exports["log"] = $foreign.log; })(PS); (function($PS) { - // Generated by purs version 0.13.3 + // Generated by purs version 0.13.4 "use strict"; $PS["Main"] = $PS["Main"] || {}; var exports = $PS["Main"]; diff --git a/test/fixtures/list-packages.json b/test/fixtures/list-packages.json index e17d27357..9febb1eb7 100644 --- a/test/fixtures/list-packages.json +++ b/test/fixtures/list-packages.json @@ -1,119 +1,138 @@ -{"packageName":"aff","version":"v5.1.1","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-aff.git"}} +{"packageName":"aff","version":"v5.1.2","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-aff.git"}} {"packageName":"aff-bus","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-aff-bus.git"}} {"packageName":"aff-coroutines","version":"v7.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-aff-coroutines.git"}} {"packageName":"aff-promise","version":"v2.1.0","repo":{"tag":"Remote","contents":"https://github.com/nwolverson/purescript-aff-promise.git"}} -{"packageName":"affjax","version":"v9.0.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-affjax.git"}} +{"packageName":"aff-retry","version":"v1.2.1","repo":{"tag":"Remote","contents":"https://github.com/Unisay/purescript-aff-retry.git"}} {"packageName":"ansi","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/hdgarrood/purescript-ansi.git"}} {"packageName":"argonaut","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-argonaut.git"}} {"packageName":"argonaut-codecs","version":"v6.0.2","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-argonaut-codecs.git"}} -{"packageName":"argonaut-core","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-argonaut-core.git"}} +{"packageName":"argonaut-core","version":"v5.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-argonaut-core.git"}} {"packageName":"argonaut-generic","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-argonaut-generic.git"}} {"packageName":"argonaut-traversals","version":"v7.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-argonaut-traversals.git"}} {"packageName":"array-views","version":"v0.0.2","repo":{"tag":"Remote","contents":"https://github.com/klntsky/purescript-array-views.git"}} -{"packageName":"arraybuffer","version":"v10.0.0","repo":{"tag":"Remote","contents":"https://github.com/jacereda/purescript-arraybuffer.git"}} +{"packageName":"arraybuffer","version":"v10.0.1","repo":{"tag":"Remote","contents":"https://github.com/jacereda/purescript-arraybuffer.git"}} {"packageName":"arraybuffer-types","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-arraybuffer-types.git"}} -{"packageName":"arrays","version":"v5.3.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-arrays.git"}} +{"packageName":"arrays","version":"v5.3.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-arrays.git"}} {"packageName":"assert","version":"v4.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-assert.git"}} {"packageName":"avar","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-avar.git"}} -{"packageName":"b64","version":"v0.0.5","repo":{"tag":"Remote","contents":"https://github.com/menelaos/purescript-b64.git"}} -{"packageName":"basic-auth","version":"v1.0.1","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-basic-auth.git"}} -{"packageName":"behaviors","version":"v7.0.0","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-behaviors.git"}} +{"packageName":"b64","version":"v0.0.6","repo":{"tag":"Remote","contents":"https://github.com/menelaos/purescript-b64.git"}} +{"packageName":"basic-auth","version":"v1.0.3","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-basic-auth.git"}} +{"packageName":"behaviors","version":"v8.0.0","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-behaviors.git"}} {"packageName":"bifunctors","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-bifunctors.git"}} {"packageName":"bigints","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/sharkdp/purescript-bigints.git"}} +{"packageName":"biscotti-cookie","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/drewolson/purescript-biscotti-cookie.git"}} +{"packageName":"biscotti-session","version":"v0.1.1","repo":{"tag":"Remote","contents":"https://github.com/drewolson/purescript-biscotti-session.git"}} +{"packageName":"bower-json","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/klntsky/purescript-bower-json.git"}} {"packageName":"bucketchain","version":"v0.3.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain.git"}} {"packageName":"bucketchain-basic-auth","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-basic-auth.git"}} {"packageName":"bucketchain-conditional","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-conditional.git"}} {"packageName":"bucketchain-cors","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-cors.git"}} {"packageName":"bucketchain-csrf","version":"v0.1.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-csrf.git"}} -{"packageName":"bucketchain-header-utils","version":"v0.1.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-header-utils.git"}} +{"packageName":"bucketchain-header-utils","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-header-utils.git"}} {"packageName":"bucketchain-health","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-health.git"}} -{"packageName":"bucketchain-history-api-fallback","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-history-api-fallback.git"}} +{"packageName":"bucketchain-history-api-fallback","version":"v0.3.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-history-api-fallback.git"}} {"packageName":"bucketchain-logger","version":"v0.3.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-logger.git"}} {"packageName":"bucketchain-secure","version":"v0.1.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-secure.git"}} -{"packageName":"bucketchain-simple-api","version":"v0.4.2","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-simple-api.git"}} +{"packageName":"bucketchain-simple-api","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-simple-api.git"}} {"packageName":"bucketchain-sslify","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-sslify.git"}} {"packageName":"bucketchain-static","version":"v0.3.0","repo":{"tag":"Remote","contents":"https://github.com/Bucketchain/purescript-bucketchain-static.git"}} -{"packageName":"bytestrings","version":"v7.0.0","repo":{"tag":"Remote","contents":"https://github.com/rightfold/purescript-bytestrings.git"}} +{"packageName":"bytestrings","version":"v8.0.0","repo":{"tag":"Remote","contents":"https://github.com/rightfold/purescript-bytestrings.git"}} {"packageName":"canvas","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-canvas.git"}} {"packageName":"catenable-lists","version":"v5.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-catenable-lists.git"}} -{"packageName":"checked-exceptions","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/natefaubion/purescript-checked-exceptions.git"}} +{"packageName":"checked-exceptions","version":"v3.1.0","repo":{"tag":"Remote","contents":"https://github.com/natefaubion/purescript-checked-exceptions.git"}} {"packageName":"cheerio","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/icyrockcom/purescript-cheerio.git"}} {"packageName":"chirashi","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-chirashi.git"}} {"packageName":"choco-pie","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-chocopie.git"}} {"packageName":"colors","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/sharkdp/purescript-colors.git"}} -{"packageName":"concur-react","version":"v0.3.7","repo":{"tag":"Remote","contents":"https://github.com/ajnsit/purescript-concur.git"}} +{"packageName":"concur-react","version":"v0.3.9","repo":{"tag":"Remote","contents":"https://github.com/ajnsit/purescript-concur.git"}} {"packageName":"console","version":"v4.2.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-console.git"}} {"packageName":"const","version":"v4.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-const.git"}} {"packageName":"contravariant","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-contravariant.git"}} {"packageName":"control","version":"v4.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-control.git"}} -{"packageName":"coroutines","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-coroutines.git"}} -{"packageName":"crypto","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-crypto.git"}} +{"packageName":"coroutines","version":"v5.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-coroutines.git"}} +{"packageName":"crypto","version":"v2.0.1","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-crypto.git"}} {"packageName":"css","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-css.git"}} +{"packageName":"cssom","version":"v0.0.2","repo":{"tag":"Remote","contents":"https://github.com/danieljharvey/purescript-cssom.git"}} {"packageName":"data-algebrae","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/i-am-tom/purescript-data-algebrae.git"}} {"packageName":"datetime","version":"v4.1.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-datetime.git"}} {"packageName":"debug","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/garyb/purescript-debug.git"}} -{"packageName":"decimals","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/sharkdp/purescript-decimals.git"}} +{"packageName":"decimals","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/sharkdp/purescript-decimals.git"}} {"packageName":"distributive","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-distributive.git"}} +{"packageName":"dom-filereader","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/nwolverson/purescript-dom-filereader.git"}} {"packageName":"dom-indexed","version":"v7.0.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-dom-indexed.git"}} -{"packageName":"dotenv","version":"v0.3.0","repo":{"tag":"Remote","contents":"https://github.com/nsaunders/purescript-dotenv.git"}} +{"packageName":"dotenv","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/nsaunders/purescript-dotenv.git"}} +{"packageName":"drawing","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-drawing.git"}} {"packageName":"effect","version":"v2.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-effect.git"}} {"packageName":"either","version":"v4.1.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-either.git"}} {"packageName":"email-validate","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/cdepillabout/purescript-email-validate.git"}} -{"packageName":"encoding","version":"v0.0.5","repo":{"tag":"Remote","contents":"https://github.com/menelaos/purescript-encoding.git"}} +{"packageName":"encoding","version":"v0.0.6","repo":{"tag":"Remote","contents":"https://github.com/menelaos/purescript-encoding.git"}} {"packageName":"enums","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-enums.git"}} {"packageName":"errors","version":"v4.1.0","repo":{"tag":"Remote","contents":"https://github.com/passy/purescript-errors.git"}} -{"packageName":"event","version":"v1.2.4","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-event.git"}} +{"packageName":"event","version":"v1.3.0","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-event.git"}} {"packageName":"exceptions","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-exceptions.git"}} {"packageName":"exists","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-exists.git"}} {"packageName":"exitcodes","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/Risto-Stevcev/purescript-exitcodes.git"}} {"packageName":"expect-inferred","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-expect-inferred.git"}} -{"packageName":"filterable","version":"v3.0.1","repo":{"tag":"Remote","contents":"https://github.com/LiamGoodacre/purescript-filterable.git"}} +{"packageName":"express","version":"v0.8.0","repo":{"tag":"Remote","contents":"https://github.com/nkly/purescript-express.git"}} +{"packageName":"filterable","version":"v3.0.2","repo":{"tag":"Remote","contents":"https://github.com/LiamGoodacre/purescript-filterable.git"}} {"packageName":"fixed-points","version":"v5.1.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-fixed-points.git"}} +{"packageName":"flare","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/sharkdp/purescript-flare.git"}} {"packageName":"float32","version":"v0.1.1","repo":{"tag":"Remote","contents":"https://github.com/athanclark/purescript-float32.git"}} +{"packageName":"flow-id","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/i-am-the-slime/purescript-flow-id.git"}} {"packageName":"foldable-traversable","version":"v4.1.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-foldable-traversable.git"}} {"packageName":"folds","version":"v5.2.0","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-folds.git"}} {"packageName":"foreign","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-foreign.git"}} {"packageName":"foreign-generic","version":"v10.0.0","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-foreign-generic.git"}} {"packageName":"foreign-object","version":"v2.0.3","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-foreign-object.git"}} {"packageName":"fork","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-fork.git"}} -{"packageName":"form-urlencoded","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-form-urlencoded.git"}} +{"packageName":"form-urlencoded","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-form-urlencoded.git"}} {"packageName":"format","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/sharkdp/purescript-format.git"}} {"packageName":"format-nix","version":"v0.3.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/format-nix.git"}} {"packageName":"formatters","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-formatters.git"}} {"packageName":"free","version":"v5.2.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-free.git"}} {"packageName":"freeap","version":"v5.0.1","repo":{"tag":"Remote","contents":"https://github.com/ethul/purescript-freeap.git"}} -{"packageName":"freedom","version":"v1.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-freedom/purescript-freedom.git"}} +{"packageName":"freedom","version":"v1.4.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-freedom/purescript-freedom.git"}} +{"packageName":"freedom-now","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-freedom/purescript-freedom-now.git"}} {"packageName":"freedom-portal","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-freedom/purescript-freedom-portal.git"}} -{"packageName":"freedom-router","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-freedom/purescript-freedom-router.git"}} +{"packageName":"freedom-router","version":"v1.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-freedom/purescript-freedom-router.git"}} {"packageName":"freedom-transition","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-freedom/purescript-freedom-transition.git"}} {"packageName":"freedom-virtualized","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-freedom/purescript-freedom-virtualized.git"}} {"packageName":"freedom-window-resize","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-freedom/purescript-freedom-window-resize.git"}} -{"packageName":"freet","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-freet.git"}} +{"packageName":"freet","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-freet.git"}} {"packageName":"functions","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-functions.git"}} {"packageName":"functors","version":"v3.1.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-functors.git"}} {"packageName":"fuzzy","version":"v0.2.1","repo":{"tag":"Remote","contents":"https://github.com/citizennet/purescript-fuzzy.git"}} {"packageName":"gen","version":"v2.1.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-gen.git"}} {"packageName":"generics-rep","version":"v6.1.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-generics-rep.git"}} -{"packageName":"globals","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-globals.git"}} +{"packageName":"globals","version":"v4.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-globals.git"}} {"packageName":"gomtang-basic","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-gomtang-basic.git"}} -{"packageName":"group","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/morganthomas/purescript-group.git"}} -{"packageName":"halogen","version":"v5.0.0-rc.4","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-halogen.git"}} +{"packageName":"group","version":"v4.1.1","repo":{"tag":"Remote","contents":"https://github.com/morganthomas/purescript-group.git"}} +{"packageName":"halogen","version":"v5.0.0-rc.7","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-halogen.git"}} {"packageName":"halogen-bootstrap","version":"v8.0.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-halogen-bootstrap.git"}} {"packageName":"halogen-bootstrap4","version":"v0.1.4","repo":{"tag":"Remote","contents":"https://github.com/mschristiansen/purescript-halogen-bootstrap4.git"}} {"packageName":"halogen-css","version":"v8.0.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-halogen-css.git"}} +{"packageName":"halogen-formless","version":"v1.0.0-rc.1","repo":{"tag":"Remote","contents":"https://github.com/thomashoneyman/purescript-halogen-formless.git"}} +{"packageName":"halogen-select","version":"v5.0.0-rc.3","repo":{"tag":"Remote","contents":"https://github.com/citizennet/purescript-halogen-select.git"}} {"packageName":"halogen-vdom","version":"v6.1.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-halogen-vdom.git"}} {"packageName":"heterogeneous","version":"v0.4.1","repo":{"tag":"Remote","contents":"https://github.com/natefaubion/purescript-heterogeneous.git"}} +{"packageName":"higher-order","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/matthew-hilty/purescript-higher-order.git"}} {"packageName":"http-methods","version":"v4.0.2","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-http-methods.git"}} -{"packageName":"httpure","version":"v0.8.3","repo":{"tag":"Remote","contents":"https://github.com/cprussin/purescript-httpure.git"}} +{"packageName":"httpure","version":"v0.9.0","repo":{"tag":"Remote","contents":"https://github.com/cprussin/purescript-httpure.git"}} +{"packageName":"httpure-contrib-biscotti","version":"v0.1.1","repo":{"tag":"Remote","contents":"https://github.com/drewolson/purescript-httpure-contrib-biscotti.git"}} +{"packageName":"hyper","version":"v0.11.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-hyper/hyper.git"}} +{"packageName":"hypertrout","version":"v0.11.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-hyper/purescript-hypertrout.git"}} {"packageName":"identity","version":"v4.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-identity.git"}} -{"packageName":"identy","version":"v2.0.2","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-identy.git"}} -{"packageName":"indexed-monad","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/garyb/purescript-indexed-monad.git"}} +{"packageName":"identy","version":"v2.1.0","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-identy.git"}} +{"packageName":"indexed-monad","version":"v1.1.0","repo":{"tag":"Remote","contents":"https://github.com/garyb/purescript-indexed-monad.git"}} {"packageName":"integers","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-integers.git"}} {"packageName":"invariant","version":"v4.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-invariant.git"}} {"packageName":"jajanmen","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-jajanmen.git"}} +{"packageName":"jquery","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-jquery.git"}} {"packageName":"js-date","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-js-date.git"}} {"packageName":"js-timers","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-js-timers.git"}} +{"packageName":"json-pointer","version":"v0.1.0","repo":{"tag":"Remote","contents":"https://github.com/reactormonk/purescript-json-pointer.git"}} {"packageName":"json-schema","version":"v0.0.1","repo":{"tag":"Remote","contents":"https://github.com/felixmulder/purescript-json-schema.git"}} +{"packageName":"jwt","version":"v0.0.7","repo":{"tag":"Remote","contents":"https://github.com/menelaos/purescript-jwt.git"}} {"packageName":"kancho","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-kancho.git"}} {"packageName":"kishimen","version":"v1.0.1","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-kishimen.git"}} {"packageName":"lazy","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-lazy.git"}} @@ -128,41 +147,44 @@ {"packageName":"maybe","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-maybe.git"}} {"packageName":"media-types","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-media-types.git"}} {"packageName":"memoize","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-memoize.git"}} -{"packageName":"milkis","version":"v7.0.1","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-milkis.git"}} +{"packageName":"milkis","version":"v7.2.1","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-milkis.git"}} {"packageName":"minibench","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-minibench.git"}} {"packageName":"mmorph","version":"v5.1.0","repo":{"tag":"Remote","contents":"https://github.com/Thimoteus/purescript-mmorph.git"}} -{"packageName":"monad-logger","version":"v1.2.0","repo":{"tag":"Remote","contents":"https://github.com/cprussin/purescript-monad-logger.git"}} +{"packageName":"monad-logger","version":"v1.3.1","repo":{"tag":"Remote","contents":"https://github.com/cprussin/purescript-monad-logger.git"}} +{"packageName":"monad-loops","version":"v0.5.0","repo":{"tag":"Remote","contents":"https://github.com/mlang/purescript-monad-loops.git"}} +{"packageName":"money","version":"v8.0.0","repo":{"tag":"Remote","contents":"https://github.com/i-am-tom/purescript-money.git"}} {"packageName":"motsunabe","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-motsunabe.git"}} -{"packageName":"mysql","version":"v3.0.1","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-mysql.git"}} +{"packageName":"mysql","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-mysql.git"}} {"packageName":"naporitan","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-naporitan.git"}} +{"packageName":"naturals","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/LiamGoodacre/purescript-naturals.git"}} {"packageName":"newtype","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-newtype.git"}} -{"packageName":"node-buffer","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-buffer.git"}} +{"packageName":"node-buffer","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-buffer.git"}} {"packageName":"node-child-process","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-child-process.git"}} {"packageName":"node-electron","version":"v0.0.2","repo":{"tag":"Remote","contents":"https://github.com/cprussin/purescript-node-electron.git"}} -{"packageName":"node-fs","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-fs.git"}} +{"packageName":"node-fs","version":"v5.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-fs.git"}} {"packageName":"node-fs-aff","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-fs-aff.git"}} {"packageName":"node-he","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-node-he.git"}} -{"packageName":"node-http","version":"v5.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-http.git"}} +{"packageName":"node-http","version":"v5.0.2","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-http.git"}} {"packageName":"node-net","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-net.git"}} {"packageName":"node-path","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-path.git"}} {"packageName":"node-postgres","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/epost/purescript-node-postgres.git"}} {"packageName":"node-process","version":"v7.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-process.git"}} {"packageName":"node-readline","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-readline.git"}} {"packageName":"node-sqlite3","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-node-sqlite3.git"}} -{"packageName":"node-streams","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-streams.git"}} +{"packageName":"node-streams","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-streams.git"}} {"packageName":"node-telegram-bot-api","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-node-telegram-bot-api.git"}} {"packageName":"node-url","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-node-url.git"}} {"packageName":"nodemailer","version":"v2.0.2","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-nodemailer.git"}} {"packageName":"nonempty","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-nonempty.git"}} {"packageName":"now","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-now.git"}} {"packageName":"nullable","version":"v4.1.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-nullable.git"}} -{"packageName":"numbers","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/sharkdp/purescript-numbers.git"}} +{"packageName":"numbers","version":"v7.0.0","repo":{"tag":"Remote","contents":"https://github.com/sharkdp/purescript-numbers.git"}} {"packageName":"options","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-options.git"}} {"packageName":"optparse","version":"v3.0.1","repo":{"tag":"Remote","contents":"https://github.com/f-o-a-m/purescript-optparse.git"}} {"packageName":"ordered-collections","version":"v1.6.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-ordered-collections.git"}} {"packageName":"orders","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-orders.git"}} {"packageName":"pairing","version":"v5.1.0","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-pairing.git"}} -{"packageName":"pairs","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/sharkdp/purescript-pairs.git"}} +{"packageName":"pairs","version":"v7.0.0","repo":{"tag":"Remote","contents":"https://github.com/sharkdp/purescript-pairs.git"}} {"packageName":"parallel","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-parallel.git"}} {"packageName":"parsing","version":"v5.0.3","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-parsing.git"}} {"packageName":"partial","version":"v2.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-partial.git"}} @@ -172,98 +194,119 @@ {"packageName":"pointed-list","version":"v0.4.0","repo":{"tag":"Remote","contents":"https://github.com/paluh/purescript-pointed-list.git"}} {"packageName":"polyform","version":"v0.8.0","repo":{"tag":"Remote","contents":"https://github.com/paluh/purescript-polyform.git"}} {"packageName":"posix-types","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-node/purescript-posix-types.git"}} +{"packageName":"precise-datetime","version":"v5.1.1","repo":{"tag":"Remote","contents":"https://github.com/awakesecurity/purescript-precise-datetime.git"}} {"packageName":"prelude","version":"v4.1.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-prelude.git"}} {"packageName":"prettier","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/gcanti/purescript-prettier.git"}} -{"packageName":"profunctor","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-profunctor.git"}} +{"packageName":"profunctor","version":"v4.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-profunctor.git"}} {"packageName":"profunctor-lenses","version":"v6.2.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-profunctor-lenses.git"}} {"packageName":"promises","version":"v3.1.1","repo":{"tag":"Remote","contents":"https://github.com/thimoteus/purescript-promises.git"}} {"packageName":"proxy","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-proxy.git"}} +{"packageName":"proxying","version":"v1.1.0","repo":{"tag":"Remote","contents":"https://github.com/matthew-hilty/purescript-proxying.git"}} {"packageName":"psa-utils","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/natefaubion/purescript-psa-utils.git"}} {"packageName":"psc-ide","version":"v15.0.1","repo":{"tag":"Remote","contents":"https://github.com/kRITZCREEK/purescript-psc-ide.git"}} {"packageName":"psci-support","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-psci-support.git"}} +{"packageName":"querydsl","version":"v0.10.1","repo":{"tag":"Remote","contents":"https://github.com/Dretch/purescript-querydsl.git"}} {"packageName":"quickcheck","version":"v6.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-quickcheck.git"}} {"packageName":"quickcheck-laws","version":"v5.0.1","repo":{"tag":"Remote","contents":"https://github.com/garyb/purescript-quickcheck-laws.git"}} {"packageName":"quotient","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/rightfold/purescript-quotient.git"}} +{"packageName":"radox","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/danieljharvey/purescript-radox.git"}} {"packageName":"random","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-random.git"}} {"packageName":"rationals","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/anttih/purescript-rationals.git"}} {"packageName":"rave","version":"v0.1.1","repo":{"tag":"Remote","contents":"https://github.com/reactormonk/purescript-rave.git"}} -{"packageName":"react","version":"v7.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-react.git"}} -{"packageName":"react-basic","version":"v9.0.1","repo":{"tag":"Remote","contents":"https://github.com/lumihq/purescript-react-basic.git"}} -{"packageName":"react-basic-hooks","version":"v0.7.1","repo":{"tag":"Remote","contents":"https://github.com/spicydonuts/purescript-react-basic-hooks.git"}} +{"packageName":"react","version":"v8.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-react.git"}} +{"packageName":"react-basic","version":"v11.0.0","repo":{"tag":"Remote","contents":"https://github.com/lumihq/purescript-react-basic.git"}} +{"packageName":"react-basic-hooks","version":"v2.0.3","repo":{"tag":"Remote","contents":"https://github.com/spicydonuts/purescript-react-basic-hooks.git"}} {"packageName":"react-basic-native","version":"v0.1.3","repo":{"tag":"Remote","contents":"https://github.com/dwhitney/purescript-react-basic-native.git"}} {"packageName":"react-dom","version":"v6.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-react-dom.git"}} +{"packageName":"react-radox","version":"v0.0.5","repo":{"tag":"Remote","contents":"https://github.com/danieljharvey/purescript-react-radox.git"}} +{"packageName":"react-stylesheet","version":"v0.0.2","repo":{"tag":"Remote","contents":"https://github.com/danieljharvey/purescript-react-stylesheet.git"}} {"packageName":"read","version":"v1.0.1","repo":{"tag":"Remote","contents":"https://github.com/truqu/purescript-read.git"}} {"packageName":"record","version":"v2.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-record.git"}} -{"packageName":"record-extra","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-record-extra.git"}} +{"packageName":"record-extra","version":"v3.0.1","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-record-extra.git"}} {"packageName":"record-format","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/kcsongor/purescript-record-format.git"}} {"packageName":"redux-devtools","version":"v0.1.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-redux-devtools.git"}} -{"packageName":"refined","version":"v0.1.2","repo":{"tag":"Remote","contents":"https://github.com/danieljharvey/purescript-refined.git"}} +{"packageName":"refined","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/danieljharvey/purescript-refined.git"}} {"packageName":"refs","version":"v4.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-refs.git"}} {"packageName":"remotedata","version":"v4.2.0","repo":{"tag":"Remote","contents":"https://github.com/krisajenkins/purescript-remotedata.git"}} {"packageName":"result","version":"v1.0.3","repo":{"tag":"Remote","contents":"https://github.com/ad-si/purescript-result.git"}} +{"packageName":"ring-modules","version":"v5.0.1","repo":{"tag":"Remote","contents":"https://github.com/f-o-a-m/purescript-ring-modules.git"}} {"packageName":"routing","version":"v9.0.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-routing.git"}} -{"packageName":"routing-duplex","version":"v0.3.0","repo":{"tag":"Remote","contents":"https://github.com/natefaubion/purescript-routing-duplex.git"}} +{"packageName":"routing-duplex","version":"v0.4.0","repo":{"tag":"Remote","contents":"https://github.com/natefaubion/purescript-routing-duplex.git"}} {"packageName":"run","version":"v3.0.1","repo":{"tag":"Remote","contents":"https://github.com/natefaubion/purescript-run.git"}} +{"packageName":"run-profunctor-lenses","version":"v0.1.0","repo":{"tag":"Remote","contents":"https://github.com/sigilion/purescript-run-profunctor-lenses.git"}} {"packageName":"run-streaming","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/natefaubion/purescript-run-streaming.git"}} -{"packageName":"safely","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-safely.git"}} +{"packageName":"safely","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-safely.git"}} +{"packageName":"search-trie","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/klntsky/purescript-search-trie.git"}} +{"packageName":"selection-foldable","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/jamieyung/purescript-selection-foldable.git"}} {"packageName":"semirings","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-semirings.git"}} {"packageName":"server-sent-events","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/MichaelXavier/purescript-server-sent-events.git"}} {"packageName":"shoronpo","version":"v0.3.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-shoronpo.git"}} {"packageName":"signal","version":"v10.1.0","repo":{"tag":"Remote","contents":"https://github.com/bodil/purescript-signal.git"}} {"packageName":"sijidou","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-sijidou.git"}} {"packageName":"simple-emitter","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-simple-emitter.git"}} +{"packageName":"simple-i18n","version":"v0.1.0","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-simple-i18n.git"}} {"packageName":"simple-json","version":"v7.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-simple-json.git"}} {"packageName":"simple-json-generics","version":"v0.1.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-simple-json-generics.git"}} {"packageName":"simple-json-utils","version":"v0.1.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-simple-json-utils.git"}} -{"packageName":"simple-jwt","version":"v1.0.2","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-simple-jwt.git"}} -{"packageName":"sized-vectors","version":"v3.1.0","repo":{"tag":"Remote","contents":"https://github.com/bodil/purescript-sized-vectors.git"}} -{"packageName":"smolder","version":"v12.0.0","repo":{"tag":"Remote","contents":"https://github.com/bodil/purescript-smolder.git"}} +{"packageName":"simple-jwt","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/oreshinya/purescript-simple-jwt.git"}} +{"packageName":"simple-timestamp","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/reactormonk/purescript-simple-timestamp.git"}} +{"packageName":"sized-vectors","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/bodil/purescript-sized-vectors.git"}} +{"packageName":"slug","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/thomashoneyman/purescript-slug.git"}} +{"packageName":"smolder","version":"v12.3.0","repo":{"tag":"Remote","contents":"https://github.com/bodil/purescript-smolder.git"}} {"packageName":"snabbdom","version":"v1.0.1","repo":{"tag":"Remote","contents":"https://github.com/LukaJCB/purescript-snabbdom.git"}} {"packageName":"sodium","version":"v2.1.0","repo":{"tag":"Remote","contents":"https://github.com/SodiumFRP/purescript-sodium.git"}} -{"packageName":"spec","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-spec/purescript-spec.git"}} +{"packageName":"spec","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-spec/purescript-spec.git"}} {"packageName":"spec-discovery","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/owickstrom/purescript-spec-discovery.git"}} {"packageName":"spec-quickcheck","version":"v3.1.0","repo":{"tag":"Remote","contents":"https://github.com/owickstrom/purescript-spec-quickcheck.git"}} -{"packageName":"spork","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/natefaubion/purescript-spork"}} +{"packageName":"spork","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/natefaubion/purescript-spork.git"}} {"packageName":"st","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-st.git"}} -{"packageName":"string-parsers","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-string-parsers.git"}} +{"packageName":"string-parsers","version":"v5.0.1","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-string-parsers.git"}} {"packageName":"strings","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-strings.git"}} -{"packageName":"stringutils","version":"v0.0.9","repo":{"tag":"Remote","contents":"https://github.com/menelaos/purescript-stringutils.git"}} +{"packageName":"strings-extra","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-strings-extra.git"}} +{"packageName":"stringutils","version":"v0.0.10","repo":{"tag":"Remote","contents":"https://github.com/menelaos/purescript-stringutils.git"}} {"packageName":"strongcheck","version":"v4.1.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-strongcheck.git"}} +{"packageName":"struct","version":"v1.1.0","repo":{"tag":"Remote","contents":"https://github.com/matthew-hilty/purescript-struct.git"}} +{"packageName":"stylesheet","version":"v0.0.3","repo":{"tag":"Remote","contents":"https://github.com/danieljharvey/purescript-stylesheet.git"}} +{"packageName":"subcategory","version":"v0.2.0","repo":{"tag":"Remote","contents":"https://github.com/matthew-hilty/purescript-subcategory.git"}} {"packageName":"suggest","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/nwolverson/purescript-suggest.git"}} {"packageName":"sunde","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-sunde.git"}} {"packageName":"svg-parser","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/rnons/purescript-svg-parser.git"}} {"packageName":"svg-parser-halogen","version":"v1.0.0","repo":{"tag":"Remote","contents":"https://github.com/rnons/purescript-svg-parser-halogen.git"}} -{"packageName":"tailrec","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-tailrec.git"}} +{"packageName":"tailrec","version":"v4.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-tailrec.git"}} {"packageName":"test-unit","version":"v15.0.0","repo":{"tag":"Remote","contents":"https://github.com/bodil/purescript-test-unit.git"}} -{"packageName":"text-encoding","version":"v0.0.9","repo":{"tag":"Remote","contents":"https://github.com/AlexaDeWit/purescript-text-encoding.git"}} {"packageName":"these","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-these.git"}} -{"packageName":"toppokki","version":"v1.1.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-toppokki.git"}} +{"packageName":"tolerant-argonaut","version":"v1.1.0","repo":{"tag":"Remote","contents":"https://github.com/matthew-hilty/purescript-tolerant-argonaut.git"}} +{"packageName":"toppokki","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-toppokki.git"}} {"packageName":"tortellini","version":"v5.1.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-tortellini.git"}} {"packageName":"transformers","version":"v4.2.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-transformers.git"}} +{"packageName":"trout","version":"v0.12.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-hyper/purescript-trout.git"}} {"packageName":"tuples","version":"v5.1.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-tuples.git"}} {"packageName":"type-equality","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-type-equality.git"}} {"packageName":"type-isequal","version":"v0.1.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-type-isequal.git"}} -{"packageName":"typelevel","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/bodil/purescript-typelevel.git"}} +{"packageName":"typedenv","version":"v0.0.1","repo":{"tag":"Remote","contents":"https://github.com/nsaunders/purescript-typedenv.git"}} +{"packageName":"typelevel","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/bodil/purescript-typelevel.git"}} {"packageName":"typelevel-prelude","version":"v5.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-typelevel-prelude.git"}} {"packageName":"uint","version":"v5.1.1","repo":{"tag":"Remote","contents":"https://github.com/zaquest/purescript-uint.git"}} {"packageName":"undefinable","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/ethul/purescript-undefinable.git"}} +{"packageName":"undefined","version":"v1.0.2","repo":{"tag":"Remote","contents":"https://github.com/bklaric/purescript-undefined.git"}} {"packageName":"unfoldable","version":"v4.0.2","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-unfoldable.git"}} {"packageName":"unicode","version":"v4.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-unicode.git"}} {"packageName":"unordered-collections","version":"v1.8.2","repo":{"tag":"Remote","contents":"https://github.com/fehrenbach/purescript-unordered-collections.git"}} {"packageName":"unsafe-coerce","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-unsafe-coerce.git"}} -{"packageName":"unsafe-reference","version":"v3.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-unsafe-reference"}} +{"packageName":"unsafe-reference","version":"v3.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-contrib/purescript-unsafe-reference.git"}} {"packageName":"uri","version":"v7.0.0","repo":{"tag":"Remote","contents":"https://github.com/slamdata/purescript-uri.git"}} +{"packageName":"uuid","version":"v6.0.0","repo":{"tag":"Remote","contents":"https://github.com/spicydonuts/purescript-uuid.git"}} {"packageName":"validation","version":"v4.2.0","repo":{"tag":"Remote","contents":"https://github.com/purescript/purescript-validation.git"}} {"packageName":"variant","version":"v6.0.1","repo":{"tag":"Remote","contents":"https://github.com/natefaubion/purescript-variant.git"}} {"packageName":"web-clipboard","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-clipboard.git"}} -{"packageName":"web-dom","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-dom.git"}} +{"packageName":"web-dom","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-dom.git"}} {"packageName":"web-events","version":"v2.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-events.git"}} -{"packageName":"web-file","version":"v2.1.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-file.git"}} -{"packageName":"web-html","version":"v2.2.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-html.git"}} +{"packageName":"web-file","version":"v2.2.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-file.git"}} +{"packageName":"web-html","version":"v2.3.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-html.git"}} {"packageName":"web-socket","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-socket.git"}} {"packageName":"web-storage","version":"v3.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-storage.git"}} {"packageName":"web-touchevents","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-touchevents.git"}} {"packageName":"web-uievents","version":"v2.0.0","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-uievents.git"}} -{"packageName":"web-xhr","version":"v3.0.1","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-xhr.git"}} +{"packageName":"web-xhr","version":"v3.0.2","repo":{"tag":"Remote","contents":"https://github.com/purescript-web/purescript-web-xhr.git"}} {"packageName":"xiaomian","version":"v0.1.0","repo":{"tag":"Remote","contents":"https://github.com/justinwoo/purescript-xiaomian.git"}} {"packageName":"yargs","version":"v4.0.0","repo":{"tag":"Remote","contents":"https://github.com/paf31/purescript-yargs.git"}} diff --git a/test/fixtures/list-packages.txt b/test/fixtures/list-packages.txt index dcdffd7f4..c2e04a530 100644 --- a/test/fixtures/list-packages.txt +++ b/test/fixtures/list-packages.txt @@ -1,119 +1,138 @@ -aff v5.1.1 Remote "https://github.com/slamdata/purescript-aff.git" +aff v5.1.2 Remote "https://github.com/slamdata/purescript-aff.git" aff-bus v4.0.0 Remote "https://github.com/slamdata/purescript-aff-bus.git" aff-coroutines v7.0.0 Remote "https://github.com/purescript-contrib/purescript-aff-coroutines.git" aff-promise v2.1.0 Remote "https://github.com/nwolverson/purescript-aff-promise.git" -affjax v9.0.0 Remote "https://github.com/slamdata/purescript-affjax.git" +aff-retry v1.2.1 Remote "https://github.com/Unisay/purescript-aff-retry.git" ansi v5.0.0 Remote "https://github.com/hdgarrood/purescript-ansi.git" argonaut v6.0.0 Remote "https://github.com/purescript-contrib/purescript-argonaut.git" argonaut-codecs v6.0.2 Remote "https://github.com/purescript-contrib/purescript-argonaut-codecs.git" -argonaut-core v5.0.0 Remote "https://github.com/purescript-contrib/purescript-argonaut-core.git" +argonaut-core v5.0.1 Remote "https://github.com/purescript-contrib/purescript-argonaut-core.git" argonaut-generic v5.0.0 Remote "https://github.com/purescript-contrib/purescript-argonaut-generic.git" argonaut-traversals v7.0.0 Remote "https://github.com/purescript-contrib/purescript-argonaut-traversals.git" array-views v0.0.2 Remote "https://github.com/klntsky/purescript-array-views.git" -arraybuffer v10.0.0 Remote "https://github.com/jacereda/purescript-arraybuffer.git" +arraybuffer v10.0.1 Remote "https://github.com/jacereda/purescript-arraybuffer.git" arraybuffer-types v2.0.0 Remote "https://github.com/purescript-contrib/purescript-arraybuffer-types.git" -arrays v5.3.0 Remote "https://github.com/purescript/purescript-arrays.git" +arrays v5.3.1 Remote "https://github.com/purescript/purescript-arrays.git" assert v4.1.0 Remote "https://github.com/purescript/purescript-assert.git" avar v3.0.0 Remote "https://github.com/slamdata/purescript-avar.git" -b64 v0.0.5 Remote "https://github.com/menelaos/purescript-b64.git" -basic-auth v1.0.1 Remote "https://github.com/oreshinya/purescript-basic-auth.git" -behaviors v7.0.0 Remote "https://github.com/paf31/purescript-behaviors.git" +b64 v0.0.6 Remote "https://github.com/menelaos/purescript-b64.git" +basic-auth v1.0.3 Remote "https://github.com/oreshinya/purescript-basic-auth.git" +behaviors v8.0.0 Remote "https://github.com/paf31/purescript-behaviors.git" bifunctors v4.0.0 Remote "https://github.com/purescript/purescript-bifunctors.git" bigints v4.0.0 Remote "https://github.com/sharkdp/purescript-bigints.git" +biscotti-cookie v0.2.0 Remote "https://github.com/drewolson/purescript-biscotti-cookie.git" +biscotti-session v0.1.1 Remote "https://github.com/drewolson/purescript-biscotti-session.git" +bower-json v1.0.0 Remote "https://github.com/klntsky/purescript-bower-json.git" bucketchain v0.3.0 Remote "https://github.com/Bucketchain/purescript-bucketchain.git" bucketchain-basic-auth v0.2.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-basic-auth.git" bucketchain-conditional v0.2.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-conditional.git" bucketchain-cors v0.2.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-cors.git" bucketchain-csrf v0.1.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-csrf.git" -bucketchain-header-utils v0.1.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-header-utils.git" +bucketchain-header-utils v0.2.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-header-utils.git" bucketchain-health v0.2.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-health.git" -bucketchain-history-api-fallback v0.2.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-history-api-fallback.git" +bucketchain-history-api-fallback v0.3.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-history-api-fallback.git" bucketchain-logger v0.3.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-logger.git" bucketchain-secure v0.1.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-secure.git" -bucketchain-simple-api v0.4.2 Remote "https://github.com/Bucketchain/purescript-bucketchain-simple-api.git" +bucketchain-simple-api v3.0.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-simple-api.git" bucketchain-sslify v0.2.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-sslify.git" bucketchain-static v0.3.0 Remote "https://github.com/Bucketchain/purescript-bucketchain-static.git" -bytestrings v7.0.0 Remote "https://github.com/rightfold/purescript-bytestrings.git" +bytestrings v8.0.0 Remote "https://github.com/rightfold/purescript-bytestrings.git" canvas v4.0.0 Remote "https://github.com/purescript-web/purescript-canvas.git" catenable-lists v5.0.1 Remote "https://github.com/purescript/purescript-catenable-lists.git" -checked-exceptions v3.0.0 Remote "https://github.com/natefaubion/purescript-checked-exceptions.git" +checked-exceptions v3.1.0 Remote "https://github.com/natefaubion/purescript-checked-exceptions.git" cheerio v0.2.0 Remote "https://github.com/icyrockcom/purescript-cheerio.git" chirashi v1.0.0 Remote "https://github.com/justinwoo/purescript-chirashi.git" choco-pie v5.0.0 Remote "https://github.com/justinwoo/purescript-chocopie.git" colors v5.0.0 Remote "https://github.com/sharkdp/purescript-colors.git" -concur-react v0.3.7 Remote "https://github.com/ajnsit/purescript-concur.git" +concur-react v0.3.9 Remote "https://github.com/ajnsit/purescript-concur.git" console v4.2.0 Remote "https://github.com/purescript/purescript-console.git" const v4.1.0 Remote "https://github.com/purescript/purescript-const.git" contravariant v4.0.1 Remote "https://github.com/purescript/purescript-contravariant.git" control v4.1.0 Remote "https://github.com/purescript/purescript-control.git" -coroutines v5.0.0 Remote "https://github.com/purescript-contrib/purescript-coroutines.git" -crypto v2.0.0 Remote "https://github.com/oreshinya/purescript-crypto.git" +coroutines v5.0.1 Remote "https://github.com/purescript-contrib/purescript-coroutines.git" +crypto v2.0.1 Remote "https://github.com/oreshinya/purescript-crypto.git" css v4.0.0 Remote "https://github.com/slamdata/purescript-css.git" +cssom v0.0.2 Remote "https://github.com/danieljharvey/purescript-cssom.git" data-algebrae v4.0.0 Remote "https://github.com/i-am-tom/purescript-data-algebrae.git" datetime v4.1.1 Remote "https://github.com/purescript/purescript-datetime.git" debug v4.0.0 Remote "https://github.com/garyb/purescript-debug.git" -decimals v4.0.0 Remote "https://github.com/sharkdp/purescript-decimals.git" +decimals v5.0.0 Remote "https://github.com/sharkdp/purescript-decimals.git" distributive v4.0.0 Remote "https://github.com/purescript/purescript-distributive.git" +dom-filereader v5.0.0 Remote "https://github.com/nwolverson/purescript-dom-filereader.git" dom-indexed v7.0.0 Remote "https://github.com/slamdata/purescript-dom-indexed.git" -dotenv v0.3.0 Remote "https://github.com/nsaunders/purescript-dotenv.git" +dotenv v1.0.0 Remote "https://github.com/nsaunders/purescript-dotenv.git" +drawing v4.0.0 Remote "https://github.com/paf31/purescript-drawing.git" effect v2.0.1 Remote "https://github.com/purescript/purescript-effect.git" either v4.1.1 Remote "https://github.com/purescript/purescript-either.git" email-validate v5.0.0 Remote "https://github.com/cdepillabout/purescript-email-validate.git" -encoding v0.0.5 Remote "https://github.com/menelaos/purescript-encoding.git" +encoding v0.0.6 Remote "https://github.com/menelaos/purescript-encoding.git" enums v4.0.1 Remote "https://github.com/purescript/purescript-enums.git" errors v4.1.0 Remote "https://github.com/passy/purescript-errors.git" -event v1.2.4 Remote "https://github.com/paf31/purescript-event.git" +event v1.3.0 Remote "https://github.com/paf31/purescript-event.git" exceptions v4.0.0 Remote "https://github.com/purescript/purescript-exceptions.git" exists v4.0.0 Remote "https://github.com/purescript/purescript-exists.git" exitcodes v4.0.0 Remote "https://github.com/Risto-Stevcev/purescript-exitcodes.git" expect-inferred v2.0.0 Remote "https://github.com/justinwoo/purescript-expect-inferred.git" -filterable v3.0.1 Remote "https://github.com/LiamGoodacre/purescript-filterable.git" +express v0.8.0 Remote "https://github.com/nkly/purescript-express.git" +filterable v3.0.2 Remote "https://github.com/LiamGoodacre/purescript-filterable.git" fixed-points v5.1.0 Remote "https://github.com/slamdata/purescript-fixed-points.git" +flare v6.0.0 Remote "https://github.com/sharkdp/purescript-flare.git" float32 v0.1.1 Remote "https://github.com/athanclark/purescript-float32.git" +flow-id v1.0.0 Remote "https://github.com/i-am-the-slime/purescript-flow-id.git" foldable-traversable v4.1.1 Remote "https://github.com/purescript/purescript-foldable-traversable.git" folds v5.2.0 Remote "https://github.com/paf31/purescript-folds.git" foreign v5.0.0 Remote "https://github.com/purescript/purescript-foreign.git" foreign-generic v10.0.0 Remote "https://github.com/paf31/purescript-foreign-generic.git" foreign-object v2.0.3 Remote "https://github.com/purescript/purescript-foreign-object.git" fork v4.0.0 Remote "https://github.com/slamdata/purescript-fork.git" -form-urlencoded v4.0.1 Remote "https://github.com/purescript-contrib/purescript-form-urlencoded.git" +form-urlencoded v5.0.0 Remote "https://github.com/purescript-contrib/purescript-form-urlencoded.git" format v4.0.0 Remote "https://github.com/sharkdp/purescript-format.git" format-nix v0.3.0 Remote "https://github.com/justinwoo/format-nix.git" formatters v4.0.1 Remote "https://github.com/slamdata/purescript-formatters.git" free v5.2.0 Remote "https://github.com/purescript/purescript-free.git" freeap v5.0.1 Remote "https://github.com/ethul/purescript-freeap.git" -freedom v1.1.0 Remote "https://github.com/purescript-freedom/purescript-freedom.git" +freedom v1.4.0 Remote "https://github.com/purescript-freedom/purescript-freedom.git" +freedom-now v2.0.0 Remote "https://github.com/purescript-freedom/purescript-freedom-now.git" freedom-portal v1.0.0 Remote "https://github.com/purescript-freedom/purescript-freedom-portal.git" -freedom-router v1.0.0 Remote "https://github.com/purescript-freedom/purescript-freedom-router.git" +freedom-router v1.0.1 Remote "https://github.com/purescript-freedom/purescript-freedom-router.git" freedom-transition v1.0.0 Remote "https://github.com/purescript-freedom/purescript-freedom-transition.git" freedom-virtualized v1.0.0 Remote "https://github.com/purescript-freedom/purescript-freedom-virtualized.git" freedom-window-resize v1.0.0 Remote "https://github.com/purescript-freedom/purescript-freedom-window-resize.git" -freet v4.0.0 Remote "https://github.com/purescript-contrib/purescript-freet.git" +freet v5.0.0 Remote "https://github.com/purescript-contrib/purescript-freet.git" functions v4.0.0 Remote "https://github.com/purescript/purescript-functions.git" functors v3.1.1 Remote "https://github.com/purescript/purescript-functors.git" fuzzy v0.2.1 Remote "https://github.com/citizennet/purescript-fuzzy.git" gen v2.1.1 Remote "https://github.com/purescript/purescript-gen.git" generics-rep v6.1.1 Remote "https://github.com/purescript/purescript-generics-rep.git" -globals v4.0.0 Remote "https://github.com/purescript/purescript-globals.git" +globals v4.1.0 Remote "https://github.com/purescript/purescript-globals.git" gomtang-basic v0.2.0 Remote "https://github.com/justinwoo/purescript-gomtang-basic.git" -group v4.0.0 Remote "https://github.com/morganthomas/purescript-group.git" -halogen v5.0.0-rc.4 Remote "https://github.com/slamdata/purescript-halogen.git" +group v4.1.1 Remote "https://github.com/morganthomas/purescript-group.git" +halogen v5.0.0-rc.7 Remote "https://github.com/slamdata/purescript-halogen.git" halogen-bootstrap v8.0.0 Remote "https://github.com/slamdata/purescript-halogen-bootstrap.git" halogen-bootstrap4 v0.1.4 Remote "https://github.com/mschristiansen/purescript-halogen-bootstrap4.git" halogen-css v8.0.0 Remote "https://github.com/slamdata/purescript-halogen-css.git" +halogen-formless v1.0.0-rc.1 Remote "https://github.com/thomashoneyman/purescript-halogen-formless.git" +halogen-select v5.0.0-rc.3 Remote "https://github.com/citizennet/purescript-halogen-select.git" halogen-vdom v6.1.0 Remote "https://github.com/slamdata/purescript-halogen-vdom.git" heterogeneous v0.4.1 Remote "https://github.com/natefaubion/purescript-heterogeneous.git" +higher-order v0.2.0 Remote "https://github.com/matthew-hilty/purescript-higher-order.git" http-methods v4.0.2 Remote "https://github.com/purescript-contrib/purescript-http-methods.git" -httpure v0.8.3 Remote "https://github.com/cprussin/purescript-httpure.git" +httpure v0.9.0 Remote "https://github.com/cprussin/purescript-httpure.git" +httpure-contrib-biscotti v0.1.1 Remote "https://github.com/drewolson/purescript-httpure-contrib-biscotti.git" +hyper v0.11.0 Remote "https://github.com/purescript-hyper/hyper.git" +hypertrout v0.11.0 Remote "https://github.com/purescript-hyper/purescript-hypertrout.git" identity v4.1.0 Remote "https://github.com/purescript/purescript-identity.git" -identy v2.0.2 Remote "https://github.com/oreshinya/purescript-identy.git" -indexed-monad v1.0.0 Remote "https://github.com/garyb/purescript-indexed-monad.git" +identy v2.1.0 Remote "https://github.com/oreshinya/purescript-identy.git" +indexed-monad v1.1.0 Remote "https://github.com/garyb/purescript-indexed-monad.git" integers v4.0.0 Remote "https://github.com/purescript/purescript-integers.git" invariant v4.1.0 Remote "https://github.com/purescript/purescript-invariant.git" jajanmen v1.0.0 Remote "https://github.com/justinwoo/purescript-jajanmen.git" +jquery v5.0.0 Remote "https://github.com/purescript-contrib/purescript-jquery.git" js-date v6.0.0 Remote "https://github.com/purescript-contrib/purescript-js-date.git" js-timers v4.0.1 Remote "https://github.com/purescript-contrib/purescript-js-timers.git" +json-pointer v0.1.0 Remote "https://github.com/reactormonk/purescript-json-pointer.git" json-schema v0.0.1 Remote "https://github.com/felixmulder/purescript-json-schema.git" +jwt v0.0.7 Remote "https://github.com/menelaos/purescript-jwt.git" kancho v2.0.0 Remote "https://github.com/justinwoo/purescript-kancho.git" kishimen v1.0.1 Remote "https://github.com/justinwoo/purescript-kishimen.git" lazy v4.0.0 Remote "https://github.com/purescript/purescript-lazy.git" @@ -128,41 +147,44 @@ matrices v4.0.0 Remote "https://github.com/kritzc maybe v4.0.1 Remote "https://github.com/purescript/purescript-maybe.git" media-types v4.0.1 Remote "https://github.com/purescript-contrib/purescript-media-types.git" memoize v5.0.0 Remote "https://github.com/paf31/purescript-memoize.git" -milkis v7.0.1 Remote "https://github.com/justinwoo/purescript-milkis.git" +milkis v7.2.1 Remote "https://github.com/justinwoo/purescript-milkis.git" minibench v2.0.0 Remote "https://github.com/purescript/purescript-minibench.git" mmorph v5.1.0 Remote "https://github.com/Thimoteus/purescript-mmorph.git" -monad-logger v1.2.0 Remote "https://github.com/cprussin/purescript-monad-logger.git" +monad-logger v1.3.1 Remote "https://github.com/cprussin/purescript-monad-logger.git" +monad-loops v0.5.0 Remote "https://github.com/mlang/purescript-monad-loops.git" +money v8.0.0 Remote "https://github.com/i-am-tom/purescript-money.git" motsunabe v2.0.0 Remote "https://github.com/justinwoo/purescript-motsunabe.git" -mysql v3.0.1 Remote "https://github.com/oreshinya/purescript-mysql.git" +mysql v4.0.0 Remote "https://github.com/oreshinya/purescript-mysql.git" naporitan v1.0.0 Remote "https://github.com/justinwoo/purescript-naporitan.git" +naturals v3.0.0 Remote "https://github.com/LiamGoodacre/purescript-naturals.git" newtype v3.0.0 Remote "https://github.com/purescript/purescript-newtype.git" -node-buffer v5.0.0 Remote "https://github.com/purescript-node/purescript-node-buffer.git" +node-buffer v6.0.0 Remote "https://github.com/purescript-node/purescript-node-buffer.git" node-child-process v6.0.0 Remote "https://github.com/purescript-node/purescript-node-child-process.git" node-electron v0.0.2 Remote "https://github.com/cprussin/purescript-node-electron.git" -node-fs v5.0.0 Remote "https://github.com/purescript-node/purescript-node-fs.git" +node-fs v5.0.1 Remote "https://github.com/purescript-node/purescript-node-fs.git" node-fs-aff v6.0.0 Remote "https://github.com/purescript-node/purescript-node-fs-aff.git" node-he v0.2.0 Remote "https://github.com/justinwoo/purescript-node-he.git" -node-http v5.0.1 Remote "https://github.com/purescript-node/purescript-node-http.git" +node-http v5.0.2 Remote "https://github.com/purescript-node/purescript-node-http.git" node-net v1.0.0 Remote "https://github.com/purescript-node/purescript-node-net.git" node-path v3.0.0 Remote "https://github.com/purescript-node/purescript-node-path.git" node-postgres v5.0.0 Remote "https://github.com/epost/purescript-node-postgres.git" node-process v7.0.0 Remote "https://github.com/purescript-node/purescript-node-process.git" node-readline v4.0.1 Remote "https://github.com/purescript-node/purescript-node-readline.git" node-sqlite3 v6.0.0 Remote "https://github.com/justinwoo/purescript-node-sqlite3.git" -node-streams v4.0.0 Remote "https://github.com/purescript-node/purescript-node-streams.git" +node-streams v4.0.1 Remote "https://github.com/purescript-node/purescript-node-streams.git" node-telegram-bot-api v4.0.0 Remote "https://github.com/justinwoo/purescript-node-telegram-bot-api.git" node-url v4.0.0 Remote "https://github.com/purescript-node/purescript-node-url.git" nodemailer v2.0.2 Remote "https://github.com/oreshinya/purescript-nodemailer.git" nonempty v5.0.0 Remote "https://github.com/purescript/purescript-nonempty.git" now v4.0.0 Remote "https://github.com/purescript-contrib/purescript-now.git" nullable v4.1.1 Remote "https://github.com/purescript-contrib/purescript-nullable.git" -numbers v6.0.0 Remote "https://github.com/sharkdp/purescript-numbers.git" +numbers v7.0.0 Remote "https://github.com/sharkdp/purescript-numbers.git" options v5.0.0 Remote "https://github.com/purescript-contrib/purescript-options.git" optparse v3.0.1 Remote "https://github.com/f-o-a-m/purescript-optparse.git" ordered-collections v1.6.1 Remote "https://github.com/purescript/purescript-ordered-collections.git" orders v4.0.0 Remote "https://github.com/purescript/purescript-orders.git" pairing v5.1.0 Remote "https://github.com/paf31/purescript-pairing.git" -pairs v6.0.0 Remote "https://github.com/sharkdp/purescript-pairs.git" +pairs v7.0.0 Remote "https://github.com/sharkdp/purescript-pairs.git" parallel v4.0.0 Remote "https://github.com/purescript/purescript-parallel.git" parsing v5.0.3 Remote "https://github.com/purescript-contrib/purescript-parsing.git" partial v2.0.1 Remote "https://github.com/purescript/purescript-partial.git" @@ -172,98 +194,119 @@ pipes v6.0.0 Remote "https://github.com/felixS pointed-list v0.4.0 Remote "https://github.com/paluh/purescript-pointed-list.git" polyform v0.8.0 Remote "https://github.com/paluh/purescript-polyform.git" posix-types v4.0.0 Remote "https://github.com/purescript-node/purescript-posix-types.git" +precise-datetime v5.1.1 Remote "https://github.com/awakesecurity/purescript-precise-datetime.git" prelude v4.1.1 Remote "https://github.com/purescript/purescript-prelude.git" prettier v0.2.0 Remote "https://github.com/gcanti/purescript-prettier.git" -profunctor v4.0.0 Remote "https://github.com/purescript/purescript-profunctor.git" +profunctor v4.1.0 Remote "https://github.com/purescript/purescript-profunctor.git" profunctor-lenses v6.2.0 Remote "https://github.com/purescript-contrib/purescript-profunctor-lenses.git" promises v3.1.1 Remote "https://github.com/thimoteus/purescript-promises.git" proxy v3.0.0 Remote "https://github.com/purescript/purescript-proxy.git" +proxying v1.1.0 Remote "https://github.com/matthew-hilty/purescript-proxying.git" psa-utils v6.0.0 Remote "https://github.com/natefaubion/purescript-psa-utils.git" psc-ide v15.0.1 Remote "https://github.com/kRITZCREEK/purescript-psc-ide.git" psci-support v4.0.0 Remote "https://github.com/purescript/purescript-psci-support.git" +querydsl v0.10.1 Remote "https://github.com/Dretch/purescript-querydsl.git" quickcheck v6.1.0 Remote "https://github.com/purescript/purescript-quickcheck.git" quickcheck-laws v5.0.1 Remote "https://github.com/garyb/purescript-quickcheck-laws.git" quotient v3.0.0 Remote "https://github.com/rightfold/purescript-quotient.git" +radox v1.0.0 Remote "https://github.com/danieljharvey/purescript-radox.git" random v4.0.0 Remote "https://github.com/purescript/purescript-random.git" rationals v5.0.0 Remote "https://github.com/anttih/purescript-rationals.git" rave v0.1.1 Remote "https://github.com/reactormonk/purescript-rave.git" -react v7.0.1 Remote "https://github.com/purescript-contrib/purescript-react.git" -react-basic v9.0.1 Remote "https://github.com/lumihq/purescript-react-basic.git" -react-basic-hooks v0.7.1 Remote "https://github.com/spicydonuts/purescript-react-basic-hooks.git" +react v8.0.0 Remote "https://github.com/purescript-contrib/purescript-react.git" +react-basic v11.0.0 Remote "https://github.com/lumihq/purescript-react-basic.git" +react-basic-hooks v2.0.3 Remote "https://github.com/spicydonuts/purescript-react-basic-hooks.git" react-basic-native v0.1.3 Remote "https://github.com/dwhitney/purescript-react-basic-native.git" react-dom v6.1.0 Remote "https://github.com/purescript-contrib/purescript-react-dom.git" +react-radox v0.0.5 Remote "https://github.com/danieljharvey/purescript-react-radox.git" +react-stylesheet v0.0.2 Remote "https://github.com/danieljharvey/purescript-react-stylesheet.git" read v1.0.1 Remote "https://github.com/truqu/purescript-read.git" record v2.0.1 Remote "https://github.com/purescript/purescript-record.git" -record-extra v3.0.0 Remote "https://github.com/justinwoo/purescript-record-extra.git" +record-extra v3.0.1 Remote "https://github.com/justinwoo/purescript-record-extra.git" record-format v2.0.0 Remote "https://github.com/kcsongor/purescript-record-format.git" redux-devtools v0.1.0 Remote "https://github.com/justinwoo/purescript-redux-devtools.git" -refined v0.1.2 Remote "https://github.com/danieljharvey/purescript-refined.git" +refined v0.2.0 Remote "https://github.com/danieljharvey/purescript-refined.git" refs v4.1.0 Remote "https://github.com/purescript/purescript-refs.git" remotedata v4.2.0 Remote "https://github.com/krisajenkins/purescript-remotedata.git" result v1.0.3 Remote "https://github.com/ad-si/purescript-result.git" +ring-modules v5.0.1 Remote "https://github.com/f-o-a-m/purescript-ring-modules.git" routing v9.0.0 Remote "https://github.com/slamdata/purescript-routing.git" -routing-duplex v0.3.0 Remote "https://github.com/natefaubion/purescript-routing-duplex.git" +routing-duplex v0.4.0 Remote "https://github.com/natefaubion/purescript-routing-duplex.git" run v3.0.1 Remote "https://github.com/natefaubion/purescript-run.git" +run-profunctor-lenses v0.1.0 Remote "https://github.com/sigilion/purescript-run-profunctor-lenses.git" run-streaming v2.0.0 Remote "https://github.com/natefaubion/purescript-run-streaming.git" -safely v4.0.0 Remote "https://github.com/paf31/purescript-safely.git" +safely v4.0.1 Remote "https://github.com/paf31/purescript-safely.git" +search-trie v1.0.0 Remote "https://github.com/klntsky/purescript-search-trie.git" +selection-foldable v0.2.0 Remote "https://github.com/jamieyung/purescript-selection-foldable.git" semirings v5.0.0 Remote "https://github.com/purescript/purescript-semirings.git" server-sent-events v0.2.0 Remote "https://github.com/MichaelXavier/purescript-server-sent-events.git" shoronpo v0.3.0 Remote "https://github.com/justinwoo/purescript-shoronpo.git" signal v10.1.0 Remote "https://github.com/bodil/purescript-signal.git" sijidou v1.0.0 Remote "https://github.com/justinwoo/purescript-sijidou.git" simple-emitter v1.0.0 Remote "https://github.com/oreshinya/purescript-simple-emitter.git" +simple-i18n v0.1.0 Remote "https://github.com/oreshinya/purescript-simple-i18n.git" simple-json v7.0.0 Remote "https://github.com/justinwoo/purescript-simple-json.git" simple-json-generics v0.1.0 Remote "https://github.com/justinwoo/purescript-simple-json-generics.git" simple-json-utils v0.1.0 Remote "https://github.com/justinwoo/purescript-simple-json-utils.git" -simple-jwt v1.0.2 Remote "https://github.com/oreshinya/purescript-simple-jwt.git" -sized-vectors v3.1.0 Remote "https://github.com/bodil/purescript-sized-vectors.git" -smolder v12.0.0 Remote "https://github.com/bodil/purescript-smolder.git" +simple-jwt v2.0.0 Remote "https://github.com/oreshinya/purescript-simple-jwt.git" +simple-timestamp v3.0.0 Remote "https://github.com/reactormonk/purescript-simple-timestamp.git" +sized-vectors v4.0.0 Remote "https://github.com/bodil/purescript-sized-vectors.git" +slug v1.0.0 Remote "https://github.com/thomashoneyman/purescript-slug.git" +smolder v12.3.0 Remote "https://github.com/bodil/purescript-smolder.git" snabbdom v1.0.1 Remote "https://github.com/LukaJCB/purescript-snabbdom.git" sodium v2.1.0 Remote "https://github.com/SodiumFRP/purescript-sodium.git" -spec v4.0.0 Remote "https://github.com/purescript-spec/purescript-spec.git" +spec v4.0.1 Remote "https://github.com/purescript-spec/purescript-spec.git" spec-discovery v4.0.0 Remote "https://github.com/owickstrom/purescript-spec-discovery.git" spec-quickcheck v3.1.0 Remote "https://github.com/owickstrom/purescript-spec-quickcheck.git" -spork v1.0.0 Remote "https://github.com/natefaubion/purescript-spork" +spork v1.0.0 Remote "https://github.com/natefaubion/purescript-spork.git" st v4.0.0 Remote "https://github.com/purescript/purescript-st.git" -string-parsers v5.0.0 Remote "https://github.com/paf31/purescript-string-parsers.git" +string-parsers v5.0.1 Remote "https://github.com/paf31/purescript-string-parsers.git" strings v4.0.1 Remote "https://github.com/purescript/purescript-strings.git" -stringutils v0.0.9 Remote "https://github.com/menelaos/purescript-stringutils.git" +strings-extra v2.0.0 Remote "https://github.com/purescript-contrib/purescript-strings-extra.git" +stringutils v0.0.10 Remote "https://github.com/menelaos/purescript-stringutils.git" strongcheck v4.1.1 Remote "https://github.com/purescript-contrib/purescript-strongcheck.git" +struct v1.1.0 Remote "https://github.com/matthew-hilty/purescript-struct.git" +stylesheet v0.0.3 Remote "https://github.com/danieljharvey/purescript-stylesheet.git" +subcategory v0.2.0 Remote "https://github.com/matthew-hilty/purescript-subcategory.git" suggest v5.0.0 Remote "https://github.com/nwolverson/purescript-suggest.git" sunde v2.0.0 Remote "https://github.com/justinwoo/purescript-sunde.git" svg-parser v1.0.0 Remote "https://github.com/rnons/purescript-svg-parser.git" svg-parser-halogen v1.0.0 Remote "https://github.com/rnons/purescript-svg-parser-halogen.git" -tailrec v4.0.0 Remote "https://github.com/purescript/purescript-tailrec.git" +tailrec v4.1.0 Remote "https://github.com/purescript/purescript-tailrec.git" test-unit v15.0.0 Remote "https://github.com/bodil/purescript-test-unit.git" -text-encoding v0.0.9 Remote "https://github.com/AlexaDeWit/purescript-text-encoding.git" these v4.0.0 Remote "https://github.com/purescript-contrib/purescript-these.git" -toppokki v1.1.0 Remote "https://github.com/justinwoo/purescript-toppokki.git" +tolerant-argonaut v1.1.0 Remote "https://github.com/matthew-hilty/purescript-tolerant-argonaut.git" +toppokki v2.0.0 Remote "https://github.com/justinwoo/purescript-toppokki.git" tortellini v5.1.0 Remote "https://github.com/justinwoo/purescript-tortellini.git" transformers v4.2.0 Remote "https://github.com/purescript/purescript-transformers.git" +trout v0.12.1 Remote "https://github.com/purescript-hyper/purescript-trout.git" tuples v5.1.0 Remote "https://github.com/purescript/purescript-tuples.git" type-equality v3.0.0 Remote "https://github.com/purescript/purescript-type-equality.git" type-isequal v0.1.0 Remote "https://github.com/justinwoo/purescript-type-isequal.git" -typelevel v5.0.0 Remote "https://github.com/bodil/purescript-typelevel.git" +typedenv v0.0.1 Remote "https://github.com/nsaunders/purescript-typedenv.git" +typelevel v6.0.0 Remote "https://github.com/bodil/purescript-typelevel.git" typelevel-prelude v5.0.0 Remote "https://github.com/purescript/purescript-typelevel-prelude.git" uint v5.1.1 Remote "https://github.com/zaquest/purescript-uint.git" undefinable v4.0.0 Remote "https://github.com/ethul/purescript-undefinable.git" +undefined v1.0.2 Remote "https://github.com/bklaric/purescript-undefined.git" unfoldable v4.0.2 Remote "https://github.com/purescript/purescript-unfoldable.git" unicode v4.0.1 Remote "https://github.com/purescript-contrib/purescript-unicode.git" unordered-collections v1.8.2 Remote "https://github.com/fehrenbach/purescript-unordered-collections.git" unsafe-coerce v4.0.0 Remote "https://github.com/purescript/purescript-unsafe-coerce.git" -unsafe-reference v3.0.1 Remote "https://github.com/purescript-contrib/purescript-unsafe-reference" +unsafe-reference v3.0.1 Remote "https://github.com/purescript-contrib/purescript-unsafe-reference.git" uri v7.0.0 Remote "https://github.com/slamdata/purescript-uri.git" +uuid v6.0.0 Remote "https://github.com/spicydonuts/purescript-uuid.git" validation v4.2.0 Remote "https://github.com/purescript/purescript-validation.git" variant v6.0.1 Remote "https://github.com/natefaubion/purescript-variant.git" web-clipboard v2.0.0 Remote "https://github.com/purescript-web/purescript-web-clipboard.git" -web-dom v3.0.0 Remote "https://github.com/purescript-web/purescript-web-dom.git" +web-dom v4.0.0 Remote "https://github.com/purescript-web/purescript-web-dom.git" web-events v2.0.1 Remote "https://github.com/purescript-web/purescript-web-events.git" -web-file v2.1.1 Remote "https://github.com/purescript-web/purescript-web-file.git" -web-html v2.2.1 Remote "https://github.com/purescript-web/purescript-web-html.git" +web-file v2.2.0 Remote "https://github.com/purescript-web/purescript-web-file.git" +web-html v2.3.0 Remote "https://github.com/purescript-web/purescript-web-html.git" web-socket v2.0.0 Remote "https://github.com/purescript-web/purescript-web-socket.git" web-storage v3.0.0 Remote "https://github.com/purescript-web/purescript-web-storage.git" web-touchevents v2.0.0 Remote "https://github.com/purescript-web/purescript-web-touchevents.git" web-uievents v2.0.0 Remote "https://github.com/purescript-web/purescript-web-uievents.git" -web-xhr v3.0.1 Remote "https://github.com/purescript-web/purescript-web-xhr.git" +web-xhr v3.0.2 Remote "https://github.com/purescript-web/purescript-web-xhr.git" xiaomian v0.1.0 Remote "https://github.com/justinwoo/purescript-xiaomian.git" yargs v4.0.0 Remote "https://github.com/paf31/purescript-yargs.git" diff --git a/test/fixtures/spago-bower-import.dhall b/test/fixtures/spago-bower-import.dhall index 4bce2db9d..c392226cb 100644 --- a/test/fixtures/spago-bower-import.dhall +++ b/test/fixtures/spago-bower-import.dhall @@ -2,8 +2,7 @@ Welcome to a Spago project! You can edit this file as you like. -} -{ name = - "simple-json" +{ name = "simple-json" , dependencies = [ "arrays" , "assert" @@ -21,8 +20,6 @@ You can edit this file as you like. , "typelevel-prelude" , "variant" ] -, packages = - ./packages.dhall -, sources = - [ "src/**/*.purs", "test/**/*.purs" ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] } diff --git a/test/fixtures/spago-configV1.dhall b/test/fixtures/spago-configV1.dhall index 60af2188b..0faa496b2 100644 --- a/test/fixtures/spago-configV1.dhall +++ b/test/fixtures/spago-configV1.dhall @@ -2,10 +2,8 @@ Welcome to a Spago project! You can edit this file as you like. -} -{ name = - "aaa" +{ name = "aaa" , dependencies = [ "console", "effect", "foreign", "prelude", "psci-support", "simple-json" ] -, packages = - ./packages.dhall +, packages = ./packages.dhall } diff --git a/test/fixtures/spago-configV2.dhall b/test/fixtures/spago-configV2.dhall index 4a54efb09..eaf36b839 100644 --- a/test/fixtures/spago-configV2.dhall +++ b/test/fixtures/spago-configV2.dhall @@ -2,12 +2,9 @@ Welcome to a Spago project! You can edit this file as you like. -} -{ sources = - [ "src/**/*.purs", "test/**/*.purs" ] -, name = - "aaa" +{ sources = [ "src/**/*.purs", "test/**/*.purs" ] +, name = "aaa" , dependencies = [ "console", "effect", "foreign", "prelude", "psci-support", "simple-json" ] -, packages = - ./packages.dhall +, packages = ./packages.dhall } diff --git a/test/fixtures/spago-configWithBackend.dhall b/test/fixtures/spago-configWithBackend.dhall index fcba1207f..c06142c7e 100644 --- a/test/fixtures/spago-configWithBackend.dhall +++ b/test/fixtures/spago-configWithBackend.dhall @@ -2,14 +2,9 @@ Welcome to a Spago project! You can edit this file as you like. -} -{ backend = - "echo hi from backend> alternate-backend-output.txt" -, name = - "aaa" -, dependencies = - [ "aff", "console", "effect", "psci-support" ] -, packages = - ./packages.dhall -, sources = - [ "src/**/*.purs", "test/**/*.purs" ] -} \ No newline at end of file +{ backend = "echo hi from backend> alternate-backend-output.txt" +, name = "aaa" +, dependencies = [ "aff", "console", "effect", "psci-support" ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] +} diff --git a/test/fixtures/spago-install-failure.dhall b/test/fixtures/spago-install-failure.dhall index 536142bbc..0f035efb9 100644 --- a/test/fixtures/spago-install-failure.dhall +++ b/test/fixtures/spago-install-failure.dhall @@ -2,12 +2,8 @@ Welcome to a Spago project! You can edit this file as you like. -} -{ name = - "aaa" -, dependencies = - [ "console", "effect", "prelude", "psci-support" ] -, packages = - ./packages.dhall -, sources = - [ "src/**/*.purs", "test/**/*.purs" ] +{ name = "aaa" +, dependencies = [ "console", "effect", "prelude", "psci-support" ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] } diff --git a/test/fixtures/spago-install-success.dhall b/test/fixtures/spago-install-success.dhall index c2e4a9a71..a39d6efdb 100644 --- a/test/fixtures/spago-install-success.dhall +++ b/test/fixtures/spago-install-success.dhall @@ -2,12 +2,9 @@ Welcome to a Spago project! You can edit this file as you like. -} -{ name = - "aaa" +{ name = "aaa" , dependencies = [ "console", "effect", "foreign", "prelude", "psci-support", "simple-json" ] -, packages = - ./packages.dhall -, sources = - [ "src/**/*.purs", "test/**/*.purs" ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] } diff --git a/test/fixtures/spago-no-comments.dhall b/test/fixtures/spago-no-comments.dhall index 649ac320b..3627f99ec 100644 --- a/test/fixtures/spago-no-comments.dhall +++ b/test/fixtures/spago-no-comments.dhall @@ -1,9 +1,5 @@ -{ name = - "my-project" -, dependencies = - [ "console", "effect", "psci-support" ] -, packages = - ./packages.dhall -, sources = - [ "src/**/*.purs", "test/**/*.purs" ] +{ name = "my-project" +, dependencies = [ "console", "effect", "psci-support" ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] } diff --git a/test/fixtures/spago-psc-failure.dhall b/test/fixtures/spago-psc-failure.dhall index 367b3e5cc..ed22c34b9 100644 --- a/test/fixtures/spago-psc-failure.dhall +++ b/test/fixtures/spago-psc-failure.dhall @@ -2,12 +2,8 @@ Welcome to a Spago project! You can edit this file as you like. -} -{ name = - "aaa" -, dependencies = - [ "console", "effect", "psci-support" ] -, packages = - ./packages.dhall -, sources = - [ "src/**/*.purs", "test/**/*.purs" ] +{ name = "aaa" +, dependencies = [ "console", "effect", "psci-support" ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] } diff --git a/test/fixtures/spago-psc-success.dhall b/test/fixtures/spago-psc-success.dhall index 536142bbc..0f035efb9 100644 --- a/test/fixtures/spago-psc-success.dhall +++ b/test/fixtures/spago-psc-success.dhall @@ -2,12 +2,8 @@ Welcome to a Spago project! You can edit this file as you like. -} -{ name = - "aaa" -, dependencies = - [ "console", "effect", "prelude", "psci-support" ] -, packages = - ./packages.dhall -, sources = - [ "src/**/*.purs", "test/**/*.purs" ] +{ name = "aaa" +, dependencies = [ "console", "effect", "prelude", "psci-support" ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] } From 19cb6f1b98f5dad5f6d4bd81a533242fd933d204 Mon Sep 17 00:00:00 2001 From: Jan Hrcek Date: Sat, 26 Oct 2019 08:02:46 +0200 Subject: [PATCH 08/25] Reset cursor position on rebuild with --clear-screen --watch (#466) --- CHANGELOG.md | 1 + src/Spago/Watch.hs | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 597236955..50f8f997b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Bugfixes: - Fix confusing warning when trying to `spago install` a package already present in project dependencies list (#436) - Do not watch files in `.spago` folder when running `spago build --watch` (#430) - Fix dynamic libraries compatibility problems by publishing a statically linked executable for Linux (#427, #437) +- `--clear-screen` (usable e.g. with `spago build --watch`) now also resets cursor position, so the rebuild message always appears at top left of the screen (#465) Other improvements: - Speed up test suite by replacing couple of end 2 end bump-version tests with unit/property tests diff --git a/src/Spago/Watch.hs b/src/Spago/Watch.hs index 8643675a2..53e65c055 100644 --- a/src/Spago/Watch.hs +++ b/src/Spago/Watch.hs @@ -10,16 +10,16 @@ import Control.Concurrent.STM (check) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Data.Text (pack, toLower, unpack) +import Data.Time.Clock (NominalDiffTime, diffUTCTime, getCurrentTime) import GHC.IO (FilePath) import GHC.IO.Exception -import System.Console.ANSI (clearScreen) +import System.Console.ANSI (clearScreen, setCursorPosition) import System.FilePath (splitDirectories) import qualified System.FilePath.Glob as Glob import qualified System.FSNotify as Watch import System.IO (getLine) import qualified UnliftIO import UnliftIO.Async (race_) -import Data.Time.Clock (NominalDiffTime, getCurrentTime, diffUTCTime) -- Should we clear the screen on rebuild? data ClearScreen = DoClear | NoClear @@ -65,7 +65,9 @@ fileWatchConf watchConfig shouldClear inner = withManagerConf watchConfig $ \man watchVar <- liftIO $ newTVarIO Map.empty let redisplay maybeMsg = do - when (shouldClear == DoClear) $ liftIO clearScreen + when (shouldClear == DoClear) $ liftIO $ do + clearScreen + setCursorPosition 0 0 mapM_ echoStr maybeMsg let onChange event = do From 8a3d2e8d50f2084cc5cb9c8334f2f48a67e024e9 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Sat, 26 Oct 2019 19:33:38 +0800 Subject: [PATCH 09/25] fix typo (#464) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a76444b11..6d7d7e767 100644 --- a/README.md +++ b/README.md @@ -684,7 +684,7 @@ Bundling first... Bundle succeeded and output file to index.js Make module succeeded and output file to index.js -$ node -e "console.log(require('./index).main)" +$ node -e "console.log(require('./index').main)" [Function] ``` From 1a62e97b18a71ea5a8f802fff6a70b18aa3a29bb Mon Sep 17 00:00:00 2001 From: Ben Hart Date: Sat, 26 Oct 2019 11:21:17 -0400 Subject: [PATCH 10/25] Add a 'Getting Started With Parcel' to docs (#461) * filter out files in .spago folder from watch list * add #430 to changelog * Update src/Spago/Build.hs Co-Authored-By: Jan Hrcek * fix build by importing split directories * added step-by-step guide to setting up a spago + parcel project to documentation * cleanup * changelog --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6d7d7e767..d1bab013d 100644 --- a/README.md +++ b/README.md @@ -998,6 +998,7 @@ To configure this, add the following script to your `package.json` file: For publishing CLI programs or npm modules, please refer to the npm documentation +Other build options are available, using webpack (and purs-loader), or browserify. Parcel is used here for it's low-configuration overhead. ### Generate documentation for my project From 580881646e6836556dcdbabbaeaa65c15a68449f Mon Sep 17 00:00:00 2001 From: Fabrizio Ferrai Date: Sun, 27 Oct 2019 01:22:54 +0200 Subject: [PATCH 11/25] Allow additional fields in Config for local packages (#470) --- src/Spago/Config.hs | 8 +++++--- test/SpagoSpec.hs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Spago/Config.hs b/src/Spago/Config.hs index 69d990dbe..89ad52005 100644 --- a/src/Spago/Config.hs +++ b/src/Spago/Config.hs @@ -1,4 +1,5 @@ {-# LANGUAGE ViewPatterns #-} +{-# LANGUAGE OverloadedLists #-} module Spago.Config ( defaultPath , makeConfig @@ -323,13 +324,14 @@ addSourcePaths expr = expr isConfigV1, isConfigV2 :: Dhall.Map.Map Text v -> Bool isConfigV1 (Set.fromList . Dhall.Map.keys -> configKeySet) = - let configV1Keys = Set.fromList ["name", "dependencies", "packages"] + let configV1Keys = ["name", "dependencies", "packages"] in configKeySet == configV1Keys isConfigV2 (Set.fromList . Dhall.Map.keys -> configKeySet) = - let configV2Keys = Set.fromList ["name", "dependencies", "packages", "sources"] - in configKeySet == configV2Keys + let configV2Keys = ["name", "dependencies", "packages", "sources"] + optionalKeys = ["backend", "license", "repository"] + in Set.difference configKeySet optionalKeys == configV2Keys filterDependencies :: Expr -> Expr diff --git a/test/SpagoSpec.hs b/test/SpagoSpec.hs index dae9433f3..e59d98f32 100644 --- a/test/SpagoSpec.hs +++ b/test/SpagoSpec.hs @@ -401,7 +401,7 @@ spec = around_ setup $ do rm "packages.dhall" writeTextFile "packages.dhall" $ "../packages.dhall" rm "spago.dhall" - writeTextFile "spago.dhall" $ "{ name = \"lib-1\", dependencies = [\"console\", \"effect\", \"prelude\"], packages = ./packages.dhall }" + writeTextFile "spago.dhall" $ "{ name = \"lib-1\", license = \"MIT\", repository = \"https://github.com/fake/lib-1.git\", dependencies = [\"console\", \"effect\", \"prelude\"], sources = [\"src/**/*.purs\"], packages = ./packages.dhall }" spago ["build"] >>= shouldBeSuccess testdir "output" `shouldReturn` False From 348beff634e64b8d7518887d66a645a2c9860c83 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Sun, 27 Oct 2019 17:47:50 -0400 Subject: [PATCH 12/25] adjusted table of contents --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d1bab013d..d03dc6c49 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,9 @@ $ node . - [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) + - [Getting Started from Scratch - With Parcel (Front End Projects)](#getting-started-from-scratch-with-parcel-for-front-end-projects) + - [Getting Started from Scratch - With WebPack (Large Front End Projects)](#getting-started-from-scratch-with-parcel-for-front-end-projects) + - [Getting Started from Scratch - With Nodemon (Back End Projects)](#getting-started-from-scratch-with-parcel-for-front-end-projects) - [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) From 2b37fcd2efdb634de0abb01f22e8ce8a9627bb57 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Sun, 27 Oct 2019 17:49:05 -0400 Subject: [PATCH 13/25] adjust changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50f8f997b..13163728b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ New features: - `spago install purescript-XYZ` will now strip `purescript-` prefix and install XYZ (if it exists in package set) instead of just failing with a warning (#367) - `spago run` now recognizes backend specified in the configuration file and calls the backend with `--run` argument. - documentation now includes a step-by-step guide on setting up a Spago/Parcel project (#456) +- documentation now includes a step-by-step guide on setting up a Spago/Node and Spago/Webpack project (#456-extra) Bugfixes: - Warn (but don't error) when trying to watch missing directories (#406) From 184c4a7afbe93321e8f1e1a4790f1f77ae39dbb4 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Sun, 27 Oct 2019 17:57:59 -0400 Subject: [PATCH 14/25] cleanup --- README.md | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/README.md b/README.md index d03dc6c49..04ab65649 100644 --- a/README.md +++ b/README.md @@ -1000,6 +1000,89 @@ To configure this, add the following script to your `package.json` file: 12. To run a production build, you can simply run `npm run build` and to start a production process, call `npm start` For publishing CLI programs or npm modules, please refer to the npm documentation +<<<<<<< HEAD +======= + +#### Getting Started from Scratch + +To start a project using Spago and Parcel together, here's the cammands and file setup you'll need: + +0. install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` +1. Install Spago and PureScript: `npm i -g spago purescript` +2. Create a folder for your project: `mkdir ` +3. Move to the project folder: `cd ` +4. Create your PureScript project with Spago: `spago init`, This also produces a `./src/Main.purs` file which contains some starter code. +5. Initialize the JavaScript/NPM project `npm init` +6. Install Parcel as a dependency `npm i parcel` +7. Add a JavaScript file which imports and calls the `main` function from the output of `./src/Main.purs`. This can be placed in the root directory for your project. Traditionally this file is named `index.js`. The `main` function from `Main.purs` can accept arguments, this is useful since parcel will replace environment variables inside of JavaScript. It is recommended to read any environment variables in the JavaScript file and pass them as arguments to `main`. Here is an example JavaScript file: + +``` JavaScript +var Main = require('./output/Main'); + +function main () { + /* + Here we could add variables such as + + var baseUrl = process.env.BASE_URL; + + Parcel will replace `process.env.BASE_URL` + with the string contents of the BASE_URL environment + variable at bundle/build time. + A .env file can also be used to override shell variables + for more information, see https://en.parceljs.org/env.html + + These variables can be supplied to the Main.main function, + however, you will need to change the type to accept variables, by default it is an Effect. + You will probably want to make it a function from String -> Effect () + */ + + Main.main(); + } + +// HMR stuff +// For more info see: https://parceljs.org/hmr.html +if (module.hot) { + module.hot.accept(function () { + console.log('Reloaded, running main again'); + main(); + }); +} + +console.log('Starting app'); + +main(); +``` + +8. Add an HTML file which sources your JavaScript file. This can be named `index.html` and placed in the root directory of your project. Here is an example HTML file: + +``` HTML + + + + + + + +
+ + + +``` + +9. Add a development script to `package.json` which will hot-bundle the PureScript code with Spago, and then hot-reload the resulting JavaScript code using Parcel. Here, we'll call this script `dev`. + +``` +... + "scripts": { + "dev": "spago build --watch & parcel index.html", + }, +... +``` + +This script will simultanously run spago and parcel. When you run it with `npm run dev`, Parcel will tell you which port your application is being served on, by default this will be `localhost:1234`. If you've followed this guide you can navigate there in a browser and open the javascript console. you will see the output of both `index.js` and the compiled `Main.purs` file. When you modify any purescript file in `./src`, you should see Spago and Parcel rebuild your application, and the browser should execute the new code. For some applications you may adjust the JavaScript function that handles hot modules to fully reload the page with `window.location.reload();`. + +10. when you are ready to build and deploy your application as static html/js/css, you may add a `build` script to package.json in order to produce a final bundle, this script is usually something like `spago build && parcel build index.html`. +>>>>>>> 5ce1eea... cleanup Other build options are available, using webpack (and purs-loader), or browserify. Parcel is used here for it's low-configuration overhead. From 3a5d9f6005569f0e26ab93875dc3ae7e5d13d078 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Sun, 27 Oct 2019 18:01:45 -0400 Subject: [PATCH 15/25] cleanup --- README.md | 86 ------------------------------------------------------- 1 file changed, 86 deletions(-) diff --git a/README.md b/README.md index 04ab65649..cc0bd35ac 100644 --- a/README.md +++ b/README.md @@ -1000,91 +1000,6 @@ To configure this, add the following script to your `package.json` file: 12. To run a production build, you can simply run `npm run build` and to start a production process, call `npm start` For publishing CLI programs or npm modules, please refer to the npm documentation -<<<<<<< HEAD -======= - -#### Getting Started from Scratch - -To start a project using Spago and Parcel together, here's the cammands and file setup you'll need: - -0. install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` -1. Install Spago and PureScript: `npm i -g spago purescript` -2. Create a folder for your project: `mkdir ` -3. Move to the project folder: `cd ` -4. Create your PureScript project with Spago: `spago init`, This also produces a `./src/Main.purs` file which contains some starter code. -5. Initialize the JavaScript/NPM project `npm init` -6. Install Parcel as a dependency `npm i parcel` -7. Add a JavaScript file which imports and calls the `main` function from the output of `./src/Main.purs`. This can be placed in the root directory for your project. Traditionally this file is named `index.js`. The `main` function from `Main.purs` can accept arguments, this is useful since parcel will replace environment variables inside of JavaScript. It is recommended to read any environment variables in the JavaScript file and pass them as arguments to `main`. Here is an example JavaScript file: - -``` JavaScript -var Main = require('./output/Main'); - -function main () { - /* - Here we could add variables such as - - var baseUrl = process.env.BASE_URL; - - Parcel will replace `process.env.BASE_URL` - with the string contents of the BASE_URL environment - variable at bundle/build time. - A .env file can also be used to override shell variables - for more information, see https://en.parceljs.org/env.html - - These variables can be supplied to the Main.main function, - however, you will need to change the type to accept variables, by default it is an Effect. - You will probably want to make it a function from String -> Effect () - */ - - Main.main(); - } - -// HMR stuff -// For more info see: https://parceljs.org/hmr.html -if (module.hot) { - module.hot.accept(function () { - console.log('Reloaded, running main again'); - main(); - }); -} - -console.log('Starting app'); - -main(); -``` - -8. Add an HTML file which sources your JavaScript file. This can be named `index.html` and placed in the root directory of your project. Here is an example HTML file: - -``` HTML - - - - - - - -
- - - -``` - -9. Add a development script to `package.json` which will hot-bundle the PureScript code with Spago, and then hot-reload the resulting JavaScript code using Parcel. Here, we'll call this script `dev`. - -``` -... - "scripts": { - "dev": "spago build --watch & parcel index.html", - }, -... -``` - -This script will simultanously run spago and parcel. When you run it with `npm run dev`, Parcel will tell you which port your application is being served on, by default this will be `localhost:1234`. If you've followed this guide you can navigate there in a browser and open the javascript console. you will see the output of both `index.js` and the compiled `Main.purs` file. When you modify any purescript file in `./src`, you should see Spago and Parcel rebuild your application, and the browser should execute the new code. For some applications you may adjust the JavaScript function that handles hot modules to fully reload the page with `window.location.reload();`. - -10. when you are ready to build and deploy your application as static html/js/css, you may add a `build` script to package.json in order to produce a final bundle, this script is usually something like `spago build && parcel build index.html`. ->>>>>>> 5ce1eea... cleanup - -Other build options are available, using webpack (and purs-loader), or browserify. Parcel is used here for it's low-configuration overhead. ### Generate documentation for my project @@ -1108,7 +1023,6 @@ you can pass a `format` flag: $ spago docs --format ctags ``` - ### Get source maps for my project Quoting from [this tweet](https://twitter.com/jusrin00/status/1092071407356387328): From b0a79f5079f7e211f1c4d8d956bdb6ed3b4d1082 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Tue, 29 Oct 2019 22:33:34 -0400 Subject: [PATCH 16/25] correcting typos and integrating code review suggestions --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cc0bd35ac..516dcae7f 100644 --- a/README.md +++ b/README.md @@ -707,13 +707,13 @@ Take a look at [TodoMVC with react-basic + spago + parcel][todomvc] for a workin To start a project using Spago and Parcel together, here's the cammands and file setup you'll need: -0. install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` +0. Install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` 1. Install Spago and PureScript: `npm i -g spago purescript` 2. Create a folder for your project: `mkdir ` 3. Move to the project folder: `cd ` 4. Create your PureScript project with Spago: `spago init`, This also produces a `./src/Main.purs` file which contains some starter code. 5. Initialize the JavaScript/NPM project `npm init` -6. Install Parcel as a dependency `npm i parcel` (this is usually a dev dependancy, add the `--save-dev` flag to prevent installation in production or CI environments) +6. Install Parcel as a dependency `npm i parcel --save dev` 7. Add a JavaScript file which imports and calls the `main` function from the output of `./src/Main.purs`. This can be placed in the root directory for your project. Traditionally this file is named `index.js`. The `main` function from `Main.purs` can accept arguments, this is useful since parcel will replace environment variables inside of JavaScript. It is recommended to read any environment variables in the JavaScript file and pass them as arguments to `main`. Here is an example JavaScript file: ``` JavaScript @@ -779,7 +779,7 @@ main(); ... ``` -This script will simultanously run spago and parcel. When you run it with `npm run dev`, Parcel will tell you which port your application is being served on, by default this will be `localhost:1234`. If you've followed this guide you can navigate there in a browser and open the javascript console. you will see the output of both `index.js` and the compiled `Main.purs` file. When you modify any purescript file in `./src`, you should see Spago and Parcel rebuild your application, and the browser should execute the new code. For some applications you may adjust the JavaScript function that handles hot modules to fully reload the page with `window.location.reload();`. +This script will simultanously run spago and parcel in parallel. NPM scripts allow project dependencies to be treated as if they are on your PATH. When you run it with `npm run dev`, Parcel will tell you which port your application is being served on, by default this will be `localhost:1234`. If you've followed this guide you can navigate there in a browser and open the javascript console. you will see the output of both `index.js` and the compiled `Main.purs` file. When you modify any purescript file in `./src`, you should see Spago and Parcel rebuild your application, and the browser should execute the new code. For some applications you may adjust the JavaScript function that handles hot modules to fully reload the page with `window.location.reload();`. 10. At this point we should be able to test our program by running `npm run dev`, when you navigate a browser to localhost:1234, you should see '🍝' as output in the javascript development console if this was performed successfully @@ -788,16 +788,16 @@ This script will simultanously run spago and parcel. When you run it with `npm r Other build options are available, using webpack (and purs-loader), or browserify. Parcel is used here for it's low-configuration overhead. -#### Getting Started from Scratch With WebPack (For Larger front end projects) +#### Getting Started from Scratch With WebPack (For Front End Projects) -0. install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` +0. Install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` 1. Install Spago and PureScript: `npm i -g spago purescript` 2. Create a folder for your project: `mkdir ` 3. Move to the project folder: `cd ` 4. Create your PureScript project with Spago: `spago init`, This also produces a `./src/Main.purs` file which contains some starter code. 5. Initialize the JavaScript/NPM project `npm init` -6. Add WebPack as a dependancy `npm install webpack webpack-cli webpack-dev-server` (this is usually a dev dependancy, add the `--save-dev` flag to prevent installation in production or CI environments) -7. Install the PureScript loader and HTML plugin for WebPack `npm install purs-loader html-webpack plugin` (This is likely also dev dependancy. Depending on other tools/filetypes you may require additional loaders, This may include css/scss, image files, etc. please refer to the [WebPack documentation][https://webpack.js.org/] for more information) +6. Add WebPack and PureScript-PSA as dependancies `npm install webpack webpack-cli webpack-dev-server purescript-psa --save-dev` +7. Install the PureScript loader and HTML plugin for WebPack `npm install purs-loader html-webpack plugin --save-dev` (Depending on other tools/filetypes you may require additional loaders, This may include css/scss, image files, etc. please refer to the [WebPack documentation][https://webpack.js.org/] for more information) 8. Create an HTML file that will serve as the entry point for your application. Typically this is `index.html`. in your HTML file, be sure to pull in the `bundle.js` file, which will be Webpack's output. here is an example HTML file: ``` html @@ -938,7 +938,7 @@ console.log('app starting' ) #### Getting Started from Scratch With Nodemon (for Backend and/or CLI projects) -0. install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` +0. Install Node Package Manager(NPM): `curl https://www.npmjs.org/install.sh | sh` 1. Install Spago and PureScript: `npm i -g spago purescript` 2. Create a folder for your project: `mkdir ` 3. Move to the project folder: `cd ` @@ -999,7 +999,7 @@ To configure this, add the following script to your `package.json` file: 12. To run a production build, you can simply run `npm run build` and to start a production process, call `npm start` -For publishing CLI programs or npm modules, please refer to the npm documentation +For publishing CLI programs or NPM modules, please refer to the [npm documentation][https://docs.npmjs.com/cli/publish], however if you are publishing a Node module for consumption by JavaScript users, it is recommended that you pre-compile your purescript project before distributing. ### Generate documentation for my project From 5a063b02ac37dd93661ffb2ea0f4f15da0a9fa74 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Sun, 3 Nov 2019 23:26:06 -0500 Subject: [PATCH 17/25] replaced echo and echoStr functions with output, outputStr, logDebug, logWarning, and logError fns --- CHANGELOG.md | 1 + app/Curator.hs | 94 +++++++++---------- src/Spago/Bower.hs | 6 +- src/Spago/Build.hs | 42 ++++----- src/Spago/Config.hs | 22 ++--- src/Spago/DryRun.hs | 8 +- src/Spago/FetchPackage.hs | 18 ++-- src/Spago/Git.hs | 2 +- src/Spago/GitHub.hs | 12 +-- src/Spago/GlobalCache.hs | 28 +++--- src/Spago/Messages.hs | 4 +- src/Spago/PackageSet.hs | 30 +++--- src/Spago/Packages.hs | 38 ++++---- src/Spago/Prelude.hs | 45 +++++---- src/Spago/Purs.hs | 8 +- src/Spago/Version.hs | 8 +- src/Spago/Watch.hs | 24 ++--- test/SpagoSpec.hs | 7 +- test/Utils.hs | 9 ++ test/fixtures/alternative2install-warning.txt | 2 + test/fixtures/alternative2install.txt | 2 - .../spago-install-existing-dep-output.txt | 1 + .../spago-install-existing-dep-warning.txt | 1 - 23 files changed, 218 insertions(+), 194 deletions(-) create mode 100644 test/fixtures/alternative2install-warning.txt create mode 100644 test/fixtures/spago-install-existing-dep-output.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 13163728b..8beda7a84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ New features: - `spago run` now recognizes backend specified in the configuration file and calls the backend with `--run` argument. - documentation now includes a step-by-step guide on setting up a Spago/Parcel project (#456) - documentation now includes a step-by-step guide on setting up a Spago/Node and Spago/Webpack project (#456-extra) +- moved warning and error logs to stderr, adjusted logging strategy (#256) Bugfixes: - Warn (but don't error) when trying to watch missing directories (#406) diff --git a/app/Curator.hs b/app/Curator.hs index c0e515e05..45d1d7bc5 100644 --- a/app/Curator.hs +++ b/app/Curator.hs @@ -66,7 +66,7 @@ main = do mktree "data" -- Make sure the repos are cloned and configured - echo "Cloning and configuring repos.." + output "Cloning and configuring repos.." ensureRepo "spacchetti" "spago" ensureRepo "spacchetti" "package-sets-metadata" ensureRepo "purescript" "package-sets" @@ -123,7 +123,7 @@ main = do unless isThere $ do (code, _out, _err) <- runWithCwd "data" $ "git clone git@github.com:" <> org <> "/" <> repo <> ".git" case code of - ExitSuccess -> echoStr $ "Cloned " <> org <> "/" <> repo + ExitSuccess -> outputStr $ "Cloned " <> org <> "/" <> repo _ -> die "Error while cloning repo" -- set the local git identity to spacchettibotti runWithCwd ("data/" <> repo) "git config --local user.name 'Spacchettibotti' && git config --local user.email 'spacchettibotti@ferrai.io'" @@ -136,18 +136,18 @@ spagoUpdater token controlChan fetcherChan = go Nothing atomically (Queue.readTBQueue controlChan) >>= \case MStart -> do -- Get which one is the latest release of package-sets and download it - echo "Update has been kickstarted by main thread." - echo "Getting latest package-sets release.." + output "Update has been kickstarted by main thread." + output "Getting latest package-sets release.." Right GitHub.Release{..} <- GitHub.executeRequest' $ GitHub.latestReleaseR "purescript" "package-sets" - echo $ "Latest tag fetched: " <> releaseTagName + output $ "Latest tag fetched: " <> releaseTagName -- Get spago a new package set if needed. -- So we skip only if the oldTag is the same as the new tag case (maybeOldTag, releaseTagName) of (Just oldTag, newTag) | oldTag == newTag -> pure () (_, newTag) -> do - echo "Found newer tag. Checking if we ever opened a PR about this.." + output "Found newer tag. Checking if we ever opened a PR about this.." let auth = GitHub.OAuth $ Encoding.encodeUtf8 token owner = GitHub.mkName Proxy "spacchetti" repo = GitHub.mkName Proxy "spago" @@ -158,13 +158,13 @@ spagoUpdater token controlChan fetcherChan = go Nothing (GitHub.optionsHead ("spacchetti:" <> branchName) <> GitHub.stateAll) GitHub.FetchAll case oldPRs of - Left err -> echoStr $ "Error: " <> show err - Right prs | not $ Vector.null prs -> echo "PR has been already opened, skipping.." + Left err -> logError $ tshow err + Right prs | not $ Vector.null prs -> output "PR has been already opened, skipping.." Right _ -> do - echo "No previous PRs found, updating package-sets version.." + output "No previous PRs found, updating package-sets version.." -- Sync the repo, commit and push - echo "Pushing new commit (maybe)" + output "Pushing new commit (maybe)" (code, out, err) <- runWithCwd "data/spago" $ List.intercalate " && " [ "git checkout master" , "git pull --rebase" @@ -180,19 +180,19 @@ spagoUpdater token controlChan fetcherChan = go Nothing case code of ExitSuccess -> do - echo "Pushed a new commit, opening PR.." + output "Pushed a new commit, opening PR.." response <- GitHub.executeRequest auth $ GitHub.createPullRequestR owner repo $ GitHub.CreatePullRequest ("Update to package-sets@" <> newTag) "" branchName "master" case response of - Right _ -> echo "Created PR 🎉" - Left err' -> echoStr $ "Error while creating PR: " <> show err' + Right _ -> output "Created PR 🎉" + Left err' -> outputStr $ "Error while creating PR: " <> show err' _ -> do - echo "Something's off. Either there wasn't anything to push or there are errors. Output:" - echo out - echo err + output "Something's off. Either there wasn't anything to push or there are errors. Output:" + output out + output err - echo "Kickstarting the Fetcher.." + output "Kickstarting the Fetcher.." atomically $ Queue.writeTBQueue fetcherChan $ MPackageSetTag releaseTagName go $ Just releaseTagName @@ -201,18 +201,18 @@ fetcher :: MonadIO m => Text -> Queue.TBQueue FetcherMessage -> Queue.TQueue Met fetcher token controlChan metadataChan psChan = liftIO $ forever $ do atomically (Queue.readTBQueue controlChan) >>= \case MPackageSetTag tag -> do - echo "Downloading and parsing package set.." + output "Downloading and parsing package set.." packageSet <- fetchPackageSet tag atomically $ Queue.writeTQueue psChan $ MPackageSet packageSet let packages = Map.toList packageSet - echoStr $ "Fetching metadata for " <> show (length packages) <> " packages" + outputStr $ "Fetching metadata for " <> show (length packages) <> " packages" -- Call GitHub for all these packages and get metadata for them Async.withTaskGroup 10 $ \taskGroup -> do asyncs <- for packages (Async.async taskGroup . fetchRepoMetadata) for asyncs Async.wait - echo "Fetched all metadata." + output "Fetched all metadata." atomically $ Queue.writeTQueue metadataChan MEnd where @@ -231,17 +231,17 @@ fetcher token controlChan metadataChan psChan = liftIO $ forever $ do ownerN = GitHub.mkName Proxy owner repoN = GitHub.mkName Proxy repo - echo $ "Retry " <> tshow rsIterNumber <> ": fetching tags metadata for '" <> owner <> "/" <> repo <> "'.." + output $ "Retry " <> tshow rsIterNumber <> ": fetching tags metadata for '" <> owner <> "/" <> repo <> "'.." Right tagsVec <- GitHub.executeRequest auth $ GitHub.tagsForR ownerN repoN GitHub.FetchAll -- Here we immediately send the latest tag to the PackageSets updater case tagsVec Vector.!? 0 of Nothing -> pure () Just latest -> atomically $ Queue.writeTQueue psChan $ MLatestTag packageName owner $ Tag $ GitHub.tagName latest - echo $ "Retry " <> tshow rsIterNumber <> ": fetching commit metadata for '" <> owner <> "/" <> repo <> "'.." + output $ "Retry " <> tshow rsIterNumber <> ": fetching commit metadata for '" <> owner <> "/" <> repo <> "'.." Right commitsVec <- GitHub.executeRequest auth $ GitHub.commitsForR ownerN repoN GitHub.FetchAll - echo $ "Retry " <> tshow rsIterNumber <> ": fetched commits and tags for '" <> owner <> "/" <> repo <> "'" + output $ "Retry " <> tshow rsIterNumber <> ": fetched commits and tags for '" <> owner <> "/" <> repo <> "'" let !commits = Vector.toList $ fmap (CommitHash . GitHub.untagName . GitHub.commitSha) commitsVec let !tags = Map.fromList $ Vector.toList $ fmap (\t -> @@ -276,7 +276,7 @@ packageSetsUpdater token dataChan = go mempty mempty go packageSet banned = do atomically (Queue.readTQueue dataChan) >>= \case MPackageSet newSet -> do - echo "Received new package set, updating.." + output "Received new package set, updating.." go newSet banned MLatestTag packageName@(PackageName name) owner tag'@(Tag tag) -> do -- First we check if the latest tag is the one in the package set @@ -284,7 +284,7 @@ packageSetsUpdater token dataChan = go mempty mempty -- We're only interested in the case in which the tag in the package set -- is different from the current tag. Just Package{ location = Remote{..}, .. } | version /= tag -> do - echo $ "Found a newer tag for '" <> name <> "': " <> tag + output $ "Found a newer tag for '" <> name <> "': " <> tag let auth = GitHub.OAuth $ Encoding.encodeUtf8 token owner' = GitHub.mkName Proxy "purescript" repo' = GitHub.mkName Proxy "package-sets" @@ -298,23 +298,23 @@ packageSetsUpdater token dataChan = go mempty mempty case (oldPRs, Set.member branchName banned) of (Left err, _) -> do - echoStr $ "Error: " <> show err + logError $ tshow err go packageSet banned (Right prs, _) | not $ Vector.null prs -> do - echo "PR has been already opened once, skipping.." + output "PR has been already opened once, skipping.." go packageSet banned (Right _, True) -> do - echo "Package has failed to verify before, skipping.." + output "Package has failed to verify before, skipping.." go packageSet banned (Right _, False) -> do - echo "No previous PRs found, verifying the addition and eventually committing.." - echo $ "Branch name: " <> branchName + output "No previous PRs found, verifying the addition and eventually committing.." + output $ "Branch name: " <> branchName withAST ("data/package-sets/src/groups/" <> Text.toLower owner <> ".dhall") $ updateVersion packageName tag' newBanned <- Temp.withTempDirectory "data/package-sets" "spacchettibotti-" $ \tempDir -> do - echoStr $ "Tempdir: " <> tempDir + outputStr $ "Tempdir: " <> tempDir (code, out, err) <- runWithCwd "data/package-sets" $ List.intercalate " && " [ "git checkout master" @@ -336,21 +336,21 @@ packageSetsUpdater token dataChan = go mempty mempty case code of ExitSuccess -> do - echo "Pushed a new commit, opening PR.." + output "Pushed a new commit, opening PR.." let releaseLink = "https://github.com/" <> owner <> "/purescript-" <> name <> "/releases/tag/" <> tag body = "The addition has been verified by running `spago verify-set` in a clean project, so this is safe to merge.\n\nLink to release: " <> releaseLink response <- GitHub.executeRequest auth $ GitHub.createPullRequestR owner' repo' $ GitHub.CreatePullRequest ("Update " <> name <> " to " <> tag) body branchName "master" case response of - Right _ -> echo "Created PR 🎉" - Left err' -> echoStr $ "Error while creating PR: " <> show err' + Right _ -> output "Created PR 🎉" + Left err' -> outputStr $ "Error while creating PR: " <> show err' pure banned _ -> do - echo "Something's off. Either there wasn't anything to push or there are errors. Output:" - echo out - echo err - echo "Reverting changes.." + output "Something's off. Either there wasn't anything to push or there are errors. Output:" + output out + output err + output "Reverting changes.." runWithCwd "data/package-sets" "git checkout -- src/groups && git checkout master" -- IMPORTANT: add the package to the banned ones so we don't reverify every time pure $ Set.insert branchName banned @@ -368,12 +368,12 @@ metadataUpdater dataChan = go mempty go $ Map.insert packageName meta state MEnd -> do -- Write the metadata to file - echo "Writing metadata to file.." + output "Writing metadata to file.." BSL.writeFile "data/package-sets-metadata/metadataV1new.json" $ encodePretty state - echo "Done." + output "Done." -- Sync the repo, commit and push - echo "Pushing new commit (maybe)" + output "Pushing new commit (maybe)" (code, out, err) <- runWithCwd "data/package-sets-metadata" $ List.intercalate " && " [ "git checkout master" , "git pull --rebase" @@ -385,11 +385,11 @@ metadataUpdater dataChan = go mempty ] case code of - ExitSuccess -> echo "Pushed a new commit!" + ExitSuccess -> output "Pushed a new commit!" _ -> do - echo "Something's off. Either there wasn't anything to push or there are errors. Output:" - echo out - echo err + output "Something's off. Either there wasn't anything to push or there are errors. Output:" + output out + output err go state @@ -404,10 +404,10 @@ withAST :: MonadIO m => Text -> (Expr -> m Expr) -> m () withAST path transform = do rawConfig <- liftIO $ Dhall.readRawExpr path case rawConfig of - Nothing -> echo $ "Could not find file " <> path + Nothing -> output $ "Could not find file " <> path Just (header, expr) -> do newExpr <- transformMExpr transform expr - echo $ "Done. Updating the \"" <> path <> "\" file.." + output $ "Done. Updating the \"" <> path <> "\" file.." writeTextFile path $ Dhall.prettyWithHeader header newExpr <> "\n" liftIO $ Dhall.format path where diff --git a/src/Spago/Bower.hs b/src/Spago/Bower.hs index 20c55e864..14139a189 100644 --- a/src/Spago/Bower.hs +++ b/src/Spago/Bower.hs @@ -47,7 +47,7 @@ runBower args = do generateBowerJson :: Spago m => m ByteString.ByteString generateBowerJson = do - echo "Generating a new Bower config using the package set versions.." + output "Generating a new Bower config using the package set versions.." config@Config{..} <- Config.ensureConfig PublishConfig{..} <- throws publishConfig @@ -68,13 +68,13 @@ generateBowerJson = do when ignored $ do die $ path <> " is being ignored by git - change this before continuing" - echo "Generated a valid Bower config using the package set" + output "Generated a valid Bower config using the package set" pure bowerJson runBowerInstall :: Spago m => m () runBowerInstall = do - echo "Running `bower install` so `pulp publish` can read resolved versions from it" + output "Running `bower install` so `pulp publish` can read resolved versions from it" shell "bower install --silent" empty >>= \case ExitSuccess -> pure () ExitFailure _ -> die "Failed to run `bower install` on your package" diff --git a/src/Spago/Build.hs b/src/Spago/Build.hs index 9d1fff931..79c4e86b9 100644 --- a/src/Spago/Build.hs +++ b/src/Spago/Build.hs @@ -83,7 +83,7 @@ prepareBundleDefaults maybeModuleName maybeTargetPath = (moduleName, targetPath) -- eventually running some other action after the build build :: Spago m => BuildOptions -> Maybe (m ()) -> m () build buildOpts@BuildOptions{..} maybePostBuild = do - echoDebug "Running `spago build`" + logDebug "Running `spago build`" config@Config.Config{ packageSet = Types.PackageSet{..}, ..} <- Config.ensureConfig deps <- Packages.getProjectDeps config case noInstall of @@ -117,7 +117,7 @@ build buildOpts@BuildOptions{..} maybePostBuild = do case NonEmpty.nonEmpty (psMismatches <> jsMismatches) of Nothing -> pure () - Just mismatches -> echo $ Messages.globsDoNotMatchWhenWatching $ NonEmpty.nub $ Text.pack <$> mismatches + Just mismatches -> output $ Messages.globsDoNotMatchWhenWatching $ NonEmpty.nub $ Text.pack <$> mismatches absolutePSGlobs <- traverse makeAbsolute psMatches absoluteJSGlobs <- traverse makeAbsolute jsMatches @@ -152,7 +152,7 @@ repl -> Packages.DepsOnly -> m () repl cacheFlag newPackages sourcePaths pursArgs depsOnly = do - echoDebug "Running `spago repl`" + logDebug "Running `spago repl`" try Config.ensureConfig >>= \case Right config@Config.Config{..} -> do @@ -160,7 +160,7 @@ repl cacheFlag newPackages sourcePaths pursArgs depsOnly = do let globs = Packages.getGlobs deps depsOnly configSourcePaths <> sourcePaths Purs.repl globs pursArgs Left (err :: SomeException) -> do - echoDebug $ tshow err + logDebug $ tshow err cacheDir <- GlobalCache.getGlobalCacheDir Temp.withTempDirectory cacheDir "spago-repl-tmp" $ \dir -> do Turtle.cd (Turtle.decodeString dir) @@ -205,7 +205,7 @@ runBackend -> [Purs.ExtraArg] -> m () runBackend maybeBackend defaultModuleName maybeSuccessMessage failureMessage maybeModuleName buildOpts extraArgs = do - echoDebug $ "Running with backend: " <> fromMaybe "nodejs" maybeBackend + logDebug $ "Running with backend: " <> fromMaybe "nodejs" maybeBackend let postBuild = maybe (nodeAction =<< getOutputPath buildOpts) backendAction maybeBackend build buildOpts (Just postBuild) where @@ -216,15 +216,15 @@ runBackend maybeBackend defaultModuleName maybeSuccessMessage failureMessage may in "#!/usr/bin/env node\n\n" <> "require('../" <> Text.pack path <> "/" <> Purs.unModuleName moduleName <> "').main()" nodeCmd = "node .spago/run.js " <> nodeArgs nodeAction outputPath' = do - echoDebug "Writing .spago/run.js" + logDebug "Writing .spago/run.js" writeTextFile ".spago/run.js" (nodeContents outputPath') chmod executable ".spago/run.js" shell nodeCmd empty >>= \case - ExitSuccess -> maybe (pure ()) echo maybeSuccessMessage + ExitSuccess -> maybe (pure ()) output maybeSuccessMessage ExitFailure n -> die $ failureMessage <> "exit code: " <> repr n backendAction backend = Turtle.proc backend (["--run" {-, Purs.unModuleName moduleName-}] <> fmap Purs.unExtraArg extraArgs) empty >>= \case - ExitSuccess -> maybe (pure ()) echo maybeSuccessMessage + ExitSuccess -> maybe (pure ()) output maybeSuccessMessage ExitFailure n -> die $ failureMessage <> "Backend " <> surroundQuote backend <> " exited with error:" <> repr n -- | Bundle the project to a js file @@ -252,18 +252,18 @@ bundleModule -> BuildOptions -> m () bundleModule maybeModuleName maybeTargetPath noBuild buildOpts = do - echoDebug "Running `bundleModule`" + logDebug "Running `bundleModule`" let (moduleName, targetPath) = prepareBundleDefaults maybeModuleName maybeTargetPath jsExport = Text.unpack $ "\nmodule.exports = PS[\""<> Purs.unModuleName moduleName <> "\"];" bundleAction = do - echo "Bundling first..." + output "Bundling first..." Purs.bundle Purs.WithoutMain moduleName targetPath -- Here we append the CommonJS export line at the end of the bundle try (with (appendonly $ pathFromText $ Purs.unTargetPath targetPath) (flip hPutStrLn jsExport)) >>= \case - Right _ -> echo $ "Make module succeeded and output file to " <> Purs.unTargetPath targetPath + Right _ -> output $ "Make module succeeded and output file to " <> Purs.unTargetPath targetPath Left (n :: SomeException) -> die $ "Make module failed: " <> repr n case noBuild of DoBuild -> build buildOpts (Just bundleAction) @@ -287,29 +287,29 @@ docs -> OpenDocs -> m () docs format sourcePaths depsOnly noSearch open = do - echoDebug "Running `spago docs`" + logDebug "Running `spago docs`" config@Config.Config{..} <- Config.ensureConfig deps <- Packages.getProjectDeps config - echo "Generating documentation for the project. This might take a while..." + output "Generating documentation for the project. This might take a while..." Purs.docs docsFormat $ Packages.getGlobs deps depsOnly configSourcePaths <> sourcePaths when isHTMLFormat $ do when (noSearch == AddSearch) $ do - echo "Making the documentation searchable..." + output "Making the documentation searchable..." writeTextFile ".spago/purescript-docs-search" Templates.docsSearch writeTextFile ".spago/docs-search-app.js" Templates.docsSearchApp let cmd = "node .spago/purescript-docs-search build-index" - echoDebug $ "Running `" <> cmd <> "`" + logDebug $ "Running `" <> cmd <> "`" shell cmd empty >>= \case ExitSuccess -> pure () - ExitFailure n -> echo $ "Failed while trying to make the documentation searchable: " <> repr n + ExitFailure n -> output $ "Failed while trying to make the documentation searchable: " <> repr n link <- linkToIndexHtml let linkText = "Link: " <> link - echo linkText + output linkText when (open == DoOpenDocs) $ do - echo "Opening in browser..." + output "Opening in browser..." () <$ openLink link where @@ -328,7 +328,7 @@ search = do config@Config.Config{..} <- Config.ensureConfig deps <- Packages.getProjectDeps config - echo "Building module metadata..." + output "Building module metadata..." Purs.compile (Packages.getGlobs deps Packages.AllSources configSourcePaths) [ Purs.ExtraArg "--codegen" @@ -337,7 +337,7 @@ search = do writeTextFile ".spago/purescript-docs-search" Templates.docsSearch let cmd = "node .spago/purescript-docs-search search" - echoDebug $ "Running `" <> cmd <> "`" + logDebug $ "Running `" <> cmd <> "`" viewShell $ callCommand $ Text.unpack cmd @@ -392,7 +392,7 @@ getBuildArgsForSharedFolder buildOpts = do = Purs.ExtraArg . Text.pack . ("--output " <>) if any isOutputFlag pursArgs' then do - echo "Output path set explicitly - not using shared output path" + output "Output path set explicitly - not using shared output path" pure pursArgs' else do outputFolder <- getOutputPath buildOpts diff --git a/src/Spago/Config.hs b/src/Spago/Config.hs index 89ad52005..7ad5891eb 100644 --- a/src/Spago/Config.hs +++ b/src/Spago/Config.hs @@ -182,9 +182,9 @@ makeConfig force comments = do -- first, read the psc-package file content content <- readTextFile PscPackage.configPath case eitherDecodeStrict $ Text.encodeUtf8 content of - Left err -> echo $ Messages.failedToReadPscFile err + Left err -> output $ Messages.failedToReadPscFile err Right pscConfig -> do - echo "Found a \"psc-package.json\" file, migrating to a new Spago config.." + output "Found a \"psc-package.json\" file, migrating to a new Spago config.." -- try to update the dependencies (will fail if not found in package set) let pscPackages = map PackageSet.PackageName $ PscPackage.depends pscConfig config <- ensureConfig @@ -196,7 +196,7 @@ makeConfig force comments = do case eitherDecodeStrict $ Text.encodeUtf8 content of Left err -> die $ Messages.failedToParseFile path err Right packageMeta -> do - echo "Found a \"bower.json\" file, migrating to a new Spago config.." + output "Found a \"bower.json\" file, migrating to a new Spago config.." -- then try to update the dependencies. We'll migrates the ones that we can, -- and print a message to the user to fix the missing ones config@Config{..} <- ensureConfig @@ -206,10 +206,10 @@ makeConfig force comments = do if null bowerErrors then do - echo "All Bower dependencies are in the set! 🎉" - echo $ "You can now safely delete your " <> surroundQuote "bower.json" + output "All Bower dependencies are in the set! 🎉" + output $ "You can now safely delete your " <> surroundQuote "bower.json" else do - echo $ showBowerErrors bowerErrors + output $ showBowerErrors bowerErrors void $ withConfigAST (\e -> addRawDeps config bowerPackages $ updateName bowerName e) @@ -297,7 +297,7 @@ addRawDeps config newPackages r@(Dhall.RecordLit kvs) = case Dhall.Map.lookup "d $ Seq.sort $ nubSeq (Seq.fromList newPackages <> fmap PackageSet.PackageName oldPackages) pure $ Dhall.RecordLit $ Dhall.Map.insert "dependencies" newDepsExpr kvs Just pkgs -> do - echo $ Messages.failedToAddDeps $ NonEmpty.map PackageSet.packageName pkgs + output $ Messages.failedToAddDeps $ NonEmpty.map PackageSet.packageName pkgs pure r where packagesDB = PackageSet.packagesDB $ packageSet config @@ -309,10 +309,10 @@ addRawDeps config newPackages r@(Dhall.RecordLit kvs) = case Dhall.Map.lookup "d where seens = Seq.scanl (flip Set.insert) Set.empty xs Just _ -> do - echo "WARNING: Failed to add dependencies. The `dependencies` field wasn't a List of Strings." + logWarning "Failed to add dependencies. The `dependencies` field wasn't a List of Strings." pure r Nothing -> do - echo "WARNING: Failed to add dependencies. You should have a record with the `dependencies` key for this to work." + logWarning "Failed to add dependencies. You should have a record with the `dependencies` key for this to work." pure r addRawDeps _ _ other = pure other @@ -356,7 +356,7 @@ withConfigAST transform = do let exprHasChanged = Dhall.Core.denote expr /= newExpr if exprHasChanged then liftIO $ Dhall.writeRawExpr path (header, newExpr) - else echoDebug "Transformed config is the same as the read one, not overwriting it" + else logDebug "Transformed config is the same as the read one, not overwriting it" pure exprHasChanged @@ -380,4 +380,4 @@ addDependencies :: Spago m => Config -> [PackageName] -> m () addDependencies config newPackages = do configHasChanged <- withConfigAST $ addRawDeps config newPackages unless configHasChanged $ - echo "WARNING: configuration file was not updated." + logWarning "configuration file was not updated." diff --git a/src/Spago/DryRun.hs b/src/Spago/DryRun.hs index e674f8171..a7f96e06c 100644 --- a/src/Spago/DryRun.hs +++ b/src/Spago/DryRun.hs @@ -19,10 +19,10 @@ data DryAction m runDryActions :: Spago m => DryRun -> NonEmpty (DryAction m) -> m () runDryActions DryRun dryActions = do - echo "\nWARNING: this is a dry run, so these side effects were not performed:" - for_ dryActions $ \DryAction{..} -> echo $ "* " <> dryMessage - echo "\nUse the `--no-dry-run` flag to run them" + logWarning "this is a dry run, so these side effects were not performed:" + for_ dryActions $ \DryAction{..} -> output $ "* " <> dryMessage + output "\nUse the `--no-dry-run` flag to run them" runDryActions NoDryRun dryActions = do for_ dryActions $ \DryAction{..} -> do - echo $ "** Running action: " <> dryMessage + output $ "** Running action: " <> dryMessage dryAction diff --git a/src/Spago/FetchPackage.hs b/src/Spago/FetchPackage.hs index f2811f500..5f31e9fae 100644 --- a/src/Spago/FetchPackage.hs +++ b/src/Spago/FetchPackage.hs @@ -42,7 +42,7 @@ fetchPackages -> Maybe Version.SemVer -> m () fetchPackages globalCacheFlag allDeps minPursVersion = do - echoDebug "Running `fetchPackages`" + logDebug "Running `fetchPackages`" PackageSet.checkPursIsUpToDate minPursVersion @@ -60,7 +60,7 @@ fetchPackages globalCacheFlag allDeps minPursVersion = do -- Note: it might be empty depending on the cacheFlag let nOfDeps = List.length depsToFetch when (nOfDeps > 0) $ do - echoStr $ "Installing " <> show nOfDeps <> " dependencies." + outputStr $ "Installing " <> show nOfDeps <> " dependencies." metadata <- GlobalCache.getMetadata globalCacheFlag limit <- asks globalJobs @@ -68,7 +68,7 @@ fetchPackages globalCacheFlag allDeps minPursVersion = do asyncs <- for depsToFetch (async' taskGroup . fetchPackage metadata) liftIO $ handle (handler asyncs) (for_ asyncs Async.wait) - echo "Installation complete." + output "Installation complete." where -- Here we have this weird exception handling so that threads can clean after @@ -94,9 +94,9 @@ fetchPackages globalCacheFlag allDeps minPursVersion = do -- If it's a local directory do nothing fetchPackage :: Spago m => GlobalCache.ReposMetadataV1 -> (PackageName, Package) -> m () fetchPackage _ (PackageName package, Package { location = Local{..}, .. }) = - echo $ Messages.foundLocalPackage package localPath + output $ Messages.foundLocalPackage package localPath fetchPackage metadata pair@(packageName'@PackageName{..}, Package{ location = Remote{..}, .. } ) = do - echoDebug $ "Fetching package " <> packageName + logDebug $ "Fetching package " <> packageName globalDir <- GlobalCache.getGlobalCacheDir let packageDir = getPackageDir packageName' version packageGlobalCacheDir = globalDir packageDir @@ -110,7 +110,7 @@ fetchPackage metadata pair@(packageName'@PackageName{..}, Package{ location = Re -- * if a Package is in the global cache, copy it to the local cache if inGlobalCache then do - echo $ "Copying from global cache: " <> quotedName + output $ "Copying from global cache: " <> quotedName cptree packageGlobalCacheDir downloadDir assertDirectory (localCacheDir Text.unpack packageName) mv downloadDir packageLocalCacheDir @@ -123,18 +123,18 @@ fetchPackage metadata pair@(packageName'@PackageName{..}, Package{ location = Re -- then atomically move it to the correct cache location. Since -- `mv` will not move folders across filesystems, this temp -- is created inside globalDir, guaranteeing the same filesystem. - echo $ "Installing and globally caching " <> quotedName + output $ "Installing and globally caching " <> quotedName let resultDir2 = globalTemp "download2" assertDirectory resultDir2 cptree resultDir resultDir2 catch (mv resultDir2 packageGlobalCacheDir) $ \(err :: SomeException) -> - echoDebug $ Messages.failedToCopyToGlobalCache err + output $ Messages.failedToCopyToGlobalCache err mv resultDir packageLocalCacheDir -- * if not, run a series of git commands to get the code, and move it to local cache let nonCacheableCallback :: Spago m => m () nonCacheableCallback = do - echo $ "Installing " <> quotedName + output $ "Installing " <> quotedName -- Here we set the package directory as the cwd of the new process. -- This is the "right" way to do it (instead of using e.g. diff --git a/src/Spago/Git.hs b/src/Spago/Git.hs index bd9d8900d..75fe9feae 100644 --- a/src/Spago/Git.hs +++ b/src/Spago/Git.hs @@ -24,7 +24,7 @@ hasCleanWorkingTree = do (code, stdout, stderr) <- Turtle.procStrictWithErr "git" ["status", "--porcelain"] empty when (code /= ExitSuccess) $ do - echoDebug $ "git status stderr: " <> stderr + logDebug $ "git status stderr: " <> stderr die "Unable to check git status. Perhaps git is not installed or this is not a git repository?" pure $ stdout == "" diff --git a/src/Spago/GitHub.hs b/src/Spago/GitHub.hs index 89d51313a..78269e595 100644 --- a/src/Spago/GitHub.hs +++ b/src/Spago/GitHub.hs @@ -28,9 +28,9 @@ login = do case maybeToken of Nothing -> die Messages.getNewGitHubToken Just (Text.pack -> token) -> do - echo "Token read, authenticating with GitHub.." + output "Token read, authenticating with GitHub.." username <- getUsername token - echo $ "Successfully authenticated as " <> surroundQuote username + output $ "Successfully authenticated as " <> surroundQuote username writeTextFile (Text.pack $ globalCacheDir tokenCacheFile) token where getUsername token = do @@ -64,7 +64,7 @@ getLatestPackageSetsTag = do let readTagCache = try $ readTextFile $ pathFromText $ Text.pack globalPathToCachedTag let downloadTagToCache = try (Retry.recoverAll (Retry.fullJitterBackoff 50000 <> Retry.limitRetries 5) $ \_ -> getLatestRelease1 <|> getLatestRelease2) >>= \case - Left (err :: SomeException) -> echoDebug $ Messages.failedToReachGitHub err + Left (err :: SomeException) -> logDebug $ Messages.failedToReachGitHub err Right releaseTagName -> writeTagCache releaseTagName whenM (shouldRefreshFile globalPathToCachedTag) downloadTagToCache @@ -78,14 +78,14 @@ getLatestPackageSetsTag = do f <- case hush maybeToken of Nothing -> pure GitHub.executeRequest' Just token -> do - echoDebug "Using cached GitHub token for getting the latest release.." + logDebug "Using cached GitHub token for getting the latest release.." pure $ GitHub.executeRequest (GitHub.OAuth $ Data.Text.Encoding.encodeUtf8 token) result <- liftIO $ f $ GitHub.latestReleaseR "purescript" "package-sets" case result of Right GitHub.Release{..} -> return releaseTagName Left err -> do - echo $ Messages.failedToReachGitHub err + logWarning $ Messages.failedToReachGitHub err empty -- | The idea here is that we go to the `latest` endpoint, and then get redirected @@ -101,5 +101,5 @@ getLatestPackageSetsTag = do case Http.getResponseHeader "Location" response of [redirectUrl] -> return $ last $ Text.splitOn "/" $ Data.Text.Encoding.decodeUtf8 redirectUrl _ -> do - echoStr $ "Error following GitHub redirect, response:\n\n" <> show response + outputStr $ "Error following GitHub redirect, response:\n\n" <> show response empty diff --git a/src/Spago/GlobalCache.hs b/src/Spago/GlobalCache.hs index f2d3e3dd9..e12920272 100644 --- a/src/Spago/GlobalCache.hs +++ b/src/Spago/GlobalCache.hs @@ -50,7 +50,7 @@ globallyCache -> (m ()) -> m () globallyCache (packageName, Repo url, ref) downloadDir metadata cacheableCallback notCacheableCallback = do - echoDebug $ "Running `globallyCache`: " <> tshow packageName <> " " <> url <> " " <> ref + logDebug $ "Running `globallyCache`: " <> tshow packageName <> " " <> url <> " " <> ref case (Text.stripPrefix "https://github.com/" url) >>= (Text.stripSuffix ".git") >>= (Just . Text.split (== '/')) of @@ -59,13 +59,13 @@ globallyCache (packageName, Repo url, ref) downloadDir metadata cacheableCallbac Nothing -> notCacheableCallback -- TODO: nice error? Just _ -> do let archiveUrl = "https://github.com/" <> owner <> "/" <> repo <> "/archive/" <> ref <> ".tar.gz" - echoDebug $ "About to fetch tarball for " <> archiveUrl + logDebug $ "About to fetch tarball for " <> archiveUrl fetchTarball downloadDir archiveUrl Just resultDir <- Turtle.fold (Turtle.ls $ Turtle.decodeString downloadDir) Fold.head cacheableCallback $ Turtle.encodeString resultDir where _ -> do - echo $ "WARNING: Not caching repo, because URL doesn't have the form of 'https://github.com//.git': " <> url + logWarning $ "Not caching repo, because URL doesn't have the form of 'https://github.com//.git': " <> url notCacheableCallback -- TODO: error? where isTag = do @@ -83,11 +83,11 @@ globallyCache (packageName, Repo url, ref) downloadDir metadata cacheableCallbac -- | Download the GitHub Index cache from the `package-sets-metadata` repo getMetadata :: Spago m => Maybe CacheFlag -> m ReposMetadataV1 getMetadata cacheFlag = do - echoDebug "Running `getMetadata`" + logDebug "Running `getMetadata`" globalCacheDir <- getGlobalCacheDir - echoDebug $ "Global cache directory: " <> Text.pack globalCacheDir + logDebug $ "Global cache directory: " <> Text.pack globalCacheDir let metaURL = "https://raw.githubusercontent.com/spacchetti/package-sets-metadata/master/metadataV1.json" @@ -100,14 +100,14 @@ getMetadata cacheFlag = do downloadMeta = handleAny (\err -> do - echoDebug $ "Metadata fetch failed with exception: " <> tshow err - echo "WARNING: Unable to download GitHub metadata, global cache will be disabled" + logDebug $ "Metadata fetch failed with exception: " <> tshow err + output "WARNING: Unable to download GitHub metadata, global cache will be disabled" pure mempty) (do metaBS <- Http.getResponseBody `fmap` Http.httpBS metaURL case decodeStrict' metaBS of Nothing -> do - echo "WARNING: Unable to parse GitHub metadata, global cache will be disabled" + logWarning "Unable to parse GitHub metadata, global cache will be disabled" pure mempty Just meta -> do assertDirectory globalCacheDir @@ -119,21 +119,21 @@ getMetadata cacheFlag = do Just SkipCache -> pure mempty -- If we need to download a new cache we can skip checking the local filesystem Just NewCache -> do - echo "Downloading a new packages cache metadata from GitHub.." + output "Downloading a new packages cache metadata from GitHub.." downloadMeta -- Otherwise we check first Nothing -> do - echo "Searching for packages cache metadata.." + output "Searching for packages cache metadata.." -- Check if the metadata is in global cache and fresher than 1 day shouldRefreshFile globalPathToMeta >>= \case -- If we should not download it, read from file False -> do - echo "Recent packages cache metadata found, using it.." + output "Recent packages cache metadata found, using it.." fmap maybeToMonoid $ liftIO $ decodeFileStrict globalPathToMeta -- Otherwise download it, write it to file, and return it True -> do - echo "Unable to find packages cache metadata, downloading from GitHub.." + output "Unable to find packages cache metadata, downloading from GitHub.." downloadMeta @@ -144,14 +144,14 @@ getMetadata cacheFlag = do -- - (on Windows) the folder pointed by `LocalAppData` getGlobalCacheDir :: Spago m => m FilePath.FilePath getGlobalCacheDir = do - echoDebug "Running `getGlobalCacheDir`" + logDebug "Running `getGlobalCacheDir`" getXdgDirectory XdgCache "spago" <|> pure ".spago-global-cache" -- | Fetch the tarball at `archiveUrl` and unpack it into `destination` fetchTarball :: Spago m => FilePath.FilePath -> Text -> m () fetchTarball destination archiveUrl = do - echoDebug $ "Fetching " <> archiveUrl + logDebug $ "Fetching " <> archiveUrl tarballUrl <- Http.parseRequest $ Text.unpack archiveUrl lbs <- fmap Http.getResponseBody (Http.httpLBS tarballUrl) liftIO $ Tar.unpack destination $ Tar.read $ GZip.decompress lbs diff --git a/src/Spago/Messages.hs b/src/Spago/Messages.hs index e265c1a42..4a91094e1 100644 --- a/src/Spago/Messages.hs +++ b/src/Spago/Messages.hs @@ -120,9 +120,9 @@ failedToParseFile file err = makeMessage ] failedToParseCommandOutput :: Text -> Text -> Text -failedToParseCommandOutput command output = makeMessage +failedToParseCommandOutput command outputText = makeMessage [ "Failed to parse '" <> command <> "' output: " - , surroundQuote output + , surroundQuote outputText ] failedToReachGitHub :: Show a => a -> Text diff --git a/src/Spago/PackageSet.hs b/src/Spago/PackageSet.hs index 2d1cdf89d..cbac65f39 100644 --- a/src/Spago/PackageSet.hs +++ b/src/Spago/PackageSet.hs @@ -35,7 +35,7 @@ makePackageSetFile force comments = do hasPackagesDhall <- testfile packagesPath if force || not hasPackagesDhall then writeTextFile packagesPath $ Dhall.processComments comments Templates.packagesDhall - else echo $ Messages.foundExistingProject packagesPath + else output $ Messages.foundExistingProject packagesPath Dhall.format packagesPath @@ -48,19 +48,19 @@ makePackageSetFile force comments = do -- - if all of this succeeds, it will regenerate the hashes and write to file upgradePackageSet :: Spago m => m () upgradePackageSet = do - echoDebug "Running `spago upgrade-set`" + logDebug "Running `spago upgrade-set`" GitHub.getLatestPackageSetsTag >>= \case Right tag -> updateTag tag Left (err :: SomeException) -> do - echo "WARNING: was not possible to upgrade the package-sets release" - echoDebug $ "Error: " <> tshow err + output "WARNING: was not possible to upgrade the package-sets release" + logDebug $ "Error: " <> tshow err where updateTag :: Spago m => Text -> m () updateTag releaseTagName = do let quotedTag = surroundQuote releaseTagName - echoDebug $ "Found the most recent tag for \"purescript/package-sets\": " <> quotedTag + logDebug $ "Found the most recent tag for \"purescript/package-sets\": " <> quotedTag rawPackageSet <- liftIO $ Dhall.readRawExpr packagesPath case rawPackageSet of Nothing -> die Messages.cannotFindPackages @@ -68,11 +68,11 @@ upgradePackageSet = do Just (_, expr) | (currentTag:_) <- foldMap getCurrentTag expr , currentTag == releaseTagName - -> echo $ "Skipping package set version upgrade, already on latest version: " <> quotedTag + -> output $ "Skipping package set version upgrade, already on latest version: " <> quotedTag Just (header, expr) -> do - echo $ "Upgrading the package set version to " <> quotedTag + output $ "Upgrading the package set version to " <> quotedTag let newExpr = fmap (upgradeImports releaseTagName) expr - echo $ Messages.upgradingPackageSet releaseTagName + output $ Messages.upgradingPackageSet releaseTagName liftIO $ Dhall.writeRawExpr packagesPath (header, newExpr) -- If everything is fine, refreeze the imports freeze packagesPath @@ -175,13 +175,13 @@ upgradePackageSet = do checkPursIsUpToDate :: Spago m => Maybe Version.SemVer -> m () checkPursIsUpToDate packagesMinPursVersion = do - echoDebug "Checking if `purs` is up to date" + logDebug "Checking if `purs` is up to date" maybeCompilerVersion <- Purs.version case (maybeCompilerVersion, packagesMinPursVersion) of (Just compilerVersion, Just pursVersionFromPackageSet) -> performCheck compilerVersion pursVersionFromPackageSet other -> do - echo "WARNING: unable to parse compiler and package set versions, not checking if `purs` is compatible with it.." - echoDebug $ "Versions we got: " <> tshow other + logWarning "unable to parse compiler and package set versions, not checking if `purs` is compatible with it.." + logDebug $ "Versions we got: " <> tshow other where -- | The check is successful only when the installed compiler is "slightly" -- greater (or equal of course) to the minimum version. E.g. fine cases are: @@ -237,7 +237,7 @@ rootPackagePath _ = Nothing -- | so we build into an output folder where our root packages.dhall lives findRootOutputPath :: Spago m => System.IO.FilePath -> m (Maybe System.IO.FilePath) findRootOutputPath path = do - echoDebug "Locating root path of packages.dhall" + logDebug "Locating root path of packages.dhall" imports <- liftIO $ Dhall.readImports $ Text.pack path let localImports = mapMaybe rootPackagePath imports pure $ flip System.FilePath.replaceFileName "output" <$> findRootPath localImports @@ -249,7 +249,7 @@ findRootPath = Safe.minimumByMay (comparing (length . System.FilePath.splitSearc -- | Freeze the package set remote imports so they will be cached freeze :: Spago m => System.IO.FilePath -> m () freeze path = do - echo Messages.freezePackageSet + output Messages.freezePackageSet liftIO $ Dhall.Freeze.freeze (Dhall.InputFile path) @@ -262,10 +262,10 @@ freeze path = do -- | Freeze the file if any of the remote imports are not frozen ensureFrozen :: Spago m => System.IO.FilePath -> m () ensureFrozen path = do - echoDebug "Ensuring that the package set is frozen" + logDebug "Ensuring that the package set is frozen" imports <- liftIO $ Dhall.readImports $ Text.pack path let areRemotesFrozen = foldMap isRemoteFrozen imports case areRemotesFrozen of - [] -> echo Messages.failedToCheckPackageSetFrozen + [] -> output Messages.failedToCheckPackageSetFrozen remotes -> unless (and remotes) $ traverse_ (maybe (pure ()) freeze . localImportPath) imports diff --git a/src/Spago/Packages.hs b/src/Spago/Packages.hs index 7a8c843bb..4ea9dc94a 100644 --- a/src/Spago/Packages.hs +++ b/src/Spago/Packages.hs @@ -48,7 +48,7 @@ import Spago.Types as PackageSet -- - create an example `test` folder (if needed) initProject :: Spago m => Bool -> Dhall.TemplateComments -> m () initProject force comments = do - echo "Initializing a sample project or migrating an existing one.." + output "Initializing a sample project or migrating an existing one.." -- packages.dhall and spago.dhall overwrite can be forced PackageSet.makePackageSetFile force comments @@ -68,22 +68,22 @@ initProject force comments = do copyIfNotExists ".gitignore" Templates.gitignore - echo "Set up a local Spago project." - echo "Try running `spago build`" + output "Set up a local Spago project." + output "Try running `spago build`" where whenDirNotExists dir action = do let dirPath = pathFromText dir dirExists <- testdir dirPath case dirExists of - True -> echo $ Messages.foundExistingDirectory dir + True -> output $ Messages.foundExistingDirectory dir False -> do mktree dirPath action copyIfNotExists dest srcTemplate = do testfile dest >>= \case - True -> echo $ Messages.foundExistingFile dest + True -> output $ Messages.foundExistingFile dest False -> writeTextFile dest srcTemplate @@ -131,7 +131,7 @@ getProjectDeps Config{..} = getTransitiveDeps packageSet dependencies -- | Return the transitive dependencies of a list of packages getTransitiveDeps :: Spago m => PackageSet -> [PackageName] -> m [(PackageName, Package)] getTransitiveDeps PackageSet{..} deps = do - echoDebug "Getting transitive deps" + logDebug "Getting transitive deps" let (packageMap, notFoundErrors, cycleErrors) = State.evalState (fold <$> traverse (go mempty) deps) mempty handleErrors (Map.toList packageMap) (Set.toList notFoundErrors) (Set.toList cycleErrors) @@ -193,7 +193,7 @@ getReverseDeps packageSet@PackageSet{..} dep = do -- | Fetch all dependencies into `.spago/` install :: Spago m => Maybe CacheFlag -> [PackageName] -> m () install cacheFlag newPackages = do - echoDebug "Running `spago install`" + logDebug "Running `spago install`" config@Config{ packageSet = PackageSet{..}, ..} <- Config.ensureConfig existingNewPackages <- reportMissingPackages $ classifyPackages packagesDB newPackages @@ -218,7 +218,7 @@ reportMissingPackages (PackagesLookupResult found foundWithoutPrefix notFound) = <> (Text.intercalate "\n" . fmap (\(NotFoundError p) -> " - " <> packageName p) $ List.sort notFound) for_ foundWithoutPrefix $ \(FoundWithoutPrefix sansPrefix) -> - echo $ "WARNING: the package 'purescript-" <> packageName sansPrefix <> "' was not found in your package set, but '" + output $ "WARNING: the package 'purescript-" <> packageName sansPrefix <> "' was not found in your package set, but '" <> packageName sansPrefix <> "' was. Using that instead." pure found @@ -269,7 +269,7 @@ encodeJsonPackageOutput = LT.toStrict . LT.decodeUtf8 . Aeson.encode -- | A list of the packages that can be added to this project listPackages :: Spago m => Maybe PackagesFilter -> JsonFlag -> m () listPackages packagesFilter jsonFlag = do - echoDebug "Running `listPackages`" + logDebug "Running `listPackages`" Config{packageSet = packageSet@PackageSet{..}, ..} <- Config.ensureConfig packagesToList :: [(PackageName, Package)] <- case packagesFilter of Nothing -> pure $ Map.toList packagesDB @@ -278,8 +278,8 @@ listPackages packagesFilter jsonFlag = do $ Map.restrictKeys packagesDB (Set.fromList dependencies) case packagesToList of - [] -> echo "There are no dependencies listed in your spago.dhall" - _ -> traverse_ echo $ formatPackageNames packagesToList + [] -> output "There are no dependencies listed in your spago.dhall" + _ -> traverse_ output $ formatPackageNames packagesToList where formatPackageNames = case jsonFlag of @@ -332,10 +332,10 @@ listPackages packagesFilter jsonFlag = do -- | Get source globs of dependencies listed in `spago.dhall` sources :: Spago m => m () sources = do - echoDebug "Running `spago sources`" + logDebug "Running `spago sources`" config <- Config.ensureConfig deps <- getProjectDeps config - traverse_ echo + traverse_ output $ fmap Purs.unSourcePath $ getGlobs deps AllSources $ Config.configSourcePaths config @@ -345,7 +345,7 @@ data CheckModulesUnique = DoCheckModulesUnique | NoCheckModulesUnique verify :: Spago m => Maybe CacheFlag -> CheckModulesUnique -> Maybe PackageName -> m () verify cacheFlag chkModsUniq maybePackage = do - echoDebug "Running `spago verify`" + logDebug "Running `spago verify`" Config{ packageSet = packageSet@PackageSet{..}, ..} <- Config.ensureConfig case maybePackage of -- If no package is specified, verify all of them @@ -369,7 +369,7 @@ verify cacheFlag chkModsUniq maybePackage = do where verifyPackages :: Spago m => PackageSet -> [(PackageName, Package)] -> m () verifyPackages packageSet packages = do - echo $ Messages.verifying $ length packages + output $ Messages.verifying $ length packages traverse_ (verifyPackage packageSet) (fst <$> packages) verifyPackage :: Spago m => PackageSet -> PackageName -> m () @@ -378,15 +378,15 @@ verify cacheFlag chkModsUniq maybePackage = do let globs = getGlobs deps DepsOnly [] quotedName = surroundQuote $ packageName name Fetch.fetchPackages cacheFlag deps packagesMinPursVersion - echo $ "Verifying package " <> quotedName + output $ "Verifying package " <> quotedName Purs.compile globs [] - echo $ "Successfully verified " <> quotedName + output $ "Successfully verified " <> quotedName compileEverything :: Spago m => PackageSet -> m () compileEverything PackageSet{..} = do let deps = Map.toList packagesDB globs = getGlobs deps DepsOnly [] Fetch.fetchPackages cacheFlag deps packagesMinPursVersion - echo "Compiling everything (will fail if module names conflict)" + output "Compiling everything (will fail if module names conflict)" Purs.compile globs [] - echo "Successfully compiled everything" + output "Successfully compiled everything" diff --git a/src/Spago/Prelude.hs b/src/Spago/Prelude.hs index 814e1df29..7b75c5ab1 100644 --- a/src/Spago/Prelude.hs +++ b/src/Spago/Prelude.hs @@ -1,8 +1,5 @@ module Spago.Prelude - ( echo - , echoStr - , echoDebug - , tshow + ( tshow , die , Dhall.Core.throws , hush @@ -78,6 +75,11 @@ module Spago.Prelude , githubTokenEnvVar , whenM , pretty + , output + , outputStr + , logDebug + , logWarning + , logError ) where @@ -158,25 +160,36 @@ type Spago m = , MonadMask m ) -echo :: MonadIO m => Text -> m () -echo = Turtle.printf (Turtle.s Turtle.% "\n") +output :: MonadIO m => Text -> m () +output = Turtle.printf (Turtle.s Turtle.% "\n") -echoStr :: MonadIO m => String -> m () -echoStr = echo . Text.pack +outputStr :: MonadIO m => String -> m () +outputStr = output . Text.pack -tshow :: Show a => a -> Text -tshow = Text.pack . show +logStderr :: MonadIO m => String -> m () +logStderr = liftIO . System.IO.hPutStrLn System.IO.stderr + +logText :: MonadIO m => Text -> m () +logText = logStderr . Text.unpack -echoDebug :: Spago m => Text -> m () -echoDebug str = do +logDebug :: Spago m => Text -> m () +logDebug str = do hasDebug <- asks globalDebug - Turtle.when hasDebug $ do - echo str + when hasDebug $ do + logText $ str + +logWarning :: MonadIO m => Text -> m () +logWarning = logText . ("WARNING: " <>) + +logError :: MonadIO m => Text -> m () +logError = logText . ("Error: " <>) + +tshow :: Show a => a -> Text +tshow = Text.pack . show die :: MonadThrow m => Text -> m a die reason = throwM $ SpagoError reason - -- | Suppress the 'Left' value of an 'Either' hush :: Either a b -> Maybe b hush = either (const Nothing) Just @@ -281,7 +294,7 @@ shouldRefreshFile path = (tryIO $ liftIO $ do >>= \case Right v -> pure v Left err -> do - echoDebug $ "Unable to read file " <> Text.pack path <> ". Error was: " <> tshow err + logDebug $ "Unable to read file " <> Text.pack path <> ". Error was: " <> tshow err pure True diff --git a/src/Spago/Purs.hs b/src/Spago/Purs.hs index ab614cf82..1ffb49b01 100644 --- a/src/Spago/Purs.hs +++ b/src/Spago/Purs.hs @@ -42,7 +42,7 @@ compile sourcePaths extraArgs = do Right _ -> pure "psa" Left (_err :: SomeException) -> pure "purs" - echoDebug $ "Compiling with " <> surroundQuote purs + logDebug $ "Compiling with " <> surroundQuote purs let paths = Text.intercalate " " $ surroundQuote <$> map unSourcePath sourcePaths @@ -124,14 +124,14 @@ versionImpl purs = do parsed = versionText >>= (hush . Version.semver) when (isNothing parsed) $ do - echo $ Messages.failedToParseCommandOutput (purs <> " --version") fullVersionText + output $ Messages.failedToParseCommandOutput (purs <> " --version") fullVersionText pure parsed runWithOutput :: Spago m => Text -> Text -> Text -> m () runWithOutput command success failure = do - echoDebug $ "Running command: `" <> command <> "`" + logDebug $ "Running command: `" <> command <> "`" liftIO $ shell command empty >>= \case - ExitSuccess -> echo success + ExitSuccess -> output success ExitFailure _ -> die failure diff --git a/src/Spago/Version.hs b/src/Spago/Version.hs index db3600c48..dad88edee 100644 --- a/src/Spago/Version.hs +++ b/src/Spago/Version.hs @@ -59,10 +59,10 @@ getCurrentVersion = do case Safe.maximumMay tags of Nothing -> do - echo $ "No git version tags found, so assuming current version is " <> unparseVersion mempty + output $ "No git version tags found, so assuming current version is " <> unparseVersion mempty pure mempty Just maxVersion -> do - echo $ "Found current version from git tag: " <> unparseVersion maxVersion + output $ "Found current version from git tag: " <> unparseVersion maxVersion pure maxVersion @@ -88,7 +88,7 @@ tagNewVersion oldVersion newVersion = do newVersionTag = unparseVersion newVersion Git.commitAndTag newVersionTag $ oldVersionTag <> " → " <> newVersionTag - echo $ "Git tag created for new version: " <> newVersionTag + output $ "Git tag created for new version: " <> newVersionTag -- | Bump and tag a new version in preparation for release. @@ -103,7 +103,7 @@ bumpVersion dryRun spec = do let writeBowerAction = DryAction "write the new config to the `bower.json` file and try to install its dependencies" $ do - echo $ "Writing the new Bower config to " <> surroundQuote Bower.path + output $ "Writing the new Bower config to " <> surroundQuote Bower.path liftIO $ ByteString.writeFile Bower.path newBowerConfig Bower.runBowerInstall clean <- Git.hasCleanWorkingTree diff --git a/src/Spago/Watch.hs b/src/Spago/Watch.hs index 53e65c055..26bf8b321 100644 --- a/src/Spago/Watch.hs +++ b/src/Spago/Watch.hs @@ -68,7 +68,7 @@ fileWatchConf watchConfig shouldClear inner = withManagerConf watchConfig $ \man when (shouldClear == DoClear) $ liftIO $ do clearScreen setCursorPosition 0 0 - mapM_ echoStr maybeMsg + mapM_ outputStr maybeMsg let onChange event = do timeNow <- liftIO getCurrentTime @@ -136,25 +136,25 @@ fileWatchConf watchConfig shouldClear inner = withManagerConf watchConfig $ \man let watchInput :: Spago m => m () watchInput = do line <- liftIO $ unpack . toLower . pack <$> getLine - if line == "quit" then echo "Leaving watch mode." + if line == "quit" then output "Leaving watch mode." else do liftIO $ case line of "help" -> do - echo "" - echo "help: display this help" - echo "quit: exit" - echo "build: force a rebuild" - echo "watched: display watched files" + output "" + output "help: display this help" + output "quit: exit" + output "build: force a rebuild" + output "watched: display watched files" "build" -> do redisplay Nothing atomically $ writeTVar dirtyVar True "watched" -> do watch' <- readTVarIO allGlobs - mapM_ echoStr (Glob.decompile <$> Set.toList watch') + mapM_ outputStr (Glob.decompile <$> Set.toList watch') "" -> do redisplay Nothing atomically $ writeTVar dirtyVar True - _ -> echoStr $ concat + _ -> outputStr $ concat [ "Unknown command: " , show line , ". Try 'help'" @@ -170,10 +170,10 @@ fileWatchConf watchConfig shouldClear inner = withManagerConf watchConfig $ \man eres :: Either SomeException () <- try $ inner setWatched case eres of - Left e -> echoStr $ show e - _ -> echo "Success! Waiting for next file change." + Left e -> outputStr $ show e + _ -> output "Success! Waiting for next file change." - echo "Type help for available commands. Press enter to force a rebuild." + output "Type help for available commands. Press enter to force a rebuild." globToParent :: Glob.Pattern -> FilePath diff --git a/test/SpagoSpec.hs b/test/SpagoSpec.hs index e59d98f32..aea389091 100644 --- a/test/SpagoSpec.hs +++ b/test/SpagoSpec.hs @@ -11,7 +11,8 @@ import Turtle (ExitCode (..), cd, cp, decodeString, empty, writeTextFile) import Utils (checkFileHasInfix, checkFixture, readFixture, runFor, shouldBeFailure, shouldBeFailureOutput, shouldBeSuccess, - shouldBeSuccessOutput, spago, withCwd) + shouldBeSuccessOutput, shouldBeSuccessOutputWithErr, spago, withCwd) + setup :: IO () -> IO () @@ -95,7 +96,7 @@ spec = around_ setup $ do spago ["init"] >>= shouldBeSuccess spago ["install"] >>= shouldBeSuccess - spago ["install", "effect"] >>= shouldBeSuccessOutput "spago-install-existing-dep-warning.txt" + spago ["install", "effect"] >>= shouldBeSuccessOutputWithErr "spago-install-existing-dep-output.txt" "spago-install-existing-dep-warning.txt" it "Spago should strip 'purescript-' prefix and give warning if package without prefix is present in package set" $ do @@ -168,7 +169,7 @@ spec = around_ setup $ do spago ["init"] >>= shouldBeSuccess writeTextFile "alternative2.dhall" "./spago.dhall // { sources = [ \"src/**/*.purs\" ] }\n" spago ["-x", "alternative2.dhall", "install", "simple-json"] >>= shouldBeSuccess - spago ["-x", "alternative2.dhall", "install", "simple-json"] >>= shouldBeSuccessOutput "alternative2install.txt" + spago ["-x", "alternative2.dhall", "install", "simple-json"] >>= shouldBeSuccessOutputWithErr "alternative2install.txt" "alternative2install-warning.txt" checkFixture "alternative2.dhall" it "Spago should install successfully when there are local dependencies sharing the same packages.dhall" $ do diff --git a/test/Utils.hs b/test/Utils.hs index b652fbb83..ba01663c0 100644 --- a/test/Utils.hs +++ b/test/Utils.hs @@ -12,6 +12,7 @@ module Utils , shouldBeSuccess , shouldBeSuccessInfix , shouldBeSuccessOutput + , shouldBeSuccessOutputWithErr , shouldBeEmptySuccess , spago , withCwd @@ -58,6 +59,14 @@ shouldBeSuccessOutput expected (code, stdout, _stderr) = do code `shouldBe` ExitSuccess stdout `shouldBe` expectedStdout +shouldBeSuccessOutputWithErr :: HasCallStack => FilePath -> FilePath -> (ExitCode, Text, Text) -> IO () +shouldBeSuccessOutputWithErr expected expectedErr (code, stdout, stderr) = do + expectedStdout <- readFixture expected + expectedStderr <- readFixture expectedErr + code `shouldBe` ExitSuccess + stdout `shouldBe` expectedStdout + stderr `shouldBe` expectedStderr + shouldBeSuccessInfix :: HasCallStack => Text -> (ExitCode, Text, Text) -> IO () shouldBeSuccessInfix expected (code, stdout, _stderr) = do code `shouldBe` ExitSuccess diff --git a/test/fixtures/alternative2install-warning.txt b/test/fixtures/alternative2install-warning.txt new file mode 100644 index 000000000..e014990fc --- /dev/null +++ b/test/fixtures/alternative2install-warning.txt @@ -0,0 +1,2 @@ +WARNING: Failed to add dependencies. You should have a record with the `dependencies` key for this to work. +WARNING: configuration file was not updated. diff --git a/test/fixtures/alternative2install.txt b/test/fixtures/alternative2install.txt index 2a4b5cc0e..c9d6c6305 100644 --- a/test/fixtures/alternative2install.txt +++ b/test/fixtures/alternative2install.txt @@ -1,3 +1 @@ -WARNING: Failed to add dependencies. You should have a record with the `dependencies` key for this to work. -WARNING: configuration file was not updated. Installation complete. diff --git a/test/fixtures/spago-install-existing-dep-output.txt b/test/fixtures/spago-install-existing-dep-output.txt new file mode 100644 index 000000000..c9d6c6305 --- /dev/null +++ b/test/fixtures/spago-install-existing-dep-output.txt @@ -0,0 +1 @@ +Installation complete. diff --git a/test/fixtures/spago-install-existing-dep-warning.txt b/test/fixtures/spago-install-existing-dep-warning.txt index 5feb72645..9122e82e7 100644 --- a/test/fixtures/spago-install-existing-dep-warning.txt +++ b/test/fixtures/spago-install-existing-dep-warning.txt @@ -1,2 +1 @@ WARNING: configuration file was not updated. -Installation complete. From da95bdea3c4183d6f83992d9ce9c62ed9d1cef69 Mon Sep 17 00:00:00 2001 From: Ben Hart Date: Mon, 4 Nov 2019 15:16:17 -0500 Subject: [PATCH 18/25] Update src/Spago/Prelude.hs Co-Authored-By: Fabrizio Ferrai --- src/Spago/Prelude.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Spago/Prelude.hs b/src/Spago/Prelude.hs index 7b75c5ab1..986ee4313 100644 --- a/src/Spago/Prelude.hs +++ b/src/Spago/Prelude.hs @@ -182,7 +182,7 @@ logWarning :: MonadIO m => Text -> m () logWarning = logText . ("WARNING: " <>) logError :: MonadIO m => Text -> m () -logError = logText . ("Error: " <>) +logError = logText . ("ERROR: " <>) tshow :: Show a => a -> Text tshow = Text.pack . show From 114452e2e23ee929828dc89a7e1a1425282b69bb Mon Sep 17 00:00:00 2001 From: benjmhart Date: Mon, 4 Nov 2019 19:43:54 -0500 Subject: [PATCH 19/25] fix tests relating to error logs --- test/SpagoSpec.hs | 5 ++--- test/fixtures/run-no-psa-err.txt | 18 ++++++++++++++++++ test/fixtures/run-no-psa.txt | 15 --------------- test/fixtures/run-output-err.txt | 15 +++++++++++++++ test/fixtures/run-output.txt | 15 --------------- 5 files changed, 35 insertions(+), 33 deletions(-) create mode 100644 test/fixtures/run-no-psa-err.txt create mode 100644 test/fixtures/run-output-err.txt diff --git a/test/SpagoSpec.hs b/test/SpagoSpec.hs index aea389091..9877991f3 100644 --- a/test/SpagoSpec.hs +++ b/test/SpagoSpec.hs @@ -522,7 +522,7 @@ spec = around_ setup $ do spago ["build"] >>= shouldBeSuccess shell "psa --version" empty >>= \case - ExitSuccess -> spago ["-v", "run"] >>= shouldBeSuccessOutput "run-output.txt" + ExitSuccess -> spago ["-v", "run"] >>= shouldBeSuccessOutputWithErr "run-output.txt" "run-output-err.txt" ExitFailure _ -> spago ["-v", "run"] >>= shouldBeSuccessOutput "run-output-psa-not-installed.txt" it "Spago should be able to not use `psa`" $ do @@ -530,8 +530,7 @@ spec = around_ setup $ do spago ["init"] >>= shouldBeSuccess spago ["--no-psa", "build"] >>= shouldBeSuccess spago ["--no-psa", "build"] >>= shouldBeSuccess - spago ["-v", "--no-psa", "run"] >>= shouldBeSuccessOutput "run-no-psa.txt" - + spago ["-v", "--no-psa", "run"] >>= shouldBeSuccessOutputWithErr "run-no-psa.txt" "run-no-psa-err.txt" describe "spago bundle" $ do diff --git a/test/fixtures/run-no-psa-err.txt b/test/fixtures/run-no-psa-err.txt new file mode 100644 index 000000000..865d4092e --- /dev/null +++ b/test/fixtures/run-no-psa-err.txt @@ -0,0 +1,18 @@ +Transformed config is the same as the read one, not overwriting it +Ensuring that the package set is frozen +Running with backend: nodejs +Running `spago build` +Transformed config is the same as the read one, not overwriting it +Ensuring that the package set is frozen +Getting transitive deps +Running `fetchPackages` +Checking if `purs` is up to date +Running `getGlobalCacheDir` +Locating root path of packages.dhall +Compiling with "purs" +Running command: `purs compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` +Build succeeded. +Locating root path of packages.dhall +Writing .spago/run.js +Locating root path of packages.dhall +Writing .spago/run.js diff --git a/test/fixtures/run-no-psa.txt b/test/fixtures/run-no-psa.txt index 05778e256..f8b3c4c9d 100644 --- a/test/fixtures/run-no-psa.txt +++ b/test/fixtures/run-no-psa.txt @@ -1,18 +1,3 @@ 🍝 -Transformed config is the same as the read one, not overwriting it -Ensuring that the package set is frozen -Running with backend: nodejs -Running `spago build` -Transformed config is the same as the read one, not overwriting it -Ensuring that the package set is frozen -Getting transitive deps -Running `fetchPackages` -Checking if `purs` is up to date -Running `getGlobalCacheDir` Installation complete. -Locating root path of packages.dhall -Compiling with "purs" -Running command: `purs compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` Build succeeded. -Locating root path of packages.dhall -Writing .spago/run.js diff --git a/test/fixtures/run-output-err.txt b/test/fixtures/run-output-err.txt new file mode 100644 index 000000000..cfc2bb812 --- /dev/null +++ b/test/fixtures/run-output-err.txt @@ -0,0 +1,15 @@ +Transformed config is the same as the read one, not overwriting it +Ensuring that the package set is frozen +Running with backend: nodejs +Running `spago build` +Transformed config is the same as the read one, not overwriting it +Ensuring that the package set is frozen +Getting transitive deps +Running `fetchPackages` +Checking if `purs` is up to date +Running `getGlobalCacheDir` +Locating root path of packages.dhall +Compiling with "psa" +Running command: `psa compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` +Locating root path of packages.dhall +Writing .spago/run.js diff --git a/test/fixtures/run-output.txt b/test/fixtures/run-output.txt index e2a8ddd99..f8b3c4c9d 100644 --- a/test/fixtures/run-output.txt +++ b/test/fixtures/run-output.txt @@ -1,18 +1,3 @@ 🍝 -Transformed config is the same as the read one, not overwriting it -Ensuring that the package set is frozen -Running with backend: nodejs -Running `spago build` -Transformed config is the same as the read one, not overwriting it -Ensuring that the package set is frozen -Getting transitive deps -Running `fetchPackages` -Checking if `purs` is up to date -Running `getGlobalCacheDir` Installation complete. -Locating root path of packages.dhall -Compiling with "psa" -Running command: `psa compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` Build succeeded. -Locating root path of packages.dhall -Writing .spago/run.js From 2e90670ceb0f9ece35199b63d816bba0d6aac660 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Mon, 4 Nov 2019 20:03:46 -0500 Subject: [PATCH 20/25] additional test fixes --- test/SpagoSpec.hs | 2 +- test/fixtures/run-no-psa-err.txt | 1 - .../fixtures/run-output-psa-not-installed-err.txt | 15 +++++++++++++++ test/fixtures/run-output-psa-not-installed.txt | 15 --------------- 4 files changed, 16 insertions(+), 17 deletions(-) create mode 100644 test/fixtures/run-output-psa-not-installed-err.txt diff --git a/test/SpagoSpec.hs b/test/SpagoSpec.hs index 9877991f3..7c774d571 100644 --- a/test/SpagoSpec.hs +++ b/test/SpagoSpec.hs @@ -523,7 +523,7 @@ spec = around_ setup $ do shell "psa --version" empty >>= \case ExitSuccess -> spago ["-v", "run"] >>= shouldBeSuccessOutputWithErr "run-output.txt" "run-output-err.txt" - ExitFailure _ -> spago ["-v", "run"] >>= shouldBeSuccessOutput "run-output-psa-not-installed.txt" + ExitFailure _ -> spago ["-v", "run"] >>= shouldBeSuccessOutputWithErr "run-output-psa-not-installed.txt" "run-output-psa-not-installed-err.txt" it "Spago should be able to not use `psa`" $ do diff --git a/test/fixtures/run-no-psa-err.txt b/test/fixtures/run-no-psa-err.txt index 865d4092e..9a8ab3441 100644 --- a/test/fixtures/run-no-psa-err.txt +++ b/test/fixtures/run-no-psa-err.txt @@ -11,7 +11,6 @@ Running `getGlobalCacheDir` Locating root path of packages.dhall Compiling with "purs" Running command: `purs compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` -Build succeeded. Locating root path of packages.dhall Writing .spago/run.js Locating root path of packages.dhall diff --git a/test/fixtures/run-output-psa-not-installed-err.txt b/test/fixtures/run-output-psa-not-installed-err.txt new file mode 100644 index 000000000..b1bc03521 --- /dev/null +++ b/test/fixtures/run-output-psa-not-installed-err.txt @@ -0,0 +1,15 @@ +Transformed config is the same as the read one, not overwriting it +Ensuring that the package set is frozen +Running with backend: nodejs +Running `spago build` +Transformed config is the same as the read one, not overwriting it +Ensuring that the package set is frozen +Getting transitive deps +Running `fetchPackages` +Checking if `purs` is up to date +Running `getGlobalCacheDir` +Locating root path of packages.dhall +Compiling with "purs" +Running command: `purs compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` +Locating root path of packages.dhall +Writing .spago/run.js diff --git a/test/fixtures/run-output-psa-not-installed.txt b/test/fixtures/run-output-psa-not-installed.txt index 05778e256..f8b3c4c9d 100644 --- a/test/fixtures/run-output-psa-not-installed.txt +++ b/test/fixtures/run-output-psa-not-installed.txt @@ -1,18 +1,3 @@ 🍝 -Transformed config is the same as the read one, not overwriting it -Ensuring that the package set is frozen -Running with backend: nodejs -Running `spago build` -Transformed config is the same as the read one, not overwriting it -Ensuring that the package set is frozen -Getting transitive deps -Running `fetchPackages` -Checking if `purs` is up to date -Running `getGlobalCacheDir` Installation complete. -Locating root path of packages.dhall -Compiling with "purs" -Running command: `purs compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` Build succeeded. -Locating root path of packages.dhall -Writing .spago/run.js From 62c88a078e539e09c15b2b1dd4edd43f7c278f16 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Mon, 4 Nov 2019 20:30:08 -0500 Subject: [PATCH 21/25] test fix --- test/fixtures/run-no-psa-err.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/fixtures/run-no-psa-err.txt b/test/fixtures/run-no-psa-err.txt index 9a8ab3441..b1bc03521 100644 --- a/test/fixtures/run-no-psa-err.txt +++ b/test/fixtures/run-no-psa-err.txt @@ -13,5 +13,3 @@ Compiling with "purs" Running command: `purs compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` Locating root path of packages.dhall Writing .spago/run.js -Locating root path of packages.dhall -Writing .spago/run.js From cdb7be1f0ab2e4fb056b73db93b7ca8736cf246a Mon Sep 17 00:00:00 2001 From: benjmhart Date: Mon, 4 Nov 2019 22:01:12 -0500 Subject: [PATCH 22/25] attempting to make test pass with control characters --- test/fixtures/run-output-err.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/fixtures/run-output-err.txt b/test/fixtures/run-output-err.txt index cfc2bb812..511a80c2f 100644 --- a/test/fixtures/run-output-err.txt +++ b/test/fixtures/run-output-err.txt @@ -11,5 +11,7 @@ Running `getGlobalCacheDir` Locating root path of packages.dhall Compiling with "psa" Running command: `psa compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` + Src Lib All +\ESC[33mWarnings\ESC[0m \ESC[32m0\ESC[0m \ESC[32m0\ESC[0m \ESC[32m0\ESC[0m \n\ESC[31mErrors\ESC[0m \ESC[32m0\ESC[0m \ESC[32m0\ESC[0m \ESC[32m0\ESC[0m Locating root path of packages.dhall Writing .spago/run.js From 10ecc7677ba0ff8a288e3ff2593bd41b88825db2 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Mon, 4 Nov 2019 22:38:08 -0500 Subject: [PATCH 23/25] filter control characters for tests --- test/Utils.hs | 7 ++++++- test/fixtures/run-output-err.txt | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/Utils.hs b/test/Utils.hs index ba01663c0..4e83d1adb 100644 --- a/test/Utils.hs +++ b/test/Utils.hs @@ -27,6 +27,7 @@ import qualified System.Process as Process import Test.Hspec (HasCallStack, shouldBe, shouldSatisfy) import Turtle (ExitCode (..), FilePath, Text, cd, empty, encodeString, inproc, limit, procStrictWithErr, pwd, readTextFile, strict) +import Data.Char (isControl) withCwd :: FilePath -> IO () -> IO () withCwd dir cmd = do @@ -65,7 +66,7 @@ shouldBeSuccessOutputWithErr expected expectedErr (code, stdout, stderr) = do expectedStderr <- readFixture expectedErr code `shouldBe` ExitSuccess stdout `shouldBe` expectedStdout - stderr `shouldBe` expectedStderr + (stripAnsi stderr) `shouldBe` expectedStderr shouldBeSuccessInfix :: HasCallStack => Text -> (ExitCode, Text, Text) -> IO () shouldBeSuccessInfix expected (code, stdout, _stderr) = do @@ -116,3 +117,7 @@ getHighestTag = do pure $ case Text.strip tag of "" -> Nothing tag' -> Just tag' + +stripAnsi :: Text -> Text +stripAnsi = Text.unlines . fmap prep . Text.lines + where prep = Text.strip . Text.filter (not . isControl) diff --git a/test/fixtures/run-output-err.txt b/test/fixtures/run-output-err.txt index 511a80c2f..c3742ea22 100644 --- a/test/fixtures/run-output-err.txt +++ b/test/fixtures/run-output-err.txt @@ -11,7 +11,8 @@ Running `getGlobalCacheDir` Locating root path of packages.dhall Compiling with "psa" Running command: `psa compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` - Src Lib All -\ESC[33mWarnings\ESC[0m \ESC[32m0\ESC[0m \ESC[32m0\ESC[0m \ESC[32m0\ESC[0m \n\ESC[31mErrors\ESC[0m \ESC[32m0\ESC[0m \ESC[32m0\ESC[0m \ESC[32m0\ESC[0m +Src Lib All +Warnings +Errors Locating root path of packages.dhall Writing .spago/run.js From 0ba2f9c2c8264ecd76ace64e003d639a315e1128 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Tue, 5 Nov 2019 00:06:26 -0500 Subject: [PATCH 24/25] add characters not removed by control filter --- test/fixtures/run-output-err.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/fixtures/run-output-err.txt b/test/fixtures/run-output-err.txt index c3742ea22..645b6ab8c 100644 --- a/test/fixtures/run-output-err.txt +++ b/test/fixtures/run-output-err.txt @@ -12,7 +12,6 @@ Locating root path of packages.dhall Compiling with "psa" Running command: `psa compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` Src Lib All -Warnings -Errors +[33mWarnings[0m [32m0[0m [32m0[0m [32m0[0m\n[31mErrors[0m [32m0[0m [32m0[0m [32m0[0m Locating root path of packages.dhall Writing .spago/run.js From 05712bf1b177027d631ff414b998c8862de6ea07 Mon Sep 17 00:00:00 2001 From: benjmhart Date: Tue, 5 Nov 2019 00:27:20 -0500 Subject: [PATCH 25/25] resolved local testing issues and fixed test --- CONTRIBUTING.md | 9 +++++++++ test/fixtures/run-output-err.txt | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7e43a3e00..cb81002cb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,6 +83,15 @@ $ npm install -g bower $ stack test ``` +note: if you receive the following error from running tests: +hGetContents: invalid argument (invalid byte sequence) + +You may be missing an environment variable. try the following + +```bash +$ LC_ALL=en_US.iso88591 +$ stack test +``` ## Merging changes diff --git a/test/fixtures/run-output-err.txt b/test/fixtures/run-output-err.txt index 645b6ab8c..143d2d706 100644 --- a/test/fixtures/run-output-err.txt +++ b/test/fixtures/run-output-err.txt @@ -12,6 +12,7 @@ Locating root path of packages.dhall Compiling with "psa" Running command: `psa compile --output ./output ".spago/console/v4.2.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"` Src Lib All -[33mWarnings[0m [32m0[0m [32m0[0m [32m0[0m\n[31mErrors[0m [32m0[0m [32m0[0m [32m0[0m +[33mWarnings[0m [32m0[0m [32m0[0m [32m0[0m +[31mErrors[0m [32m0[0m [32m0[0m [32m0[0m Locating root path of packages.dhall Writing .spago/run.js