Skip to content

Commit

Permalink
Refactoring:
Browse files Browse the repository at this point in the history
- Every classes and functions are exported in the root namespace
- URLVariables, XML, XMLList classes are removed
- Test programs are also refactored too
- Documentations are later
- The new version is 0.10
  • Loading branch information
samchon committed Mar 13, 2024
1 parent 0e224de commit 96587ce
Show file tree
Hide file tree
Showing 144 changed files with 4,026 additions and 5,433 deletions.
56 changes: 26 additions & 30 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
module.exports = {
root: true,
plugins: [
"@typescript-eslint"
],
extends: [
"plugin:@typescript-eslint/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json"
root: true,
plugins: ["@typescript-eslint"],
extends: ["plugin:@typescript-eslint/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
},
overrides: [
{
files: ["src/**/*.ts"],
rules: {
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-duplicate-imports": "error",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-floating-promises": "error",
},
},
overrides: [
{
files: ["src/**/*.ts"],
rules: {
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-duplicate-imports": "error",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-floating-promises": "error"
}
}
]
};
],
};
19 changes: 9 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@ jobs:
NodeJS:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
- run: npm install
- run: npm run compile
- run: npm run build
- run: npm run test:node
Browser:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16.x
- run: npm install --force
- run: npm run compile
- run: npm run bundle
node-version: 20.x
- run: npm install
- run: npm run build:test
- run: npm run test:browser
19 changes: 5 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
# ======================================================
# CUSTOM IGNORE
# ======================================================
node_modules/
dist/
.cache/
.parcel-cache/
bin/
lib/
node_modules/

package-lock.json

#----
# COMPILED FILES
#----
*.js
*.js.map
*.d.ts
*.d.ts.map
bundle/*.js
package-lock.json
4 changes: 0 additions & 4 deletions .npmignore

This file was deleted.

5 changes: 0 additions & 5 deletions .vscode/extensions.json

This file was deleted.

45 changes: 22 additions & 23 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/test/main.js",
"cwd": "${workspaceRoot}",

// TypeScript
"sourceMaps": true
},
{
"type": "node",
"request": "attach",
"name": "Attach to Process",
"port": 5858,
"outFiles": []
}
]
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/bin/test/main.js",
"cwd": "${workspaceRoot}",
// TypeScript
"sourceMaps": true
},
{
"type": "node",
"request": "attach",
"name": "Attach to Process",
"port": 5858,
"outFiles": []
}
]
}
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"editor.tabSize": 4,
"[typescript]": {
"editor.tabSize": 2,
"editor.formatOnSave": true,
"[typescript][javascript][json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
}
}
42 changes: 0 additions & 42 deletions build/bundle.ts

This file was deleted.

10 changes: 0 additions & 10 deletions build/clean.ts

This file was deleted.

20 changes: 0 additions & 20 deletions build/dist.ts

This file was deleted.

61 changes: 33 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,53 @@
{
"name": "tgrid",
"version": "0.9.0",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"description": "Grid Computing Framework for TypeScript",
"author": {
"name": "Jeongho Nam",
"email": "[email protected]",
"url": "https://github.com/samchon"
},
"version": "0.8.9",
"main": "index.js",
"typings": "index.d.ts",
"scripts": {
"api": "typedoc src --exclude \"**/+(test|benchmark)/**\" --excludeNotDocumented -out ../tgrid.com/docs/api",
"build": "npm run clean && npm run compile && npm run bundle && npm run test",
"bundle": "ts-node build/bundle",
"clean": "ts-node build/clean",
"compile": "tsc",
"dev": "tsc --watch",
"eslint": "eslint src",
"eslint:fix": "eslint src --fix",
"package": "npm run build && ts-node build/dist && cd dist && npm publish",
"package:next": "npm run package -- --tag next",
"prettier": "prettier src --write",
"api": "typedoc src --excludeNotDocumented -out ../tgrid.com/docs/api",
"build": "npm run build:main && npm run build:test",
"build:main": "rimraf lib && tsc",
"build:test": "rimraf bin && tsc --project test/tsconfig.json",
"dev": "npm run build:test -- --watch",
"prepare": "ts-patch install",
"prettier": "prettier src --write && prettier test --write",
"test": "npm run test:node && npm run test:browser",
"test:browser": "node dist/test/browser",
"test:node": "node dist/test/node"
"test:browser": "node bin/test/browser",
"test:node": "node bin/test/node"
},
"dependencies": {
"serialize-error": "^4.1.0",
"tstl": "^2.5.13",
"uuid": "^9.0.0",
"uuid": "^9.0.1",
"ws": "^7.5.3"
},
"devDependencies": {
"@types/browserify": "^12.0.37",
"@types/node": "^16.4.4",
"@types/puppeteer": "^5.4.4",
"@types/uuid": "^8.3.1",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/browserify": "^12.0.40",
"@types/node": "^20.11.26",
"@types/puppeteer": "^7.0.4",
"@types/uuid": "^9.0.8",
"@types/ws": "^7.4.7",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"browserify": "^17.0.0",
"eslint": "^8.22.0",
"eslint": "^8.57.0",
"local-web-server": "^2.6.0",
"mv": "^2.1.1",
"prettier": "^2.7.1",
"puppeteer": "^10.1.0",
"source-map-support": "^0.5.19",
"ts-node": "^10.1.0",
"typedoc": "^0.25.0",
"typescript": "^5.2.2",
"prettier": "^3.2.5",
"puppeteer": "^22.4.1",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.2",
"ts-patch": "^3.1.2",
"typedoc": "^0.25.12",
"typescript": "^5.4.2",
"typescript-transform-paths": "^3.4.7",
"whatwg-fetch": "^3.6.2"
},
"homepage": "https://tgrid.com",
Expand All @@ -74,5 +73,11 @@
"worker",
"shared worker",
"thread"
],
"files": [
"LICENSE",
"README.md",
"lib",
"src"
]
}
14 changes: 14 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
parser: "typescript",
printWidth: 80,
semi: true,
tabWidth: 2,
trailingComma: "all",
importOrder: [
"<THIRD_PARTY_MODULES>",
"^[./]",
],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
importOrderParserPlugins: ["decorators-legacy", "typescript"],
};
Loading

0 comments on commit 96587ce

Please sign in to comment.