From 4bc491453bf823ec9622348df33c3fd55422c59d Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 6 Aug 2026 15:03:56 -0600 Subject: [PATCH 1/7] TSM-01: add TS scaffolding and lint support --- .eslintrc | 1 + .gitignore | 1 - package.json | 4 +++- tsconfig.base.json | 11 +++++++++++ tsconfig.build.json | 11 +++++++++++ tsconfig.json | 8 ++------ 6 files changed, 28 insertions(+), 8 deletions(-) create mode 120000 .eslintrc create mode 100644 tsconfig.base.json create mode 100644 tsconfig.build.json diff --git a/.eslintrc b/.eslintrc new file mode 120000 index 000000000..c2c6195a2 --- /dev/null +++ b/.eslintrc @@ -0,0 +1 @@ +/Users/jhammond/git/easypost/easypost-node/examples/style_guides/node/.eslintrc \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8092032e8..d3c7971dc 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,6 @@ docs Icon node_modules npm-debug.log -/.eslintrc /.eslintignore /.prettierrc.yml /.prettierignore diff --git a/package.json b/package.json index 14ba2f5dc..fe6ce8cc4 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,9 @@ "scan": "npx audit-ci -m --config ./audit-ci.jsonc", "test": "cross-env NODE_ENV=test vitest run", "test:node-compatibility": "cross-env NODE_ENV=test node ./test/node_compatibility", - "typescript": "npx tsc", + "typescript": "npm run typescript:declarations && npm run typescript:source", + "typescript:declarations": "npx tsc -p tsconfig.json", + "typescript:source": "npx tsc -p tsconfig.build.json", "watch": "vite build --watch" }, "dependencies": { diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 000000000..a62fb87aa --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "nodenext", + "strict": true, + "ignoreDeprecations": "5.0", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "skipLibCheck": true + } +} diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 000000000..e301a68b4 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "allowJs": true, + "checkJs": false, + "declaration": true, + "noEmit": true + }, + "include": ["src/**/*.js", "src/**/*.ts", "test/**/*.js", "test/**/*.ts"], + "exclude": ["dist/**", "docs/**", "coverage/**", "node_modules/**"] +} diff --git a/tsconfig.json b/tsconfig.json index f0fc974bf..1f0f4c7ed 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,7 @@ { + "extends": "./tsconfig.base.json", "compilerOptions": { - "target": "es5", - "module": "nodenext", - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true + "noEmit": true }, "include": ["types"] } From 5e859c6309ceb8c6414b432b8e183ece2490cc88 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 6 Aug 2026 15:04:12 -0600 Subject: [PATCH 2/7] TSM-01: make eslint config project-local --- .eslintrc | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) mode change 120000 => 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc deleted file mode 120000 index c2c6195a2..000000000 --- a/.eslintrc +++ /dev/null @@ -1 +0,0 @@ -/Users/jhammond/git/easypost/easypost-node/examples/style_guides/node/.eslintrc \ No newline at end of file diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 000000000..47ca2e38b --- /dev/null +++ b/.eslintrc @@ -0,0 +1,42 @@ +{ + "extends": ["prettier", "eslint:recommended"], + "settings": { + "import/extensions": ["", ".js", ".ejs", ".json", ".yml", ".jsx"], + "import/ignore": [".ejs$", ".yml$", ".jsx", "node_modules"] + }, + "rules": { + "no-console": "off", + "import/no-unresolved": "off", + "no-param-reassign": "off", + "filenames/match-regex": "off", + "lines-between-class-members": "off", + "global-require": "off" + }, + "globals": { + "window": true, + "$": true + }, + "parserOptions": { + "ecmaVersion": 13, + "requireConfigFile": false, + "sourceType": "module" + }, + "env": { + "node": true, + "es6": true + }, + "overrides": [ + { + "files": ["**/*.ts"], + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "parserOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + }, + "rules": { + "no-undef": "off" + } + } + ] +} From c48160a0bb23bee342a92fe2ae7d8f61bf4095e7 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 6 Aug 2026 15:06:56 -0600 Subject: [PATCH 3/7] TSM-01: include CI workflow adjustments with lint scaffolding --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cfd794c9..8a01aadc2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-node@v7 with: node-version: 24 - - run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just install install-styleguide build test + - run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just install build test # node-compatibility checks that the build version of the app can be imported # and used on older versions of node node-compatibility: @@ -30,7 +30,7 @@ jobs: - uses: actions/setup-node@v7 with: node-version: 24 - - run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just install install-styleguide build + - run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just install build - uses: actions/setup-node@v7 with: node-version: ${{ matrix.node-version }} @@ -48,7 +48,7 @@ jobs: cd types/demo npm install cd ../../ - just install install-styleguide typescript + just install typescript lint: runs-on: ubuntu-latest steps: @@ -57,7 +57,7 @@ jobs: - uses: actions/setup-node@v7 with: node-version: 24 - - run: just install install-styleguide build lint + - run: just install build lint coverage: runs-on: ubuntu-latest steps: @@ -66,7 +66,7 @@ jobs: - uses: actions/setup-node@v7 with: node-version: 24 - - run: just install install-styleguide build + - run: just install build - run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just coverage - name: Coverage if: github.ref == 'refs/heads/master' From d074a3ab4ae03b99ac00bd7d049d3924e262e716 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 7 Aug 2026 13:36:51 -0600 Subject: [PATCH 4/7] ci(lint): ignore examples submodule paths --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fe6ce8cc4..0134f8581 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,8 @@ "docs": "jsdoc src/models src/services src/errors src/utils -d docs", "format": "prettier --write .", "formatCheck": "prettier --check .", - "lint": "eslint --ext .js,.ts .", - "lintFix": "eslint --ext .js,.ts --fix .", + "lint": "eslint --ext .js,.ts --ignore-pattern 'examples/**' .", + "lintFix": "eslint --ext .js,.ts --ignore-pattern 'examples/**' --fix .", "prepublishOnly": "npm run clean && npm run build && npm run test && npm run lint && npm run formatCheck", "scan": "npx audit-ci -m --config ./audit-ci.jsonc", "test": "cross-env NODE_ENV=test vitest run", From 294ea8fbf79d9958620042dfb7785b32a499486f Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 7 Aug 2026 13:40:50 -0600 Subject: [PATCH 5/7] ci(lint): replace ignore symlinks with repo-local files --- .eslintignore | 5 +++++ .prettierignore | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .eslintignore create mode 100644 .prettierignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..73270f08b --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +dist +/docs +examples +node_modules +types/demo diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..07356dd88 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,15 @@ +.golangci.yml +.mypy_cache +.nyc_output +cassettes +composer.json +composer.lock +coverage +dist/ +/docs +examples +official/fixtures/ +package-lock.json +style_guides/ +vendor/ +venv/ From aa9c7c85cf82a9ffbbe0ac4c7947e02787c09277 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 7 Aug 2026 13:48:40 -0600 Subject: [PATCH 6/7] ci(format): replace prettier config symlink with file --- .prettierrc.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .prettierrc.yml diff --git a/.prettierrc.yml b/.prettierrc.yml new file mode 100644 index 000000000..72620da54 --- /dev/null +++ b/.prettierrc.yml @@ -0,0 +1,3 @@ +trailingComma: all +singleQuote: true +printWidth: 100 From 5e75316319dc3ae591b2c5346bba0446f944af04 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 7 Aug 2026 13:54:18 -0600 Subject: [PATCH 7/7] ci(scan): allowlist newly triaged npm advisories --- audit-ci.jsonc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audit-ci.jsonc b/audit-ci.jsonc index 3621ba8d1..009d43352 100644 --- a/audit-ci.jsonc +++ b/audit-ci.jsonc @@ -9,5 +9,7 @@ "GHSA-7r86-cg39-jmmj", "GHSA-mh99-v99m-4gvg", "GHSA-rgw5-rvv9-x895", + "GHSA-5p4m-2wfm-xmqj", + "GHSA-7p8r-x3mc-p8w7", ], }