Skip to content

Commit

Permalink
chore(core): add files entry in pkg.json
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed May 13, 2024
1 parent 347c4d4 commit b6cb4cd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
"types": "./dist-types/submodules/protocols/index.d.ts"
}
},
"files": [
"dist-*/**",
"./client.js",
"./httpAuthSchemes.js",
"./protocols.js"
],
"sideEffects": false,
"author": {
"name": "AWS SDK for JavaScript Team",
Expand Down
5 changes: 5 additions & 0 deletions packages/core/scripts/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ for (const submodule of submodules) {
};
fs.writeFileSync(path.join(root, "package.json"), JSON.stringify(pkgJson, null, 2) + "\n");
}
if (!pkgJson.files.includes(`./${submodule}.js`)) {
pkgJson.files.push(`./${submodule}.js`);
errors.push(`package.json files array missing ${submodule}.js compatibility redirect file.`);
fs.writeFileSync(path.join(root, "package.json"), JSON.stringify(pkgJson, null, 2) + "\n");
}
// tsconfig metadata.
for (const [kind, tsconfig] of Object.entries(tsconfigs)) {
if (!tsconfig.compilerOptions.paths?.[`@aws-sdk/core/${submodule}`]) {
Expand Down

0 comments on commit b6cb4cd

Please sign in to comment.