@joystick.js/cli-canary 0.0.0-canary.102 → 0.0.0-canary.104

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.
@@ -19,9 +19,14 @@ const handleAvaSTDIO = (ava = {}) => {
19
19
  };
20
20
  const runAva = (__dirname = "") => {
21
21
  try {
22
- const avaPath = console.log(`node_modules/.bin/ava --config ${__dirname}/tests.config.js`);
22
+ const packageRoot = __dirname?.split("/dist")[0];
23
+ const avaPath = `${packageRoot}/node_modules/.bin/ava`;
24
+ console.log({
25
+ avaPath,
26
+ cmd: `${avaPath} --config ${__dirname}/tests.config.js`
27
+ });
23
28
  return new Promise((resolve, reject) => {
24
- const ava = child_process.exec(`node_modules/.bin/ava --config ${__dirname}/tests.config.js`, {
29
+ const ava = child_process.exec(`${avaPath} --config ${__dirname}/tests.config.js`, {
25
30
  stdio: "inherit",
26
31
  env: {
27
32
  ...process.env,
@@ -0,0 +1,6 @@
1
+ var tests_config_default = {
2
+ files: ["tests/**/*"]
3
+ };
4
+ export {
5
+ tests_config_default as default
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joystick.js/cli-canary",
3
- "version": "0.0.0-canary.102",
3
+ "version": "0.0.0-canary.104",
4
4
  "type": "module",
5
5
  "description": "CLI for the Joystick JavaScript framework.",
6
6
  "main": "development.js",
@@ -24,10 +24,19 @@ const handleAvaSTDIO = (ava = {}) => {
24
24
 
25
25
  const runAva = (__dirname = '') => {
26
26
  try {
27
- const avaPath =
28
- console.log(`node_modules/.bin/ava --config ${__dirname}/tests.config.js`);
27
+ // NOTE: __dirname includes the entire path to lib/dev/index.js but we only
28
+ // care about the root folder/package here (we need to reference the node_modules
29
+ // folder in the package).
30
+ const packageRoot = __dirname?.split('/dist')[0];
31
+ const avaPath = `${packageRoot}/node_modules/.bin/ava`;
32
+
33
+ console.log({
34
+ avaPath,
35
+ cmd: `${avaPath} --config ${__dirname}/tests.config.js`,
36
+ });
37
+
29
38
  return new Promise((resolve, reject) => {
30
- const ava = child_process.exec(`node_modules/.bin/ava --config ${__dirname}/tests.config.js`, {
39
+ const ava = child_process.exec(`${avaPath} --config ${__dirname}/tests.config.js`, {
31
40
  stdio: 'inherit',
32
41
  env: {
33
42
  ...(process.env),
@@ -0,0 +1,3 @@
1
+ export default {
2
+ files: ['tests/**/*']
3
+ };