Skip to content

Commit

Permalink
Bump dev deps, improve docs (e.g. removing website) (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikengervall authored Oct 23, 2023
1 parent 8776c32 commit a51fcb2
Show file tree
Hide file tree
Showing 29 changed files with 2,439 additions and 13,832 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = {
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier',
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
plugins: ['@typescript-eslint', 'no-only-tests'],
Expand Down
31 changes: 4 additions & 27 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 18.x
- name: Print context 🎉
env:
GH_REF: ${{ github.ref }}
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 18.x
- run: yarn prep
- run: yarn lint

Expand All @@ -45,7 +45,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 18.x
- run: yarn prep
- run: yarn test

Expand All @@ -59,7 +59,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 18.x
registry-url: https://registry.npmjs.org/
- name: yarn publish
env:
Expand All @@ -71,26 +71,3 @@ jobs:
if [ ${IS_BETA} = true ]; then export NPM_TAG="--tag beta"; fi
yarn prep
yarn publish --access=public ${NPM_TAG}
####### Deploy website
# website:
# name: Deploy website
# runs-on: ubuntu-latest
# needs: [npm_publish]
# steps:
# - uses: actions/checkout@v1
# - uses: actions/setup-node@v1
# with:
# node-version: 12.x
# - name: Deploy website
# env:
# GH_EMAIL: ${{ secrets.GH_EMAIL }}
# GH_NAME: ${{ secrets.GH_NAME }}
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
# GIT_USER: ${{ secrets.GH_NAME }}
# run: |
# git config --global user.name "${GH_NAME}"
# git config --global user.email "${GH_EMAIL}"
# echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc
# cd website
# yarn install
# yarn publish-gh-pages
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ module.exports = {
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
proseWrap: 'always',
}
10 changes: 0 additions & 10 deletions Dockerfile

This file was deleted.

32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Fast Find in Files

`fast-find-in-files` recursively searches all files in selected directory and sub-directories for text matches using partial string matching or regular expressions. The library is built entirely in C++ and exposes its functionality using [node-addon-api](https://github.com/nodejs/node-addon-api).
⚡️ Supercharge keyword searches in file systems with blazing speed powered by C++.

Thanks to [node-addon-api](https://github.com/nodejs/node-addon-api) `fast-find-in-files` is able to provide a
significantly faster search than other libraries. The library is built entirely in C++ and exposes its functionality
using TypeScript.

<p align="center">
<img alt="fast-find-in-files logo" width="300px" src="https://raw.githubusercontent.com/erikengervall/fast-find-in-files/master/resources/img/logo.png">
Expand All @@ -20,7 +24,7 @@
</a>
<p>

## Example
# Example

```ts
import { fastFindInFiles } from 'fast-find-in-files'
Expand All @@ -47,43 +51,47 @@ console.log(result)
// ]
```

## Development
# Development

### Install dependencies
## Install dependencies

```sh
yarn install
```

### Build
## Build

```sh
yarn build
```

### Test
## Test

```sh
yarn test
```

## Release
# Release

1. Bump version in `package.json` (create PR -> merge)
1. Bump version in `package.json` & `lerna.json` (create PR -> merge)
2. Create a new release on GitHub. This will also create a tag which will trigger the CI to publish a new version to npm

## Documentation
# Node Addon API

A Native Addon is a binary compiled from C/C++.

Learn more about `fast-find-in-files` on the [official website](https://erikengervall.github.io/fast-find-in-files).
Native Addons compile into a [Dynamically Linked Library (DLL)](https://en.wikipedia.org/wiki/Dynamic-link_library).

## Contributing

If you'd like to contribute, start by searching through the issues and pull requests to see whether someone else has raised a similar idea or question.
If you'd like to contribute, start by searching through the issues and pull requests to see whether someone else has
raised a similar idea or question.

If you don't see your idea listed, and you think it fits into the goals of this guide, do one of the following:

- If your contribution is **minor**, such as a typo fix, open a pull request.
- If your contribution is **major**, such as a new feature, start by opening an issue first. That way, other people can weigh in on the discussion before you do any work.
- If your contribution is **major**, such as a new feature, start by opening an issue first. That way, other people can
weigh in on the discussion before you do any work.

## License

Expand Down
18 changes: 0 additions & 18 deletions docker-compose.yml

This file was deleted.

32 changes: 0 additions & 32 deletions docs/getting-started.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/native-addons.md

This file was deleted.

12 changes: 0 additions & 12 deletions jest.config.js

This file was deleted.

11 changes: 11 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Config } from 'jest'

const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
testPathIgnorePatterns: ['/node_modules/'],
roots: ['<rootDir>/src-node'],
prettierPath: require.resolve('prettier-2'),
}

export default config
5 changes: 0 additions & 5 deletions lerna.json

This file was deleted.

41 changes: 20 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fast-find-in-files",
"version": "1.0.2",
"version": "1.0.3",
"description": "fast-find-in-files recursively searches sub-directories for needle matches",
"keywords": [
"fast",
Expand All @@ -26,34 +26,33 @@
"license": "MIT",
"gypfile": true,
"scripts": {
"clean": "rimraf node_modules build dist",
"clean": "rm -rf node_modules build dist",
"prep": "yarn && yarn build",
"build": "tsc",
"test": "jest",
"lint": "eslint \"./src-node/**/*.ts\""
},
"dependencies": {
"bindings": "^1.5.0",
"node-addon-api": "^2.0.0"
"node-addon-api": "^7.0.0"
},
"devDependencies": {
"@types/jest": "^24.0.24",
"@types/node": "^13.1.0",
"@types/prettier": "^1.19.0",
"@typescript-eslint/eslint-plugin": "^2.13.0",
"@typescript-eslint/parser": "^2.13.0",
"@typescript-eslint/typescript-estree": "^2.13.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-no-only-tests": "^2.4.0",
"eslint-plugin-prettier": "^3.1.2",
"jest": "^24.9.0",
"lerna": "^3.19.0",
"prettier": "^1.19.1",
"prettier-eslint": "^9.0.1",
"rimraf": "^3.0.0",
"ts-jest": "^24.2.0",
"ts-node": "^8.5.4",
"typescript": "^3.7.4"
"@types/jest": "^29.5.6",
"@types/node": "^20.8.7",
"@types/prettier": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"@typescript-eslint/typescript-estree": "^6.8.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-prettier": "^5.0.1",
"jest": "^29.7.0",
"prettier": "^3.0.3",
"prettier-2": "npm:prettier@^2",
"prettier-eslint": "^16.1.1",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
}
}
2 changes: 1 addition & 1 deletion src-node/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`fastFindInFiles throws for invalid options: "{
needle: 'valid',
excludeFolderPaths: [ 'some/path/', [length]: 1 ]
}
}" 1`] = `"Invalid input: options.excludeFolderPaths.excludeFolderPath must not end with \\"/\\""`;
}" 1`] = `"Invalid input: options.excludeFolderPaths.excludeFolderPath must not end with "/""`;

exports[`fastFindInFiles throws for invalid options: "{
options: {
Expand Down
Loading

0 comments on commit a51fcb2

Please sign in to comment.