bob-core 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,14 +53,12 @@ class CommandRegistry {
53
53
  }
54
54
  async loadCommandsPath(commandsPath) {
55
55
  for await (const file of this.listCommandsFiles(commandsPath)) {
56
- console.log(`Loading command ${file}`);
57
56
  let CommandClass;
58
57
  try {
59
- CommandClass = (await require(file)).default;
58
+ CommandClass = (await import(file)).default;
60
59
  }
61
60
  catch (e) {
62
61
  console.error(`Failed to load command ${file}. ${e}`);
63
- // Ignore files that are not commands
64
62
  continue;
65
63
  }
66
64
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bob-core",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "BOB Core",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,16 +8,16 @@
8
8
  "/dist"
9
9
  ],
10
10
  "scripts": {
11
- "start": "ts-node ./tests/main.ts",
11
+ "start": "node -r @swc-node/register ./tests/main.ts",
12
12
  "build": "tsc"
13
13
  },
14
14
  "author": "Léo Hubert",
15
15
  "license": "ISC",
16
16
  "devDependencies": {
17
+ "@swc-node/register": "^1.9.2",
17
18
  "@types/lodash": "^4.17.5",
18
19
  "@types/minimist": "^1.2.5",
19
20
  "@types/node": "^20.14.5",
20
- "ts-node": "^10.9.2",
21
21
  "typescript": "^5.4.5"
22
22
  },
23
23
  "dependencies": {