From 14a880484e4081fc2f8947e704c6b83026047195 Mon Sep 17 00:00:00 2001 From: SatoshiShibanuma Date: Thu, 22 May 2025 20:05:28 +0000 Subject: [PATCH 1/6] Start draft PR From 92f3c6716f0988e5bb0eb0e1b303f624d79182bc Mon Sep 17 00:00:00 2001 From: SatoshiShibanuma Date: Thu, 22 May 2025 20:05:50 +0000 Subject: [PATCH 2/6] Update package.json with modern dependencies and configurations --- package.json | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 5aa2568..cbf75cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "osmosis", - "version": "1.1.10", + "name": "node-osmosis", + "version": "1.1.11", "description": "Web scraper for NodeJS", "keywords": [ "web", @@ -24,19 +24,38 @@ "needle": "^1.6.0" }, "devDependencies": { - "jscs": ">=3.0.2", - "nodeunit": "0.11.3" + "@types/node": "^18.15.0", + "eslint": "^8.36.0", + "eslint-config-recommended": "^4.1.0", + "jest": "^29.5.0", + "ts-node": "^10.9.1", + "typescript": "^4.9.5" }, "scripts": { - "test": "node ./node_modules/.bin/nodeunit test" + "test": "jest", + "lint": "eslint . --ext .js,.ts", + "lint:fix": "eslint . --ext .js,.ts --fix", + "prepare": "tsc", + "clean": "rm -rf dist" }, "license": "MIT", - "main": "index", + "main": "dist/index.js", + "types": "dist/index.d.ts", "engines": { - "node": ">= 0.8.0" + "node": ">= 14.0.0" }, "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/rchipka/node-osmosis/issues" + }, + "jest": { + "testEnvironment": "node", + "transform": {} + }, + "eslintConfig": { + "extends": "recommended", + "rules": { + "no-console": "off" + } } -} +} \ No newline at end of file From da476e15652523516ffbda0299a51c5b8af1dbb0 Mon Sep 17 00:00:00 2001 From: SatoshiShibanuma Date: Thu, 22 May 2025 20:05:55 +0000 Subject: [PATCH 3/6] Add TypeScript configuration --- tsconfig.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tsconfig.json diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..83c5197 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "lib": ["es2020"], + "declaration": true, + "outDir": "./dist", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["lib/**/*"], + "exclude": ["node_modules", "dist"] +} \ No newline at end of file From 81c38004aedf29fc07367ca0f4eb6ad8636855a3 Mon Sep 17 00:00:00 2001 From: SatoshiShibanuma Date: Thu, 22 May 2025 20:06:01 +0000 Subject: [PATCH 4/6] Add ESLint configuration --- .eslintrc.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..9936782 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,20 @@ +{ + "env": { + "node": true, + "es2021": true, + "jest": true + }, + "extends": [ + "eslint:recommended" + ], + "parserOptions": { + "ecmaVersion": 12, + "sourceType": "module" + }, + "rules": { + "no-console": "warn", + "semi": ["error", "always"], + "quotes": ["error", "single"], + "indent": ["error", 2] + } +} \ No newline at end of file From 2bb17c74fbcd9a9dc32711befe5b15045c55977b Mon Sep 17 00:00:00 2001 From: SatoshiShibanuma Date: Thu, 22 May 2025 20:06:05 +0000 Subject: [PATCH 5/6] Update .gitignore with standard ignore patterns --- .gitignore | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 74ca64e..941c148 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ node_modules/ -docs/ -npm-debug.log +dist/ +*.log +.env +.DS_Store +coverage/ +.nyc_output/ +.vscode/ +.idea/ \ No newline at end of file From e11f5dcca77147062d5bb9ed622d530b3cad7e2d Mon Sep 17 00:00:00 2001 From: SatoshiShibanuma Date: Thu, 22 May 2025 20:06:55 +0000 Subject: [PATCH 6/6] Add basic test configuration --- test/basic.test.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test/basic.test.js diff --git a/test/basic.test.js b/test/basic.test.js new file mode 100644 index 0000000..111dc44 --- /dev/null +++ b/test/basic.test.js @@ -0,0 +1,5 @@ +describe('Project Configuration', () => { + test('Basic test setup works', () => { + expect(true).toBe(true); + }); +}); \ No newline at end of file