Skip to content

Commit

Permalink
Update to 0.15.8 (support dark theme) (#477)
Browse files Browse the repository at this point in the history
* Bump ps to 0.15.8

* Update lock file

* Update publishing instructions

* Regenerate license

* Add changelog entry

* CI: Update ubuntu version to latest
  • Loading branch information
JordanMartinez committed Mar 6, 2023
1 parent 4a1b372 commit 6e6ff77
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 174 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Build server
# Note that this must be kept in sync with the version of Ubuntu which the
# Pursit server is running, otherwise the server binary may fail to run.
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,11 @@ the most up-to-date version of this file.

## Unreleased

## v0.9.5

- Update `purescript` to `0.15.8` (support dark theme) (@JordanMartinez)
- Update documentation uploading instructions (@JordanMartinez)

## v0.9.4

- Fix license generation (@JordanMartinez)
Expand Down
135 changes: 66 additions & 69 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pursuit.cabal
Expand Up @@ -102,7 +102,7 @@ library
, containers
, vector
, time
, purescript ==0.15.6
, purescript ==0.15.8
, bower-json
, blaze-builder
, blaze-markup
Expand Down
4 changes: 2 additions & 2 deletions stack.yaml
@@ -1,4 +1,4 @@
resolver: nightly-2022-06-09
resolver: lts-20.9
# Resolves hjsmin requiring language-javascript ==0.6, while the purescript
# compiler requires language-javascript ==0.7.
allow-newer: true
Expand All @@ -12,7 +12,7 @@ extra-deps:
- bytestring-trie-0.2.7@sha256:f78e9d1dba699ce56080824693787918e9e8904db99d04d3470941420b1dd3ed,9010
- classy-prelude-yesod-1.5.0
- language-javascript-0.7.0.0
- purescript-0.15.6
- purescript-0.15.8
- monoidal-containers-0.6.2.0
- protolude-0.3.1
- process-1.6.13.1
Expand Down
40 changes: 20 additions & 20 deletions stack.yaml.lock
Expand Up @@ -5,75 +5,75 @@

packages:
- completed:
name: barrier
version: 0.1.1
commit: db5e27c8ff8f98b2ea18036ce20f853a92aec595
git: https://github.com/PureFunctor/barrier.git
name: barrier
pantry-tree:
size: 1892
sha256: b7d15fa12674068618745c2cbdaa6d0fa256206d0904d4e8964606ee7fd57676
commit: db5e27c8ff8f98b2ea18036ce20f853a92aec595
size: 1892
version: 0.1.1
original:
git: https://github.com/PureFunctor/barrier.git
commit: db5e27c8ff8f98b2ea18036ce20f853a92aec595
git: https://github.com/PureFunctor/barrier.git
- completed:
hackage: bytestring-trie-0.2.7@sha256:f78e9d1dba699ce56080824693787918e9e8904db99d04d3470941420b1dd3ed,9010
pantry-tree:
size: 1221
sha256: b1f438713b95d8e1e95af11c5d747d1fa9b647c2f55be817ff91e4bd4d69ca00
size: 1221
original:
hackage: bytestring-trie-0.2.7@sha256:f78e9d1dba699ce56080824693787918e9e8904db99d04d3470941420b1dd3ed,9010
- completed:
hackage: classy-prelude-yesod-1.5.0@sha256:8f7e183bdfd6d2ea9674284c4f285294ab086aff60d9be4e5d7d2f3c1a2b05b7,1330
pantry-tree:
size: 330
sha256: ae84d4cc0e1daf985db6cdcf2ac92319531b8e60f547183cc46480d00aafbe20
size: 330
original:
hackage: classy-prelude-yesod-1.5.0
- completed:
hackage: language-javascript-0.7.0.0@sha256:3eab0262b8ac5621936a4beab6a0f97d0e00a63455a8b0e3ac1547b4088dae7d,3898
pantry-tree:
size: 2244
sha256: b0f28d836cb3fbde203fd7318a896c3a20acd8653a905e1950ae2d9a64bccebf
size: 2244
original:
hackage: language-javascript-0.7.0.0
- completed:
hackage: purescript-0.15.6@sha256:d06964345d46009b0a2d5f610f9e0394912da682f508458e7c059a4d6b0299c1,20800
hackage: purescript-0.15.8@sha256:5d7c19e5a49f83acbe8ecc43bf93feb0e075bb11992df9b83af4467aea0bf41d,21427
pantry-tree:
size: 153963
sha256: 8a43be3726b172e8cfeebfb05462f17eeb3af932576c5e48cf366c0751f1fdf8
sha256: 79dde609e3b525e30234fd76b0901f72d48dea47a879d547864d959f85b81760
size: 156457
original:
hackage: purescript-0.15.6
hackage: purescript-0.15.8
- completed:
hackage: monoidal-containers-0.6.2.0@sha256:97289baf716f22fdae04b4fcbee066453d2f4c630ef3f631aeeab61ee713841e,2309
pantry-tree:
size: 569
sha256: 55c0b7f60f8350546d437c9c0ad52c1dba35cac727972e7dc0f12201870df62f
size: 569
original:
hackage: monoidal-containers-0.6.2.0
- completed:
hackage: protolude-0.3.1@sha256:1cc9e5a5c26c33a43c52b554443dd9779fef13974eaa0beec7ca6d2551b400da,2647
pantry-tree:
size: 1645
sha256: 6452a6ca8d395f7d810139779bb0fd16fc1dbb00f1862630bc08ef5a100430f9
size: 1645
original:
hackage: protolude-0.3.1
- completed:
hackage: process-1.6.13.1@sha256:c8bb8b7c993ff72d771381b3b56852dd154bce51880a24789c11f57b0688d353,2963
pantry-tree:
size: 1543
sha256: 58117b15fa330c79b3bca6b29c65f815e45840f79cc0915d3434f25e54ac8fa5
size: 1543
original:
hackage: process-1.6.13.1
- completed:
hackage: Cabal-3.6.3.0@sha256:ff97c442b0c679c1c9876acd15f73ac4f602b973c45bde42b43ec28265ee48f4,12459
pantry-tree:
size: 19757
sha256: b250a53bdb56844f047a2927833bb565b936a289abfa85dfc2a63148d776368a
size: 19757
original:
hackage: Cabal-3.6.3.0
snapshots:
- completed:
size: 607265
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2022/6/9.yaml
sha256: 819ac07621dac5b2c320c45cb8c27f141f95114a1749b19b06d2c3606c79e839
original: nightly-2022-06-09
sha256: c11fcbeb1aa12761044755b1109d16952ede2cb6147ebde777dd5cb38f784501
size: 649333
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/9.yaml
original: lts-20.9
82 changes: 1 addition & 81 deletions static/help-docs/authors.md
@@ -1,86 +1,6 @@
## <a name="submitting-packages"></a>How to submit packages

Packages can only be uploaded to Pursuit if the following conditions are true:
- The repository is not a mono-repo.
- Your project must be registred in the [`purescript/registry` repo's `new-packages.json` file](https://github.com/purescript/registry/blob/master/new-packages.json). If it's not yet there, then submit a PR adding it.
- `bower install` exits successfully without any conflicts.
- `pulp build` (and if applicable `pulp test`) exits successfully without any conflicts.
- A tag points to the same commit that is currently checked out (whether by a checked out commit, branch, or tag)
- The `git` working directory is clean.

`bower` often causes problems in publishing, and this is something that will be fixed once the PureScript Registry is started. Until then, keep the following in mind:
- In your package's root directory, always start from a clean bower state by running `rm -rf bower_components/ && bower cache clean`
- If a dependency is **not** in the Bower registry (e.g. `bower info purescript-package-name` returns `ENOTFOUND`), it can be installed using the long form. For example:
- Schema: `bower install --save <package-name>=<git-https-endpoint>#<version-range>`
- Example: `bower install --save purescript-js-uri=https://github.com/purescript-contrib/purescript-js-uri.git#^1.0.0`
- If you run `bower install` and the command encounters a version conflict and asks which one to use for a given dependency, then your package cannot be published to Pursuit. There are two possible reasons for this:
- one or more of your `bower.json` file's `dependencies` or `devDependencies` (if used) needs to be updated
- Try running the following:

```
# installs `ncu` globally
npm i -g npm-check-updates
# get list of outdated packages
ncu -p bower
# update versions to latest ones automatically
ncu -u -p bower
```

- one or more of your dependencies (e.g. `bar`) did not update their `bower.json` file's `dependencies` field to refer to the new version of their dependency (e.g. `baz`) before publishing it (e.g. `bar`). As a result, your direct dependency, `foo@2.0.0`, may depend on `baz@2.0.0` while your other direct dependency `bar@2.0.0` still depends on `baz@1.0.0`. Bower will complain when it isn't sure whether to use `baz@1.0.0` or `baz@2.0.0`.
- Try contacting the author of the package and ask them to update their `bower.json` file correctly and publish a new release.

1. Put the code up on GitHub. (Currently, GitHub is the only supported hosting method. If you'd rather host your code somewhere else, please open an issue and let us know).

2. Verify that `bower install`, `pulp build`, and (if applicable) `pulp test` exit successfully.

3. (Optional, highly recommended) Check that the documentation looks sensible locally before publishing by running `pulp docs -- --format html`.

4. Create a git tag for the version you're releasing, if you haven't already. It is recommended to use `pulp version` to do this for you, as doing it this way will also check your package for common errors.

5. Authenticate to GitHub by running `pulp login`. (This is necessary in order for us to be able to tell who uploaded which packages).

6. Change to your project directory and run `pulp publish`. This will the push commits and the relevant tag to your "origin" Git remote, and then generate your documentation and upload it to Pursuit.

`pulp publish` also accepts a `--no-push` flag which skips the Bower registration check as well as pushing commits (this is useful for uploading other people's packages, if you ever need to do this). There is also a `--push-to` option which allows you to specify a different Git remote to push tags and commits to.

**Note: If `pulp publish` fails with a `400` error, try running it a second time.** Usually, your project's documentation will be successfully published on the second run. For example:

```
# tag gets pushed in first run, so we don't need it in the second run
yes | pulp publish
yes | pulp publish --no-push
```


Your package, together with documentation, should now appear in Pursuit.

## <a name="submit-automated"></a>Submitting packages from a script

You can also use Pulp to submit packages from a script. Pulp prompts for confirmation when you run `pulp publish`, so you will need to use a program like `yes` to answer affirmatively.

For example, if you want to automatically upload documentation from your Travis CI build on tags, you should add the following to your `after_script` build step:

`test -n "$TRAVIS_TAG" && ( yes | pulp publish --no-push )`

Alternatively, if you don't want to use Pulp for whatever reason, you can upload packages using Pursuit's HTTP API directly:

- Gzip the JSON output produced by `psc-publish` and save it to a file.
- If you don't already have one, get a GitHub API token by visiting <https://github.com/settings/tokens/new>. No scopes are required, since the token is only used for authentication.
- Make a POST request to https://pursuit.purescript.org/packages, with gzipped JSON as the request body, including a `Content-Encoding: gzip` header, and with your GitHub token in the Authorization header, like this: `Authorization: token {token}`.

For example, using curl:

```
curl -X POST \
https://pursuit.purescript.org/packages \
--data-binary @pursuit.json.gz \
-H 'Content-Encoding: gzip' \
-H 'Accept: application/json' \
-H "Authorization: token $(cat my-oauth-token.txt)" \
-v
```

If your submission is successful, Pursuit will return a 201 Created response, and the URL for your newly uploaded package will be in the Location header.
Previously, users would need to use `bower` to upload packages' documentation. Uploading documentation is now handled by the PureScript Registry (still in alpha at the time of this writing). See the [PureScript Registry repo](https://github.com/purescript/registry) for how to register and publish packages and their documentation. For more context, read the Discourse announcement, [Registry Alpha Launched](https://discourse.purescript.org/t/registry-alpha-launched/3146).

## <a name="package-deprecation"></a>How to mark package as deprecated

Expand Down

0 comments on commit 6e6ff77

Please sign in to comment.