From 42e838621d8fff5e7e8616d0a240396c0448d850 Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Tue, 28 Mar 2023 22:30:08 +0100 Subject: [PATCH] chore(build): Temporarily exclude blocks and generators .d.ts files (#6930) Temporarily exclude the generated .d.ts files for blocks/* and generators/* from the package. This will in due course replace the (very simplistic) hand-written versions in typings/, but for now they are not referenced anywhere a developer's tooling should be looking, and contain in some cases actually incorrect typings (e.g., in unmigrated blocks files, the blocks export is typed as ObjectConstructor, which is wrong), so do not include them in the package least they cause problems for the unwary. --- scripts/gulpfiles/package_tasks.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/gulpfiles/package_tasks.js b/scripts/gulpfiles/package_tasks.js index d71bae493..38a5b5f9a 100644 --- a/scripts/gulpfiles/package_tasks.js +++ b/scripts/gulpfiles/package_tasks.js @@ -346,7 +346,10 @@ function packageDTS() { 'typings/msg/*.d.ts', ]; return gulp.src(handwrittenSrcs, {base: 'typings'}) - .pipe(gulp.src(`${TYPINGS_BUILD_DIR}/**/*.d.ts`)) + .pipe(gulp.src(`${TYPINGS_BUILD_DIR}/**/*.d.ts`, {ignore: [ + `${TYPINGS_BUILD_DIR}/blocks/**/*`, + `${TYPINGS_BUILD_DIR}/generators/**/*`, + ]})) .pipe(gulp.replace('AnyDuringMigration', 'any')) .pipe(gulp.dest(RELEASE_DIR)); };