Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Igorkowalski94 committed Nov 3, 2024
1 parent 42fd8f7 commit b4db433
Show file tree
Hide file tree
Showing 5 changed files with 625 additions and 706 deletions.
1 change: 1 addition & 0 deletions fileComposition.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export const fileCompositionConfig = createFileComposition({
"function",
"variable",
"variableExpression",
"propertyDefinition",
],
scope: "nestedSelectors",
format: "{camelCase}",
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,34 +65,34 @@
"husky:prepare": "husky install"
},
"dependencies": {
"@typescript-eslint/utils": "^8.8.0",
"@typescript-eslint/utils": "^8.12.2",
"comment-json": "^4.2.5",
"js-yaml": "^4.1.0",
"jsonschema": "^1.4.1",
"micromatch": "^4.0.8"
},
"devDependencies": {
"@eslint/compat": "^1.2.0",
"@eslint/js": "^9.12.0",
"@eslint/compat": "^1.2.2",
"@eslint/js": "^9.14.0",
"@types/eslint__js": "^8.42.3",
"@types/jest": "^29.5.13",
"@types/jest": "^29.5.14",
"@types/js-yaml": "^4.0.9",
"@types/micromatch": "^4.0.9",
"@types/node": "^22.7.5",
"eslint": "^9.12.0",
"@types/node": "^22.8.7",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-project-structure": "3.7.1",
"eslint-plugin-project-structure": "3.10.0",
"husky": "^9.1.6",
"jest": "^29.7.0",
"prettier": "^3.3.3",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"ts-prune": "^0.10.3",
"tsup": "^8.3.0",
"tsup": "^8.3.5",
"typescript": "^5.6.3",
"typescript-eslint": "^8.8.1"
"typescript-eslint": "^8.12.2"
},
"resolutions": {
"micromatch": "^4.0.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ describe("isNamedExport", () => {
type: TSESTree.AST_NODE_TYPES.ExportNamedDeclaration,
specifiers: [
{
local: { name: "className" },
exported: { name: "className" },
local: {
name: "className",
type: TSESTree.AST_NODE_TYPES.Identifier,
},
exported: {
name: "className",
type: TSESTree.AST_NODE_TYPES.Identifier,
},
},
],
},
Expand All @@ -57,6 +63,7 @@ describe("isNamedExport", () => {
currentName: "className",
currentNode: {
name: "className",
type: TSESTree.AST_NODE_TYPES.Identifier,
} as unknown as IsNamedExportReturn["currentNode"],
isNamedExport: true,
},
Expand All @@ -74,8 +81,70 @@ describe("isNamedExport", () => {
type: TSESTree.AST_NODE_TYPES.ExportNamedDeclaration,
specifiers: [
{
local: { name: "className" },
exported: { name: "className2" },
local: {
name: "className",
type: TSESTree.AST_NODE_TYPES.Literal,
},
exported: {
name: "className",
type: TSESTree.AST_NODE_TYPES.Literal,
},
},
],
},
],
},
} as unknown as IsNamedExportProps["node"],
},
expected: {
currentName: "className",
currentNode: {
type: TSESTree.AST_NODE_TYPES.ClassDeclaration,
parent: {
type: TSESTree.AST_NODE_TYPES.Program,
body: [
{
type: TSESTree.AST_NODE_TYPES.ExportNamedDeclaration,
specifiers: [
{
local: {
name: "className",
type: TSESTree.AST_NODE_TYPES.Literal,
},
exported: {
name: "className",
type: TSESTree.AST_NODE_TYPES.Literal,
},
},
],
},
],
},
} as unknown as IsNamedExportProps["node"],
isNamedExport: false,
},
},

{
props: {
name: "className",
node: {
type: TSESTree.AST_NODE_TYPES.ClassDeclaration,
parent: {
type: TSESTree.AST_NODE_TYPES.Program,
body: [
{
type: TSESTree.AST_NODE_TYPES.ExportNamedDeclaration,
specifiers: [
{
local: {
name: "className",
type: TSESTree.AST_NODE_TYPES.Identifier,
},
exported: {
name: "className2",
type: TSESTree.AST_NODE_TYPES.Identifier,
},
},
],
},
Expand All @@ -87,6 +156,7 @@ describe("isNamedExport", () => {
currentName: "className2",
currentNode: {
name: "className2",
type: TSESTree.AST_NODE_TYPES.Identifier,
} as unknown as IsNamedExportReturn["currentNode"],
isNamedExport: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ export const isNamedExport = ({
if (node.type !== TSESTree.AST_NODE_TYPES.ExportNamedDeclaration) return;

node.specifiers.forEach((specifier) => {
if (
specifier.local.type !== TSESTree.AST_NODE_TYPES.Identifier ||
specifier.exported.type !== TSESTree.AST_NODE_TYPES.Identifier
)
return;

// export { variable as variable2 }
if (specifier.local.name === name && specifier.exported.name !== name) {
isNamedExport = true;
Expand Down
Loading

0 comments on commit b4db433

Please sign in to comment.