Skip to content

Commit

Permalink
Update dependecies & react 18 (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
siuvdlec authored Jan 29, 2024
1 parent 55a2601 commit 2d4ccbe
Show file tree
Hide file tree
Showing 50 changed files with 7,542 additions and 8,839 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"root": true,
"extends": "facile/react",
"parserOptions": {
"project": "./tsconfig.eslint.json"
"project": ["./tsconfig.json", "./test-types/tsconfig.json"]
},
"env": {
"node": true
}
}
47 changes: 23 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
name: Node CI

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

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
build:
runs-on: ubuntu-latest

runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g npm@^7.6
- run: npm install
- run: npm run build
- run: npm run clean
- run: npm run test
- run: npm run test-type
steps:
- uses: actions/checkout@v2
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm run clean
- run: npm run lint
- run: npm run tsc
- run: npm run test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist
.idea
coverage
yarn-error.log
*.tsbuildinfo
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('eslint-config-facile/prettierrc.json')
9 changes: 0 additions & 9 deletions .prettierrc.json

This file was deleted.

8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Changelog

## 0.6.0
## 0.6.0-rc

- Upgraded `rxjs` requirement `[email protected]`
- Upgraded peerDependencies: `rxjs@^7.8`, `react@^17.0.2 || ^18.2.0`

- Replace `fp-ts-rxjs` peerDependencies with `fp-ts-reactive`
- Replace `fp-ts-rxjs` peerDependency with `fp-ts-reactive`

- New peerDependency `use-sync-external-store`

## 0.5.0

Expand Down
1 change: 0 additions & 1 deletion dtslint/index.d.ts

This file was deleted.

44 changes: 0 additions & 44 deletions dtslint/ts4.2/http.ts

This file was deleted.

20 changes: 0 additions & 20 deletions dtslint/ts4.2/tsconfig.json

This file was deleted.

23 changes: 0 additions & 23 deletions dtslint/ts4.2/tslint.json

This file was deleted.

7 changes: 3 additions & 4 deletions example/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as C from 'fp-ts/Console'
import * as T from 'fp-ts/Task'
import { identity } from 'fp-ts/function'
import { pipe } from 'fp-ts/function'
import { identity, pipe } from 'fp-ts/function'
import * as React from 'react'
import { Subject } from 'rxjs'
import { ajax } from 'rxjs/ajax'
Expand All @@ -11,21 +10,21 @@ import type * as RESFF from '../src/http/resourceFetchFactory'
import * as MR from '../src/react'
import { useStore } from '../src/react/useStore'
import * as MS from '../src/state'
import type { QuoteResource } from './resources/quoteResource'
import {
fetchQuoteCached,
fetchQuoteSeq,
fetchQuoteSeqPar,
fetchQuoteWithDelay,
fetchSimple,
QuoteResource,
} from './resources/quoteResource'
import type { QuoteStore } from './stores/quoteStore'
import {
quoteStore,
fetchQuoteMutation,
fetchQuoteMutationWithDelay,
fetchQuoteMutationWithParams,
resetQuoteMutation,
QuoteStore,
} from './stores/quoteStore'
import { sessionStore, parseEnvMutation, SessionStoreContext, useSessionStore } from './stores/sessionStore'

Expand Down
14 changes: 6 additions & 8 deletions example/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import * as React from 'react'
import { render } from 'react-dom'
import { createRoot } from 'react-dom/client'
import { AppInitializer } from './App'

render(
<React.StrictMode>
<AppInitializer />
</React.StrictMode>,
document.getElementById('root')
)
const container = document.getElementById('root')
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const root = createRoot(container!)

root.render(<AppInitializer />)
3 changes: 2 additions & 1 deletion example/resources/appFetchFactory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Lazy, pipe } from 'fp-ts/function'
import type { Lazy } from 'fp-ts/function'
import { pipe } from 'fp-ts/function'
import { map, take } from 'rxjs/operators'
import * as ROR from '../../src/http/ReaderObservableResource'
import * as RES from '../../src/http/Resource'
Expand Down
11 changes: 4 additions & 7 deletions example/stores/quoteStore.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { pipe } from 'fp-ts/function'
import { Observable, of } from 'rxjs'
import type { Observable } from 'rxjs'
import { of } from 'rxjs'
import * as ROR from '../../src/http/ReaderObservableResource'
import * as RES from '../../src/http/Resource'
import * as MS from '../../src/state'
import {
fetchQuote,
fetchQuoteWithDelay,
fetchQuoteWithTokenAndParams,
QuoteResource,
} from '../resources/quoteResource'
import type { QuoteResource } from '../resources/quoteResource'
import { fetchQuote, fetchQuoteWithDelay, fetchQuoteWithTokenAndParams } from '../resources/quoteResource'

declare module '../../src/state/stores' {
interface Stores {
Expand Down
3 changes: 2 additions & 1 deletion example/stores/sessionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import * as E from 'fp-ts/Either'
import { pipe } from 'fp-ts/function'
import * as t from 'io-ts'
import * as React from 'react'
import { Observable, of } from 'rxjs'
import type { Observable } from 'rxjs'
import { of } from 'rxjs'
import * as MS from '../../src/state'

declare module '../../src/state/stores' {
Expand Down
8 changes: 4 additions & 4 deletions example/webpack.config.ts → example/webpack.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'
import HtmlWebpackPlugin from 'html-webpack-plugin'
import * as webpack from 'webpack'
import * as path from 'path'
import webpack from 'webpack'
import path from 'path'

const config = (_: unknown, argv: { mode: string }): webpack.Configuration & { devServer: unknown } => ({
const config = (_, argv) => ({
entry: './example/index.tsx',
devtool: argv.mode === 'production' ? 'source-map' : 'inline-source-map',
resolve: {
Expand All @@ -14,7 +14,7 @@ const config = (_: unknown, argv: { mode: string }): webpack.Configuration & { d
port: 9000,
},
output: {
path: path.join(__dirname, '/dist'),
path: path.join(new URL('.', import.meta.url).pathname, 'dist'),
filename: 'bundle.js',
},
module: {
Expand Down
Loading

0 comments on commit 2d4ccbe

Please sign in to comment.