Skip to content

Commit

Permalink
chore: remove node8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
dr3 authored and nodkz committed Jul 19, 2023
1 parent 9640fc1 commit 217e077
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 24 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/es
/lib
/node8
1 change: 0 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[ignore]
<PROJECT_ROOT>/lib/.*
<PROJECT_ROOT>/es/.*
<PROJECT_ROOT>/node8/.*
.*/node_modules/ajv.*
.*/node_modules/acorn.*
.*/node_modules/async.*
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ node_modules
# Transpiled code
/es
/lib
/node8
/mjs

coverage
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ If this error occurs you can do one of the following:
- Explicitly install core-js v2. E.g.
- `yarn add [email protected]
- Try referencing one of the non default imports:
- `import { RelayNetworkLayer } from 'react-relay-network-modern/node8';`
- `import { RelayNetworkLayer } from 'react-relay-network-modern/es';`

### Different builds
Expand All @@ -58,9 +57,6 @@ This library contains different builds for any purposes:
// last 5 versions, ie 9, defaults
import { RelayNetworkLayer } from 'react-relay-network-modern';

// For SSR on node 8 and above (native async/await)
import { RelayNetworkLayer } from 'react-relay-network-modern/node8';

// Source code without Flowtype declarations
import { RelayNetworkLayer } from 'react-relay-network-modern/es';
```
Expand Down
13 changes: 0 additions & 13 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,6 @@ module.exports = {
es: {
plugins: ['@babel/plugin-proposal-class-properties'],
},
node8: {
presets: [
[
'@babel/preset-env',
{
targets: {
node: '8.0.0',
},
modules: 'commonjs',
},
],
],
},
test: {
presets: [
[
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
},
"files": [
"es",
"lib",
"node8"
"lib"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -86,10 +85,9 @@
]
},
"scripts": {
"build": "npm run build-lib && npm run build-es && npm run build-node8",
"build": "npm run build-lib && npm run build-es",
"build-lib": "rimraf lib && BABEL_ENV=lib babel src --ignore __tests__,__mocks__ -d lib && COPY_TO_FOLDER=lib npm run build-flow && COPY_TO_FOLDER=lib npm run build-dts ",
"build-es": "rimraf es && BABEL_ENV=es babel src --ignore __tests__,__mocks__ -d es && COPY_TO_FOLDER=es npm run build-flow && COPY_TO_FOLDER=es npm run build-dts",
"build-node8": "rimraf node8 && BABEL_ENV=node8 babel src --ignore __tests__,__mocks__ -d node8 && COPY_TO_FOLDER=node8 npm run build-flow && COPY_TO_FOLDER=node8 npm run build-dts",
"build-flow": "echo `$1` && find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo ./${COPY_TO_FOLDER:-lib}$filepath | sed 's/.\\/src\\//\\//g'`.flow; done",
"build-dts": "echo `$1` && find ./src -name '*d.ts' -not -path '*/__*' | while read filepath; do cp $filepath `echo ./${COPY_TO_FOLDER:-lib}$filepath | sed 's/.\\/src\\//\\//g'`; done",
"lint": "npm run eslint && npm run tslint && npm run tscheck",
Expand Down

0 comments on commit 217e077

Please sign in to comment.