Skip to content

Commit

Permalink
yarn: Upgrade dependencies and github actions #78
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjD90 authored Oct 10, 2023
1 parent 08c590c commit 966c8f2
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 1,021 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/node.js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Setup yarn
run: npm install -g yarn

- name: Setup Nodejs with yarn caching
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Notable Changes
Upgrade main steps

- `yarn remove @neo9/n9-mongo-client && yarn add @neo9/n9-mongodb-client@^1.0.0-rc.8` (this also upgrade all transitive dependencies)
- Rename usage : `find src/ -type f -exec sed -i -e 's#@neo9/n9-mongo-client#@neo9/n9-mongodb-client#g' {} +`
- Rename usage : `find ./ -mindepth 1 -type f -not -path "./node_modules/*" -not -path "./.git/*" -name "*.ts" -exec sed -i -e 's#@neo9/n9-mongo-client#@neo9/n9-mongodb-client#g' {} +`
- Remove old mongodb types :

- `yarn remove @types/mongodb`
- `find ./ -mindepth 1 -type f -not -path "./node_modules/*" -not -path "./.git/*" -name "*.ts" -exec sed -i -e "s#from 'mongodb'# from '@neo9/n9-mongodb-client/mongodb'#g" {} +`
- :warning: `find ./ -mindepth 1 -type f -not -path "./node_modules/*" -not -path "./.git/*" -name "*.ts" -exec sed -i -e "s#AggregationCursor<#N9AggregationCursor<#g" {} +` Can fix most of cases
- :warning: `find ./ -mindepth 1 -type f -not -path "./node_modules/*" -not -path "./.git/*" -name "*.ts" -exec sed -i -e "s#Cursor<#N9FindCursor<#g" {} +` Can fix most of cases
- :warning: `find ./ -mindepth 1 -type f -not -path "./node_modules/*" -not -path "./.git/*" -name "*.ts" -exec sed -i -e "s# Cursor<# N9FindCursor<#g" {} +` Can fix most of cases
- :warning: `find ./ -mindepth 1 -type f -not -path "./node_modules/*" -not -path "./.git/*" -name "*.ts" -exec sed -i -e "s#Cursor,##g" {} +` Can fix most of cases
- :warning: `find ./ -mindepth 1 -type f -not -path "./node_modules/*" -not -path "./.git/*" -name "*.ts" -exec sed -i -e "s#{ FilterQuery } from '@neo9/n9-mongodb-client/mongodb';#{ FilterQuery } from '@neo9/n9-mongodb-client';#g" {} +` Can fix most of cases
- :warning: `find ./ -mindepth 1 -type f -not -path "./node_modules/*" -not -path "./.git/*" -name "*.ts" -exec sed -i -e "s#{ Cursor } from '@neo9/n9-mongodb-client/mongodb';#{ N9FindCursor } from '@neo9/n9-mongodb-client';#g" {} +` Can fix most of cases
Expand Down
37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,20 @@
],
"license": "MIT",
"scripts": {
"build": "rimraf dist/ mongodb.d.ts && tsc && rm -rf dist/test && mv dist/src/* dist/ && rm -rf dist/src && cp dist/mongodb.d.ts ./",
"dev": "rimraf dist/ && tsc --watch",
"build": "rimraf dist/ mongodb.d.ts && tsc && rm -rf dist/test && mv dist/src/* dist/ && rm -rf dist/src && cp dist/mongodb.d.ts ./",
"format": "prettier --write '{,@(src|test)/**/}*.*'",
"lint": "eslint --config .eslintrc.yaml '{src,test}/**/*.ts'",
"lint:apply": "npm run format && eslint --fix --config .eslintrc.yaml '{src,test}/**/*.ts'",
"lint:verbose": "eslint --fix --config .eslintrc.yaml '{src,test}/**/*.ts' --format unix '{src,test}/**/*.ts'",
"test:dev": "export NODE_ENV=test && TS_NODE_FILES=true ava --verbose --color --serial --watch",
"test": "export NODE_ENV=test && TS_NODE_FILES=true nyc ava --verbose --color --serial && nyc report --reporter=html",
"test:debug": "export NODE_ENV=test && TS_NODE_FILES=true ava debug --no-worker-threads --verbose --color --serial --host 0.0.0.0 --port 9230 --break",
"test:dev": "export NODE_ENV=test && TS_NODE_FILES=true ava --no-worker-threads --verbose --color --serial --watch",
"test": "export NODE_ENV=test && TS_NODE_FILES=true nyc ava --no-worker-threads --verbose --color --serial && nyc report --reporter=html",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov -f coverage.lcov",
"preversion": "npm test",
"prepublishOnly": "npm run build",
"release": "release-it",
"release:dry": "release-it --dry-run",
"build:changelog": "conventional-changelog -i CHANGELOG.md -s -p jscs -r 0",
"post:release": "echo Successfully released $npm_package_version",
"init": "./bin/setup-git-hooks",
"benchmark": "node benchmark.js",
"benchmark:debug": "node --inspect-brk benchmark.js"
},
Expand All @@ -35,10 +33,13 @@
"pre-commit": "npm run format && npm run lint"
}
},
"author": "Benjamin DANIEL <benjamin.daniel@neo9.fr>",
"author": {
"name": "Benjamin DANIEL",
"email": "benjamin.daniel@neo9.fr"
},
"repository": {
"type": "git",
"url": "git+https://github.com/neo9/n9-mongodb-client.git"
"url": "https://github.com/neo9/n9-node-routing.git"
},
"homepage": "https://github.com/neo9/n9-mongodb-client#n9-mongodb-client",
"tags": [
Expand All @@ -55,32 +56,32 @@
"fast-deep-equal": "^3.1.3",
"lodash": "^4.17.21",
"mingo-fork-no-hash": "^3.1.1",
"mongodb": "~6.0.0",
"mongodb": "~6.1.0",
"promise-pool-executor": "^1.1.1"
},
"peerDependencies": {
"class-transformer": "^0.4.0"
},
"devDependencies": {
"@ava/typescript": "^4.1.0",
"@commitlint/cli": "^17.7.1",
"@neo9/n9-coding-style": "^5.1.1",
"@release-it/conventional-changelog": "^7.0.1",
"@commitlint/cli": "^17.7.2",
"@neo9/n9-coding-style": "^5.1.2",
"@release-it/conventional-changelog": "^7.0.2",
"@tsconfig/node16": "^16.1.1",
"@types/deep-diff": "^1.0.2",
"@types/lodash": "^4.14.197",
"@types/deep-diff": "^1.0.3",
"@types/lodash": "^4.14.199",
"@types/node": "~16.18.48",
"@types/std-mocks": "^1.0.1",
"@types/std-mocks": "^1.0.2",
"ava": "^5.3.1",
"benny": "^3.7.1",
"class-transformer": "0.4.0",
"codecov": "^3.8.3",
"husky": "^4.3.8",
"mongodb-memory-server": "^8.15.1",
"mongodb-memory-server": "^9.0.0",
"nyc": "^15.1.0",
"prettier": "^3.0.3",
"release-it": "^16.1.5",
"std-mocks": "^1.0.1",
"release-it": "^16.2.1",
"std-mocks": "^2.0.0",
"ts-node": "^10.9.1",
"typescript": "~5.2.2"
},
Expand Down
Loading

0 comments on commit 966c8f2

Please sign in to comment.