diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 240b092..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "env": { "browser": true }, - "extends": "eslint:recommended", - "parserOptions": { "ecmaVersion": 6, "sourceType": "module" }, - "rules": { - "block-scoped-var": "error", - "consistent-return": "error", - "eqeqeq": "error", - "guard-for-in": "error", - "no-bitwise": "error", - "no-caller": "error", - "no-extra-parens": "off", - "no-extend-native": "error", - "no-loop-func": "error", - "no-new": "error", - "no-param-reassign": "error", - "no-return-assign": "error", - "no-sequences": "error", - "no-unused-expressions": "error", - "no-use-before-define": "error", - "no-undef": "error", - "no-eq-null": "error", - "radix": ["error", "always"], - "indent": ["error", 2, { "SwitchCase": 1 }], - "quotes": ["error", "double"], - "semi": ["error", "always"], - "strict": ["error", "global"] - } -} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc54710..d8bb367 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,16 +11,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up PureScript toolchain uses: purescript-contrib/setup-purescript@main with: - purescript: "unstable" + purescript: "latest" purs-tidy: "latest" + spago: "latest" - name: Cache PureScript dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }} path: | @@ -30,10 +31,10 @@ jobs: - name: Set up Node toolchain uses: actions/setup-node@v2 with: - node-version: "14.x" + node-version: "20.x" - name: Cache NPM dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -58,9 +59,5 @@ jobs: - name: Verify Bower & Pulp run: | - npm install bower pulp@16.0.0-0 + npm install bower npx bower install - npx pulp build -- --censor-lib --strict - if [ -d "test" ]; then - npx pulp test - fi diff --git a/.gitignore b/.gitignore index 6a45203..c94f7a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .* +!.npmrc !.gitignore !.github !.editorconfig diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/bower.json b/bower.json index cf174fa..6a02c81 100644 --- a/bower.json +++ b/bower.json @@ -23,7 +23,7 @@ "tests" ], "dependencies": { - "purescript-aff": "^7.0.0", + "purescript-aff": ">=7.0.0 <9.0.0", "purescript-effect": "^4.0.0", "purescript-either": "^6.0.0", "purescript-exceptions": "^6.0.0", diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..8dabd3e --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,53 @@ +import globals from "globals"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import js from "@eslint/js"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}); + +export default [...compat.extends("eslint:recommended"), { + languageOptions: { + globals: { + ...globals.browser, + }, + + ecmaVersion: 6, + sourceType: "module", + }, + + rules: { + "block-scoped-var": "error", + "consistent-return": "error", + eqeqeq: "error", + "guard-for-in": "error", + "no-bitwise": "error", + "no-caller": "error", + "no-extra-parens": "off", + "no-extend-native": "error", + "no-loop-func": "error", + "no-new": "error", + "no-param-reassign": "error", + "no-return-assign": "error", + "no-sequences": "error", + "no-unused-expressions": "error", + "no-use-before-define": "error", + "no-undef": "error", + "no-eq-null": "error", + radix: ["error", "always"], + + indent: ["error", 2, { + SwitchCase: 1, + }], + + quotes: ["error", "double"], + semi: ["error", "always"], + strict: ["error", "global"], + }, +}]; \ No newline at end of file diff --git a/package.json b/package.json index 0c27072..f56a9ef 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,9 @@ "test": "spago test --no-install" }, "devDependencies": { - "eslint": "^7.6.0", - "purescript-psa": "^0.8.2" + "eslint": "^9.20.0", + "purescript": "^0.15.15", + "purescript-psa": "^0.9.0", + "spago": "^0.21.0" } } diff --git a/packages.dhall b/packages.dhall index 582d6d3..4ecfd18 100644 --- a/packages.dhall +++ b/packages.dhall @@ -1,4 +1,5 @@ let upstream = - https://raw.githubusercontent.com/purescript/package-sets/prepare-0.15/src/packages.dhall + https://github.com/purescript/package-sets/releases/download/psc-0.15.15-20250205/packages.dhall + sha256:442220ce62d4f9a353819b28db9a7295cca7acaae7d2fbe814e52c1b25a7a296 in upstream