Skip to content

Commit

Permalink
fix: Broken build process, introduced by dynamically importing packag…
Browse files Browse the repository at this point in the history
…e.json
  • Loading branch information
steilerDev committed Aug 28, 2023
1 parent 80cfa9b commit 8d13be1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
4 changes: 1 addition & 3 deletions app/knip.config.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
"eslint-plugin-tsdoc", // Loaded by eslint.config.json
"ts-json-schema-generator", // Loaded by 'build-schema' script
"typedoc-plugin-markdown", // Loaded by 'typedoc' script
"typedoc-github-wiki-theme", // Loaded by 'typedoc' script
"@backtrace-labs/javascript-cli" // Loaded by 'postbuild' script
"typedoc-github-wiki-theme" // Loaded by 'typedoc' script
],
"ignoreBinaries": [ // Not sure why they are reported as unused
"backtrace-js", // Loaded by 'postbuild' script
"eslint.config.json",
"package.json"
]
Expand Down
7 changes: 5 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
"clean": "rm -rf bin/ coverage/ doc/ node_modules/ package-lock.json src/lib/resource-manager/schemas/",
"prebuild:lint": "npx eslint -c eslint.config.json --fix --ext .ts ./src ./test",
"prebuild:knip": "npx knip --no-exit-code --config knip.config.jsonc",
"prebuild": "npm run prebuild:lint && npm run prebuild:knip",
"prebuild:clean": "rm -rf bin/",
"prebuild": "npm run prebuild:lint && npm run prebuild:knip && npm run prebuild:clean",
"build:schema": "./build/schema.sh",
"build:typescript": "npx tsc",
"build:typedoc": "npx typedoc --plugin typedoc-plugin-markdown --plugin typedoc-github-wiki-theme",
"build": "npm run build:schema && npm run build:typescript",
"postbuild": "npx backtrace-js process bin/",
"postbuild:clean": "mv bin/src/* bin/ && rm -rf bin/src bin/package.json",
"postbuild:sourcemap": "npx backtrace-js process bin/",
"postbuild": "npm run postbuild:clean && npm run postbuild:sourcemap",
"test": "NODE_NO_WARNINGS=1 NODE_OPTIONS='--experimental-vm-modules' npx jest --config jest.config.json test/unit/",
"test:all": "NODE_NO_WARNINGS=1 NODE_OPTIONS='--experimental-vm-modules' npx jest --config jest.config.json",
"test:api": "NODE_NO_WARNINGS=1 NODE_OPTIONS='--experimental-vm-modules' npx jest --config jest.config.json test/api/",
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/resources/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export namespace Resources {
name: PackageData.name,
version: PackageData.version,
description: PackageData.description,
}
};

/**
* Prepares the global singleton instances. This includes the ResourceManager, NetworkManager, Validator and EventManager.
Expand Down
2 changes: 0 additions & 2 deletions app/src/lib/resources/resource-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ export class ResourceManager {
}
}



/**
* @returns The data dir read from the CLI Options
*/
Expand Down
2 changes: 0 additions & 2 deletions app/test/unit/resources.resource-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,6 @@ describe(`ResourceManager`, () => {
resourceManager = prepareResources(true, resources as any)!.manager;
});



describe(`dataDir`, () => {
test(`should return the data dir from the resources`, () => {
expect(resourceManager.dataDir).toEqual(resources.dataDir);
Expand Down

0 comments on commit 8d13be1

Please sign in to comment.