-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #313 from svobik7/v4-pnpm
chore(deps): updated deps, patched dts-bundle-generator, backt to vitest
- Loading branch information
Showing
13 changed files
with
2,609 additions
and
4,328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,16 +21,17 @@ | |
}, | ||
"scripts": { | ||
"prepare": "husky", | ||
"postinstall": "yarn patch-package", | ||
"clean": "rm -rf dist || true", | ||
"build": "yarn clean && yarn typecheck && yarn test && node esbuild.mjs && yarn build:types && yarn lint", | ||
"build:types": "yarn dts-bundle-generator --config ./dts.config.js", | ||
"build:no-test": "node esbuild.mjs", | ||
"build:coverage": "yarn clean && yarn typecheck && yarn test && node esbuild.mjs", | ||
"lint": "eslint . --max-warnings 0", | ||
"lint-fix": "eslint . --fix --max-warnings 0", | ||
"test": "jest", | ||
"test:watch": "jest --watch", | ||
"test:coverage": "yarn test --coverage", | ||
"test": "vitest --no-watch", | ||
"test:watch": "vitest", | ||
"test:coverage": "yarn vitest --no-watch --coverage", | ||
"typecheck": "yarn tsc --noEmit", | ||
"prepublish": "yarn build", | ||
"publish:canary": "yarn publish --tag canary", | ||
|
@@ -44,37 +45,35 @@ | |
"path-to-regexp": "^8.2.0" | ||
}, | ||
"devDependencies": { | ||
"@jest/globals": "^29.7.0", | ||
"@semantic-release/changelog": "^6.0.3", | ||
"@semantic-release/commit-analyzer": "^13.0.0", | ||
"@semantic-release/git": "^10.0.1", | ||
"@semantic-release/github": "^11.0.1", | ||
"@semantic-release/npm": "^12.0.1", | ||
"@semantic-release/release-notes-generator": "^14.0.1", | ||
"@types/jest": "^29.5.14", | ||
"@types/node": "^22.9.0", | ||
"@typescript-eslint/eslint-plugin": "^8.13.0", | ||
"@typescript-eslint/parser": "^8.13.0", | ||
"@types/node": "^22.10.1", | ||
"@typescript-eslint/eslint-plugin": "^8.16.0", | ||
"@typescript-eslint/parser": "^8.16.0", | ||
"@vitest/coverage-istanbul": "^2.1.6", | ||
"arg": "^5.0.2", | ||
"colors": "^1.4.0", | ||
"commitizen": "^4.3.0", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"dts-bundle-generator": "^9.2.5", | ||
"eslint": "^8.42.0", | ||
"dts-bundle-generator": "^9.5.1", | ||
"eslint": "^8.57.1", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-import-resolver-typescript": "^3.5.5", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"eslint-plugin-simple-import-sort": "^12.0.0", | ||
"eslint-plugin-unused-imports": "^4.1.4", | ||
"husky": "^9.0.7", | ||
"jest": "^29.7.0", | ||
"husky": "^9.1.7", | ||
"lint-staged": "^15.2.10", | ||
"prettier": "^3.2.4", | ||
"patch-package": "^8.0.0", | ||
"prettier": "^3.4.1", | ||
"semantic-release": "^24.2.0", | ||
"ts-jest": "^29.2.5", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.6.3" | ||
"typescript": "^5.7.2", | ||
"vitest": "^2.1.6" | ||
}, | ||
"license": "MIT", | ||
"keywords": [ | ||
|
@@ -113,5 +112,10 @@ | |
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e", | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"dts-bundle-generator": "patches/dts-bundle-generator.patch" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/node_modules/dts-bundle-generator/dist/types-usage-evaluator.js b/node_modules/dts-bundle-generator/dist/types-usage-evaluator.js | ||
index a09f141..9f25078 100644 | ||
--- a/node_modules/dts-bundle-generator/dist/types-usage-evaluator.js | ||
+++ b/node_modules/dts-bundle-generator/dist/types-usage-evaluator.js | ||
@@ -111,6 +111,9 @@ class TypesUsageEvaluator { | ||
if (ts.isExportDeclaration(node) && node.exportClause !== undefined && ts.isNamedExports(node.exportClause)) { | ||
for (const exportElement of node.exportClause.elements) { | ||
const exportElementSymbol = (0, typescript_1.getImportExportReferencedSymbol)(exportElement, this.typeChecker); | ||
+ if(exportElementSymbol === undefined) { | ||
+ continue; | ||
+ } | ||
// i.e. `import * as NS from './local-module'` | ||
const namespaceImportForElement = (0, typescript_1.getDeclarationsForSymbol)(exportElementSymbol).find(ts.isNamespaceImport); | ||
if (namespaceImportForElement !== undefined) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { getConfig } from './config' | ||
import { type CliParams } from './types' | ||
|
||
const inputParams: CliParams = { | ||
locales: ['en', 'cs', 'es'], | ||
defaultLocale: 'en', | ||
originDir: 'src/__mocks__/roots', | ||
localizedDir: 'src/__mocks__/app', | ||
prefixDefaultLocale: true, | ||
packageDir: '', | ||
} | ||
|
||
describe('getConfig', () => { | ||
test('valid config', () => { | ||
const config = getConfig(inputParams) | ||
|
||
expect(config.locales).toStrictEqual(['en', 'cs', 'es']) | ||
expect(config.defaultLocale).toStrictEqual('en') | ||
expect(config.prefixDefaultLocale).toStrictEqual(true) | ||
expect(config.afterGenerate).toStrictEqual(undefined) | ||
expect(config.getOriginAbsolutePath('page.ts')).toStrictEqual( | ||
'src/__mocks__/roots/page.ts' | ||
) | ||
expect(config.getLocalizedAbsolutePath('page.ts')).toStrictEqual( | ||
'src/__mocks__/app/page.ts' | ||
) | ||
expect(config.getDistAbsolutePath('index.js')).toStrictEqual( | ||
'dist/index.js' | ||
) | ||
}) | ||
}) |
Oops, something went wrong.