Skip to content

Commit

Permalink
chore: updated nx and removed exposed cloud token -> nx login for rem…
Browse files Browse the repository at this point in the history
…ote caching
  • Loading branch information
yann510 committed Oct 28, 2024
1 parent 37f35dd commit e858d81
Show file tree
Hide file tree
Showing 22 changed files with 6,933 additions and 2,940 deletions.
10 changes: 8 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22.5.1
6 changes: 5 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/coverage
/.nx/cache
/.nx/workspace-data
changelog.md
**/data-chunk*
38 changes: 12 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,37 @@
## [1.8.1](https://github.com/yann510/ss-search/compare/v1.8.0...v1.8.1) (2023-09-12)


### Bug Fixes

* semantic-release ([1405328](https://github.com/yann510/ss-search/commit/1405328445d20c7eae8c9edf50c9f62ecd449c36))
* version tagging ([aaf15a4](https://github.com/yann510/ss-search/commit/aaf15a4185eb101ad14a3bbf376950d17ad3af07))




- semantic-release ([1405328](https://github.com/yann510/ss-search/commit/1405328445d20c7eae8c9edf50c9f62ecd449c36))
- version tagging ([aaf15a4](https://github.com/yann510/ss-search/commit/aaf15a4185eb101ad14a3bbf376950d17ad3af07))

## [1.8.1](https://github.com/yann510/ss-search/compare/v1.8.0...v1.8.1) (2023-09-12)


### Bug Fixes

* semantic-release ([1405328](https://github.com/yann510/ss-search/commit/1405328445d20c7eae8c9edf50c9f62ecd449c36))
* version tagging ([aaf15a4](https://github.com/yann510/ss-search/commit/aaf15a4185eb101ad14a3bbf376950d17ad3af07))
- semantic-release ([1405328](https://github.com/yann510/ss-search/commit/1405328445d20c7eae8c9edf50c9f62ecd449c36))
- version tagging ([aaf15a4](https://github.com/yann510/ss-search/commit/aaf15a4185eb101ad14a3bbf376950d17ad3af07))

# [1.8.0](https://github.com/yann510/ss-search/compare/v1.7.0...v1.8.0) (2023-09-12)


### Bug Fixes

* semantic-release ([f5fdfdf](https://github.com/yann510/ss-search/commit/f5fdfdf0f125edd1864c12b65be5a28dda0ac9bb))
* semantic-release ([0f9d647](https://github.com/yann510/ss-search/commit/0f9d647883f81cab4376be7318aeff07438f58aa))
* semantic-release + format ([4661021](https://github.com/yann510/ss-search/commit/4661021c7c4f08951d6b6c468332629333b22e89))

- semantic-release ([f5fdfdf](https://github.com/yann510/ss-search/commit/f5fdfdf0f125edd1864c12b65be5a28dda0ac9bb))
- semantic-release ([0f9d647](https://github.com/yann510/ss-search/commit/0f9d647883f81cab4376be7318aeff07438f58aa))
- semantic-release + format ([4661021](https://github.com/yann510/ss-search/commit/4661021c7c4f08951d6b6c468332629333b22e89))

### Features

* updated all dependencies + improved return typing with overloads for the search function ([#66](https://github.com/yann510/ss-search/issues/66)) ([e6a51b1](https://github.com/yann510/ss-search/commit/e6a51b12fcced416671c1d434b40ee83410e05b3))




- updated all dependencies + improved return typing with overloads for the search function ([#66](https://github.com/yann510/ss-search/issues/66)) ([e6a51b1](https://github.com/yann510/ss-search/commit/e6a51b12fcced416671c1d434b40ee83410e05b3))

# [1.8.0](https://github.com/yann510/ss-search/compare/v1.7.0...v1.8.0) (2023-09-12)


### Bug Fixes

* semantic-release ([f5fdfdf](https://github.com/yann510/ss-search/commit/f5fdfdf0f125edd1864c12b65be5a28dda0ac9bb))
* semantic-release ([0f9d647](https://github.com/yann510/ss-search/commit/0f9d647883f81cab4376be7318aeff07438f58aa))
* semantic-release + format ([4661021](https://github.com/yann510/ss-search/commit/4661021c7c4f08951d6b6c468332629333b22e89))

- semantic-release ([f5fdfdf](https://github.com/yann510/ss-search/commit/f5fdfdf0f125edd1864c12b65be5a28dda0ac9bb))
- semantic-release ([0f9d647](https://github.com/yann510/ss-search/commit/0f9d647883f81cab4376be7318aeff07438f58aa))
- semantic-release + format ([4661021](https://github.com/yann510/ss-search/commit/4661021c7c4f08951d6b6c468332629333b22e89))

### Features

* updated all dependencies + improved return typing with overloads for the search function ([#66](https://github.com/yann510/ss-search/issues/66)) ([e6a51b1](https://github.com/yann510/ss-search/commit/e6a51b12fcced416671c1d434b40ee83410e05b3))
- updated all dependencies + improved return typing with overloads for the search function ([#66](https://github.com/yann510/ss-search/issues/66)) ([e6a51b1](https://github.com/yann510/ss-search/commit/e6a51b12fcced416671c1d434b40ee83410e05b3))
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ const results = search(data, ['arrayObjects[arrayObjectProperty]'], 'arrayObject

Customize your search experience using the following options:

| Option parameter | Value | Description |
| ---------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `withScore` | `true` | When set to `true`, the search function will return an array of objects, each containing the matched element and its corresponding score. The score represents how closely the element matches the search text, with a higher score indicating a closer match. Even if the search doesn't match, it will return a score of 0. |
| `withScore` | `false` | When set to `false` or not provided, the function will return an array of matched elements without their scores. |
| Option parameter | Value | Description |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `withScore` | `true` | When set to `true`, the search function will return an array of objects, each containing the matched element and its corresponding score. The score represents how closely the element matches the search text, with a higher score indicating a closer match. Even if the search doesn't match, it will return a score of 0. |
| `withScore` | `false` | When set to `false` or not provided, the function will return an array of matched elements without their scores. |

### Example Usage

Expand All @@ -164,7 +164,7 @@ With `withScore` option:
```javascript
const data = [{ name: 'John' }, { name: 'Jane' }, { name: 'Doe' }]
const result = search(data, ['name'], 'John', { withScore: true })
console.log(result)
console.log(result)
// [
// { element: { name: 'John' }, score: 1 },
// { element: { name: 'Jane' }, score: 0 },
Expand Down
19 changes: 4 additions & 15 deletions benchmark/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "benchmark/src",
"projectType": "application",
"tags": [],
"targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
Expand Down Expand Up @@ -52,26 +53,14 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["benchmark/**/*.ts"]
}
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "benchmark/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
"jestConfig": "benchmark/jest.config.ts"
}
}
},
"tags": []
}
}
2 changes: 1 addition & 1 deletion benchmark/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface BenchmarkResult {
}

const benchmarkResultPath = `${__dirname}/../../../../web-app/src/assets/benchmarkResults.json`
const ignoredVersions = ["1.9.1"]
const ignoredVersions = ['1.9.1']

async function main() {
const packageVersions: string[] = JSON.parse(execSync('npm view ss-search versions --json').toString())
Expand Down
60 changes: 43 additions & 17 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"tasksRunnerOptions": {
"default": {
"runner": "nx-cloud",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"],
"accessToken": "OGQ0YTdhYTktYzk5OS00ZGMxLThhNzAtYTMxMzBlNzllMWM5fHJlYWQtd3JpdGU="
}
}
"workspaceLayout": {
"projectNameAndRootFormat": "as-provided"
},
"workspaceLayout": { "projectNameAndRootFormat": "as-provided" },
"targetDefaults": {
"build": { "dependsOn": ["^build"], "inputs": ["production", "^production"] },
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/.eslintignore", "{workspaceRoot}/eslint.config.js"]
"build": {
"dependsOn": ["^build"],
"inputs": ["production", "^production"],
"cache": true
},
"@nx/jest:jest": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"cache": true,
"options": {
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
},
"@nx/vite:test": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"cache": true
},
"test": { "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"] }
"@nx/eslint:lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/.eslintignore", "{workspaceRoot}/eslint.config.js"],
"cache": true
}
},
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
Expand All @@ -33,9 +47,21 @@
},
"generators": {
"@nx/react": {
"application": { "style": "css", "linter": "eslint", "bundler": "rspack", "babel": true },
"component": { "style": "css" },
"library": { "style": "css", "linter": "eslint" }
"application": {
"style": "css",
"linter": "eslint",
"bundler": "rspack",
"babel": true
},
"component": {
"style": "css"
},
"library": {
"style": "css",
"linter": "eslint"
}
}
}
},
"useInferencePlugins": false,
"nxCloudId": "670f1d8b22b1a18844d39587"
}
Loading

0 comments on commit e858d81

Please sign in to comment.