From 15adc6ff521ad8d76508c2710224634691c70434 Mon Sep 17 00:00:00 2001 From: Tom Keller Date: Sat, 15 Oct 2022 18:37:21 -0700 Subject: [PATCH] chore!: configure projen for correct artifact generation directory --- .gitignore | 3 +-- .npmignore | 6 +++--- .projenrc.cjs | 9 ++++++--- THIRD-PARTY | 1 - package.json | 4 ++-- 5 files changed, 12 insertions(+), 11 deletions(-) delete mode 100644 THIRD-PARTY diff --git a/.gitignore b/.gitignore index e97f819..184ab42 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,6 @@ jspm_packages/ *.tgz .yarn-integrity .cache -build !/.projenrc.js /test-reports/ junit.xml @@ -45,7 +44,7 @@ junit.xml !/tsconfig.json !/tsconfig.dev.json !/src/ -/lib +/build !/.eslintrc.yml !/dist/ !/action.yml diff --git a/.npmignore b/.npmignore index 60d304a..1ce8286 100644 --- a/.npmignore +++ b/.npmignore @@ -10,9 +10,9 @@ permissions-backup.acl /test/ /tsconfig.dev.json /src/ -!/lib/ -!/lib/**/*.js -!/lib/**/*.d.ts +!/build/ +!/build/**/*.js +!/build/**/*.d.ts dist /tsconfig.json /.github/ diff --git a/.projenrc.cjs b/.projenrc.cjs index 7adb163..40f4158 100644 --- a/.projenrc.cjs +++ b/.projenrc.cjs @@ -1,5 +1,5 @@ const { GitHubActionTypeScriptProject, RunsUsing } = require('projen-github-action-typescript'); -const { NodePackageManager } = require('projen/lib/javascript'); +const { NodePackageManager, NpmAccess } = require('projen/lib/javascript'); const project = new GitHubActionTypeScriptProject({ defaultReleaseBranch: 'main', @@ -17,7 +17,6 @@ const project = new GitHubActionTypeScriptProject({ filename: '.projenrc.cjs', }, sampleCode: false, - gitignore: ['build'], actionMetadata: { name: '"Configure AWS Credentials" Action for GitHub Actions', description: 'Configures AWS credentials for use in subsequent steps in a GitHub Action workflow', @@ -111,9 +110,11 @@ const project = new GitHubActionTypeScriptProject({ yaml: true, prettier: true, }, - releaseFailureIssue: true, releaseTagPrefix: 'v', + codeCov: false, + libdir: 'build', + entrypoint: 'build/index.js', tsconfig: { compilerOptions: { declaration: true, @@ -215,6 +216,8 @@ if (packageJson) { ], }); packageJson.addOverride('jest.globals', undefined); + // The entrypoint property is supposed to manage this but it doesn't work + packageJson.addOverride('main', 'build/index.js'); } project.synth(); diff --git a/THIRD-PARTY b/THIRD-PARTY deleted file mode 100644 index 30404ce..0000000 --- a/THIRD-PARTY +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/package.json b/package.json index 9654eb1..ad52e69 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "engines": { "node": ">= 14.0.0" }, - "main": "lib/index.js", + "main": "build/index.js", "license": "MIT", "homepage": "https://github.com/aws-actions/configure-aws-credentials", "version": "0.0.0", @@ -117,7 +117,7 @@ ] } }, - "types": "lib/index.d.ts", + "types": "build/index.d.ts", "overrides": { "@types/responselike": "1.0.0", "got": "12.3.1"