Skip to content

Commit 8c687f5

Browse files
authored
chore: don't repack monocdk-experiment (#7565)
It causes it to be incorrectly packged, since it has already prepared it's packaging assets in `dist/`
1 parent c8aa92d commit 8c687f5

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

pack.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ rm -fr ${distdir}
1515
mkdir -p ${distdir}
1616

1717
# Split out jsii and non-jsii packages. Jsii packages will be built all at once.
18-
# Non-jsii packages will be run individually.
18+
# Non-jsii packages will be run individually. Note that currently the monoCDK
19+
# package is handled as non-jsii because of the way it is packaged.
1920
echo "Collecting package list..." >&2
2021
scripts/list-packages $TMPDIR/jsii.txt $TMPDIR/nonjsii.txt
2122

packages/monocdk-experiment/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
!gen.js
55
staging/
66
tsconfig.json
7+
.jsii
8+
*.tsbuildinfo

packages/monocdk-experiment/build.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ ${CDK_PACKAGE_JSII_PACMAK:-jsii-pacmak}
2222
tarball=$PWD/dist/js/monocdk-experiment@*.tgz
2323

2424
echo "verifying package..."
25-
cd $(mktemp -d)
25+
checkdir=$(mktemp -d)
26+
27+
cd ${checkdir}
28+
2629
npm init -y
2730
npm install ${tarball} constructs@${constructs_version}
2831
node -e "require('monocdk-experiment')"
@@ -40,3 +43,5 @@ mv ${unpacked} ${scriptdir}/staging
4043
# this is needed because the generated code is hosted under staging/, but during
4144
# it's creation, it was directly in the package root.
4245
mv ${scriptdir}/staging/.jsii ${scriptdir}
46+
47+
rm -fr ${outdir} ${checkdir}

packages/monocdk-experiment/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
},
4646
"license": "Apache-2.0",
4747
"devDependencies": {
48-
"typescript": "~3.8.3",
48+
"jsii": "^1.4.1",
4949
"constructs": "^3.0.2",
5050
"@aws-cdk/alexa-ask": "0.0.0",
5151
"@aws-cdk/app-delivery": "0.0.0",

scripts/list-packages

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ child_process.exec('lerna ls --toposort --json', { shell: true }, (error, stdout
2424

2525
for (const module of modules) {
2626
const pkgJson = require(path.join(module.location, 'package.json'));
27-
if (pkgJson.jsii) {
27+
// MonoCDK-Experiment does its own packaging, should be handled "non-JSII style"
28+
if (pkgJson.jsii && pkgJson.name !== 'monocdk-experiment') {
2829
jsiiDirectories.push(module.location);
2930
} else {
3031
nonJsiiNames.push(pkgJson.name);

0 commit comments

Comments
 (0)