We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61061a9 commit b3d800fCopy full SHA for b3d800f
1 file changed
packages/publish-flat/src/PublishFlat.ts
@@ -47,7 +47,8 @@ export class PublishFlat {
47
48
this.packageDir = path.resolve(this.options.packageDir);
49
this.dirToFlatten = this.cleanDirName(this.options.dirToFlatten);
50
- this.dirToFlattenRegex = new RegExp(`${this.dirToFlatten}[\\/]`);
+ const escapedDirToFlatten = this.dirToFlatten.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
51
+ this.dirToFlattenRegex = new RegExp(`${escapedDirToFlatten}[\\/]`);
52
}
53
54
async build(): Promise<string | void> {
0 commit comments