New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preconstruct doesn't make files for paths, containing curly braces #439
Comments
Here is how to reproduce the issue: Failure:
{
"name": "ks-preconstruct",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"private": true,
"preconstruct": {
"packages": [
"keystone_core/packages/*",
"keystone_core/design-system/packages/*",
"keystone_core/prisma-utils"
]
},
"workspaces": {
"packages": [
"keystone_core/packages/*",
"keystone_core/design-system/packages/*",
"keystone_core/prisma-utils"
],
"nohoist": [
"**/cypress-multi-reporters"
]
},
"dependencies": {
"@preconstruct/cli": "2.1.5"
}
}
Success:
So, where can be the source of that issue? |
Seems this is an issue with const fg = require('fast-glob');
let entries;
entries = fg.sync([
"keystone_core/packages/keystone/src/___internal-do-not-use-will-break-in-patch/admin-ui/{next-config.ts,id-field-view.tsx}",
"keystone_core/packages/keystone/src/artifacts.ts"
], { dot: true });
console.log('expansions', entries);
entries = fg.sync([
"keystone_core/packages/keystone/src/___internal-do-not-use-will-break-in-patch/admin-ui/id-field-view.tsx",
"keystone_core/packages/keystone/src/___internal-do-not-use-will-break-in-patch/admin-ui/next-config.ts",
"keystone_core/packages/keystone/src/artifacts.ts"
], { dot: true });
console.log('direct', entries); and the output:
|
I've figured out the source of this problem, here is the issue: mrmlnc/fast-glob#351 And here https://github.com/Murz-forks/preconstruct-cli-build is my compiled version of "dependencies": {
"@preconstruct/cli": "Murz-forks/preconstruct-cli-build",
} |
This issue is fixed in |
I've found an easier way to force set deep dependency version - add to "resolutions": {
"@preconstruct/cli/fast-glob": "^3.2.11"
} Documentation is here https://classic.yarnpkg.com/en/docs/selective-version-resolutions/ |
By what reason
preconstruct
command can not make files for paths, containing curly braces? Here is example of line frompackages/keystone/package.json
from keystone project:But it doesn't produce the
node_modules/@keystone-6/core/___internal-do-not-use-will-break-in-patch/admin-ui/next-config/dist/keystone-6-core-___internal-do-not-use-will-break-in-patch-admin-ui-next-config.cjs.js
file.But if I expose braces to separate lines like this:
it starts working well!
Via
preconstruct validate
I even can see that it catch those files:but with curly braces - not:
The version is
@preconstruct/cli@2.1.5
, but interesting thing that on other project same version works well with curly braces!Is there any debug mode exists to understand what happening in this situation?
The text was updated successfully, but these errors were encountered: