Skip to content

[Bug]: Globs are not supported in npm workspace configuration #18

@th0r

Description

@th0r

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

I have the following workspaces configuration in the root package.json:

"workspaces": [
  "packages/*"
]

NPM works fine with it but simple-release-action fails with the following error:

Error: ENOENT: no such file or directory, open '/home/runner/work/ui/ui/packages/*/package.json'
node:internal/fs/promises:639
  return new FileHandle(await PromisePrototypeThen(
                        ^

Error: ENOENT: no such file or directory, open '/home/runner/work/ui/ui/packages/*/package.json'
    at async open (node:internal/fs/promises:639:25)
    at async Object.readFile (node:internal/fs/promises:1246:14)
    at async PackageJsonManifest.readManifest (file:///home/runner/.simple-release-dependencies/node_modules/@simple-release/core/dist/manifest/packageJson.js:15:29)
    at async PackageJsonManifest.isPrivate (file:///home/runner/.simple-release-dependencies/node_modules/@simple-release/core/dist/manifest/packageJson.js:31:26)
    at async NpmWorkspacesProject.getProjects (file:///home/runner/.simple-release-dependencies/node_modules/@simple-release/core/dist/project/monorepo.js:45:35)
    at async NpmWorkspacesProject.getIndependentTags (file:///home/runner/.simple-release-dependencies/node_modules/@simple-release/core/dist/project/monorepo.js:99:26)
    at async ifReleaseCommit (file:///home/runner/work/_actions/TrigenSoftware/simple-release-action/v1/node_modules/@simple-release/github-action/dist/conditions.js:6:18)
    at async file:///home/runner/work/_actions/TrigenSoftware/simple-release-action/v1/src/index.js:60:29 {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/runner/work/ui/ui/packages/*/package.json'
}

Reproduction

package version

simple-release-action@v1

Possible solution

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions