Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate to spago@next #57

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Bug report
about: Report an issue
title: ""
labels: bug
assignees: ""
---

**Describe the bug**
A clear and concise description of the bug.

**To Reproduce**
A minimal code example (preferably a runnable example on [Try PureScript](https://try.purescript.org)!) or steps to reproduce the issue.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/change-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Change request
about: Propose an improvement to this library
title: ""
labels: ""
assignees: ""
---

**Is your change request related to a problem? Please describe.**
A clear and concise description of the problem.

Examples:

- It's frustrating to have to [...]
- I was looking for a function to [...]

**Describe the solution you'd like**
A clear and concise description of what a good solution to you looks like, including any solutions you've already considered.

**Additional context**
Add any other context about the change request here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: PureScript Discourse
url: https://discourse.purescript.org/
about: Ask and answer questions on the PureScript discussion forum.
- name: PureScript Discord
url: https://purescript.org/chat
about: Ask and answer questions on the PureScript chat.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**Description of the change**
Clearly and concisely describe the purpose of the pull request. If this PR relates to an existing issue or change proposal, please link to it. Include any other background context that would help reviewers understand the motivation for this PR.

---

**Checklist:**

- [ ] Added the change to the changelog's "Unreleased" section with a link to this PR and your username
- [ ] Linked any existing issues or proposals that this pull request should close
- [ ] Updated or added relevant documentation in the README and/or documentation directory
- [ ] Added a test for the contribution (if applicable)
49 changes: 15 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,36 @@ name: CI

on:
push:
branches: [main]
branches: [master, main]
pull_request:
branches: [main]
branches: [master, main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

- name: Cache PureScript dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.lock') }}
path: |
.spago
output

- name: Set up Node toolchain
uses: actions/setup-node@v2
with:
node-version: "14.x"

- name: Cache NPM dependencies
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Install NPM dependencies
run: npm install

- name: Install spago deps
run: npm run deps
- name: Build source
run: spago build --censor-stats --strict --ensure-ranges --pedantic-packages

- name: Build the project
run: npm run build
- name: Run tests
run: spago test --offline --censor-stats --strict --pedantic-packages

- name: Test the project
run: npm run test
- name: Verify formatting
run: purs-tidy check src test
32 changes: 0 additions & 32 deletions bower.json

This file was deleted.

20 changes: 13 additions & 7 deletions codegen/consts.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
// For now, we are using a local copy of react-html-attributes.
// Eventually, the relative path here should be removed, and
// the version number of react-html-attributes should be bumped.
module.exports.htmlProps = require("./react-html-attributes");
module.exports.svgProps = require("svg-element-attributes");
import htmlProps from "./react-html-attributes.json" with { type: "json" };

import { svgElementAttributes } from "svg-element-attributes";

export { htmlProps, svgElementAttributes }

export const voids = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"];

module.exports.voids = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"];
// The types for certain attributes differ according to their containing element.
// These appear in the typesByElement object, using "*" as a default element
// (required only if the default attribute type is other than `String`).
// For clarity, it is an error for any attribute to be in both `types` and `typesByElement`.
module.exports.typesByElement = {
export const typesByElement = {
"cols": {
"textarea": "Int",
},
Expand All @@ -23,12 +27,13 @@ module.exports.typesByElement = {
"rows": {
"textarea": "Int"
},
"size" : {
"size": {
"input": "Int",
"select": "Int"
}
};
module.exports.types = {

export const types = {
"_aria": "Object String",
"_data": "Object String",
"allowFullScreen": "Boolean",
Expand Down Expand Up @@ -156,4 +161,5 @@ module.exports.types = {
"tabIndex": "Int",
"unselectable": "Boolean"
};
module.exports.reserved = ["module", "data", "type", "newtype", "class", "instance", "where", "derive", "if", "then", "else", "case", "of"];

export const reserved = ["module", "data", "type", "newtype", "class", "instance", "where", "derive", "if", "then", "else", "case", "of"];
Loading