Closed lizozom closed 1 year ago
Thanks @lizozom that's a good idea. I just checked the splitting functions where regex are used. It seems that the linter removed the backslashes. Could you maybe have a look at e.g. at the splitBySentences function and check how to avoid unwanted modifications in the future?
Yes, those seem unnecessary for the regex to work https://regex101.com/r/26omjP/1
Great, thanks for checking!
I just noticed that there is something failing during build:
Run npm run build
npm run build
shell: /usr/bin/bash -e {0}
> semanticfinder@1.0.0 build /home/runner/work/SemanticFinder/SemanticFinder
> webpack --config webpack.config.js
[webpack-cli] Failed to load '/home/runner/work/SemanticFinder/SemanticFinder/webpack.config.js' config
[webpack-cli] Error: Cannot find module 'ajv/dist/compile/codegen'
Require stack:
- /home/runner/work/SemanticFinder/SemanticFinder/node_modules/ajv-keywords/dist/definitions/typeof.js
- /home/runner/work/SemanticFinder/SemanticFinder/node_modules/ajv-keywords/dist/keywords/typeof.js
- /home/runner/work/SemanticFinder/SemanticFinder/node_modules/ajv-keywords/dist/keywords/index.js
- /home/runner/work/SemanticFinder/SemanticFinder/node_modules/ajv-keywords/dist/index.js
- /home/runner/work/SemanticFinder/SemanticFinder/node_modules/schema-utils/dist/validate.js
- /home/runner/work/SemanticFinder/SemanticFinder/node_modules/schema-utils/dist/index.js
- /home/runner/work/SemanticFinder/SemanticFinder/node_modules/mini-css-extract-plugin/dist/index.js
- /home/runner/work/SemanticFinder/SemanticFinder/webpack.config.js
- /home/runner/work/SemanticFinder/SemanticFinder/node_modules/webpack-cli/lib/webpack-cli.js
- /home/runner/work/SemanticFinder/SemanticFinder/node_modules/webpack-cli/lib/bootstrap.js
- /home/runner/work/SemanticFinder/SemanticFinder/node_modules/webpack-cli/bin/cli.js
- /home/runner/work/SemanticFinder/SemanticFinder/node_modules/webpack/bin/webpack.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:931:15)
at Function.Module._load (internal/modules/cjs/loader.js:774:[2](https://github.com/do-me/SemanticFinder/actions/runs/5653876044/job/15315817765#step:5:2)7)
at Module.require (internal/modules/cjs/loader.js:100[3](https://github.com/do-me/SemanticFinder/actions/runs/5653876044/job/15315817765#step:5:3):19)
at require (internal/modules/cjs/helpers.js:107:18)
at Object.<anonymous> (/home/runner/work/SemanticFinder/SemanticFinder/node_modules/ajv-keywords/dist/definitions/typeof.js:3:19)
at Module._compile (internal/modules/cjs/loader.js:111[4](https://github.com/do-me/SemanticFinder/actions/runs/5653876044/job/15315817765#step:5:5):14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:979:32)
at Function.Module._load (internal/modules/cjs/loader.js:819:12)
at Module.require (internal/modules/cjs/loader.js:1003:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/runner/work/SemanticFinder/SemanticFinder/node_modules/ajv-keywords/dist/definitions/typeof.js',
'/home/runner/work/SemanticFinder/SemanticFinder/node_modules/ajv-keywords/dist/keywords/typeof.js',
'/home/runner/work/SemanticFinder/SemanticFinder/node_modules/ajv-keywords/dist/keywords/index.js',
'/home/runner/work/SemanticFinder/SemanticFinder/node_modules/ajv-keywords/dist/index.js',
'/home/runner/work/SemanticFinder/SemanticFinder/node_modules/schema-utils/dist/validate.js',
'/home/runner/work/SemanticFinder/SemanticFinder/node_modules/schema-utils/dist/index.js',
'/home/runner/work/SemanticFinder/SemanticFinder/node_modules/mini-css-extract-plugin/dist/index.js',
'/home/runner/work/SemanticFinder/SemanticFinder/webpack.config.js',
'/home/runner/work/SemanticFinder/SemanticFinder/node_modules/webpack-cli/lib/webpack-cli.js',
'/home/runner/work/SemanticFinder/SemanticFinder/node_modules/webpack-cli/lib/bootstrap.js',
'/home/runner/work/SemanticFinder/SemanticFinder/node_modules/webpack-cli/bin/cli.js',
'/home/runner/work/SemanticFinder/SemanticFinder/node_modules/webpack/bin/webpack.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! semanticfinder@1.0.0 build: `webpack --config webpack.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the semanticfinder@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2023-07-2[5](https://github.com/do-me/SemanticFinder/actions/runs/5653876044/job/15315817765#step:5:6)T07_24_47_40[6](https://github.com/do-me/SemanticFinder/actions/runs/5653876044/job/15315817765#step:5:7)Z-debug.log
Error: Process completed with exit code 2.
It seems like it's ajv codegen's fault and that there are some TS files. Do you know where the error could originate from @lizozom?
Unfortunately due to this bug none of the subsequent builds are working. To proceed for the time being I've opened a PR reverting Husky so that we can build.
This code was part of the https://github.com/do-me/SemanticFinder/pull/26 PR, but I'm splitting it out to reduce the size of each PR.
The goal is to keep code consistent between devs in terms of coding conventions and styling.
.eslintrc
file, extending the eslintstandard
husky
ton runeslint --fix
before each commit, fixing all basic issues such as indentation, unused imports etc.