jsii-release 0.2.1006 → 0.2.1008

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -69,6 +69,7 @@ npx publib-npm [DIR]
69
69
  | Option | Required | Description |
70
70
  | ----------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
71
71
  | `NPM_TOKEN` | Optional | Registry authentication token (either [npm.js publishing token](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) or a [GitHub personal access token](https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages#authenticating-to-github-packages)), not used for AWS CodeArtifact |
72
+ | `NPM_TRUSTED_PUBLISHER` | Optional | Use a [Trusted Publisher](https://docs.npmjs.com/trusted-publishers) configuration to publish packages. Requires npm CLI version 11.5.1 or later. When set, `NPM_TOKEN` will be ignored. |
72
73
  | `NPM_REGISTRY` | Optional | The registry URL (defaults to "registry.npmjs.org"). Use "npm.pkg.github.com" to publish to GitHub Packages. Use repository endpoint for AWS CodeAtifact, e.g. "my-domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/npm/my_repo/". |
73
74
  | `NPM_DIST_TAG` | Optional | Registers the published package with the given [dist-tag](https://docs.npmjs.com/cli/dist-tag) (e.g. `next`, default is `latest`) |
74
75
  | `NPM_ACCESS_LEVEL` | Optional | Publishes the package with the given [access level](https://docs.npmjs.com/cli/v8/commands/npm-publish#access) (e.g. `public`, default is `restricted` for scoped packages and `public` for unscoped packages) |
@@ -107,23 +108,22 @@ npx publib-maven [DIR]
107
108
 
108
109
  The server type is selected using the `MAVEN_SERVER_ID` variable.
109
110
 
110
- - `MAVEN_SERVER_ID=ossrh`; this is currently the default but will stop working in July 2025. Publish to the old OSSRH Nexus server.
111
- - `MAVEN_SERVER_ID=central-ossrh`; publish to the new Central Publishing platform using a service endpoint more-or-less compatible with the old OSSRH Nexus server. This is required to publish to Maven Central starting July 2025.
112
- - `MAVEN_SERVER_ID=<anything else>`; publish to a custom Nexus server.
113
-
114
-
115
- | Server | Option | Required | Description |
116
- |----------------------| --------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
117
- | (all) | `MAVEN_SERVER_ID` | Yes going forward | Either `ossrh` (default but deprecated), `central-ossrh`, or any other string for a custom Nexus server. |
118
- | (all) | `MAVEN_USERNAME` and `MAVEN_PASSWORD` | Yes | Username and password for maven repository. For Maven Central, you will need to [Create JIRA account](https://issues.sonatype.org/secure/Signup!default.jspa) and then request a [new project](https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134). Read the [OSSRH guide](https://central.sonatype.org/pages/ossrh-guide.html) for more details. |
119
- | (all) | `MAVEN_DRYRUN` | No | Set to "true" for a dry run |
120
- | (all) | `MAVEN_VERBOSE` | No | Make Maven print debug output if set to `true` |
121
- | `central-ossrh` | `MAVEN_GPG_PRIVATE_KEY[_FILE]` and `MAVEN_GPG_PRIVATE_KEY_PASSPHRASE` | Yes | GPG private key or file that includes it. This is used to sign your Maven packages. See instructions below |
122
- | `central-ossrh` | `MAVEN_ENDPOINT` | No | URL of Nexus repository. Defaults to `https://ossrh-staging-api.central.sonatype.com/`. |
123
- | `<custom>` | `MAVEN_REPOSITORY_URL` | No | Deployment repository when not deploying to Maven Central |
124
- | `ossrh` (deprecated) | `MAVEN_GPG_PRIVATE_KEY[_FILE]` and `MAVEN_GPG_PRIVATE_KEY_PASSPHRASE` | Yes | GPG private key or file that includes it. This is used to sign your Maven packages. See instructions below |
125
- | `ossrh` (deprecated) | `MAVEN_STAGING_PROFILE_ID` | Yes | Central Publisher (sonatype) staging profile ID, corresponding to namespace (e.g. `com.sonatype.software`). |
126
- | `ossrh` (deprecated) | `MAVEN_ENDPOINT` | No | URL of Nexus repository. Defaults to `https://central.sonatype.com`. |
111
+ * `MAVEN_SERVER_ID=ossrh`; this is currently the default but will stop working in July 2025. Publish to the old OSSRH Nexus server.
112
+ * `MAVEN_SERVER_ID=central-ossrh`; publish to the new Central Publishing platform using a service endpoint more-or-less compatible with the old OSSRH Nexus server. This is required to publish to Maven Central starting July 2025.
113
+ * `MAVEN_SERVER_ID=<anything else>`; publish to a custom Nexus server.
114
+
115
+ | Server | Option | Required | Description |
116
+ | -------------------- | --------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
117
+ | (all) | `MAVEN_SERVER_ID` | Yes going forward | Either `ossrh` (default but deprecated), `central-ossrh`, or any other string for a custom Nexus server. |
118
+ | (all) | `MAVEN_USERNAME` and `MAVEN_PASSWORD` | Yes | Username and password for maven repository. For Maven Central, you will need to [Create JIRA account](https://issues.sonatype.org/secure/Signup!default.jspa) and then request a [new project](https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134). Read the [OSSRH guide](https://central.sonatype.org/pages/ossrh-guide.html) for more details. |
119
+ | (all) | `MAVEN_DRYRUN` | No | Set to "true" for a dry run |
120
+ | (all) | `MAVEN_VERBOSE` | No | Make Maven print debug output if set to `true` |
121
+ | `central-ossrh` | `MAVEN_GPG_PRIVATE_KEY[_FILE]` and `MAVEN_GPG_PRIVATE_KEY_PASSPHRASE` | Yes | GPG private key or file that includes it. This is used to sign your Maven packages. See instructions below |
122
+ | `central-ossrh` | `MAVEN_ENDPOINT` | No | URL of Nexus repository. Defaults to `https://ossrh-staging-api.central.sonatype.com/`. |
123
+ | `<custom>` | `MAVEN_REPOSITORY_URL` | No | Deployment repository when not deploying to Maven Central |
124
+ | `ossrh` (deprecated) | `MAVEN_GPG_PRIVATE_KEY[_FILE]` and `MAVEN_GPG_PRIVATE_KEY_PASSPHRASE` | Yes | GPG private key or file that includes it. This is used to sign your Maven packages. See instructions below |
125
+ | `ossrh` (deprecated) | `MAVEN_STAGING_PROFILE_ID` | Yes | Central Publisher (sonatype) staging profile ID, corresponding to namespace (e.g. `com.sonatype.software`). |
126
+ | `ossrh` (deprecated) | `MAVEN_ENDPOINT` | No | URL of Nexus repository. Defaults to `https://central.sonatype.com`. |
127
127
 
128
128
  **How to create a GPG key**
129
129
 
package/bin/publib-npm CHANGED
@@ -10,6 +10,7 @@ set -eu
10
10
  # DIR: directory where npm tarballs are found (default is `dist/js`).
11
11
  #
12
12
  # NPM_TOKEN (optional): registry authentication token (either from npmjs or a GitHub personal access token), not used for AWS CodeArtifact
13
+ # NPM_TRUSTED_PUBLISHER (optional): use a Trusted Publisher configuration instead of tokens, any value
13
14
  # NPM_REGISTRY (optional): the registry URL (defaults to "registry.npmjs.org")
14
15
  # AWS_ACCESS_KEY_ID (optional): If AWS CodeArtifact is used as registry, an AWS access key can be spedified.
15
16
  # AWS_SECRET_ACCESS_KEY (optional): Secret access key that belongs to the AWS access key.
@@ -34,13 +35,19 @@ if ! [ -z "${NPM_REGISTRY:-}" ] && [[ $NPM_REGISTRY =~ .codeartifact.*.amazonaws
34
35
  export AWS_SESSION_TOKEN="$(echo $credentials | cut -d' ' -f5)"
35
36
  fi
36
37
  NPM_TOKEN=`aws codeartifact get-authorization-token --domain $codeartifact_domain --domain-owner $codeartifact_account --region $codeartifact_region --query authorizationToken --output text`
37
- elif [ -z "${NPM_TOKEN:-}" ]; then
38
- echo "NPM_TOKEN is required"
38
+ elif [ -z "${NPM_TOKEN:-}" ] && [ -z "${NPM_TRUSTED_PUBLISHER:-}" ]; then
39
+ echo "NPM_TOKEN=<token> or NPM_TRUSTED_PUBLISHER=true is required"
39
40
  exit 1
40
41
  fi
41
42
 
43
+ if ! [ -z "${NPM_TRUSTED_PUBLISHER:-}" ]; then
44
+ unset NPM_TOKEN
45
+ fi
46
+
42
47
  NPM_REGISTRY=${NPM_REGISTRY:-"registry.npmjs.org"}
43
- echo "//${NPM_REGISTRY%%/}/:_authToken=${NPM_TOKEN}" > ~/.npmrc
48
+ if ! [ -z "${NPM_TOKEN:-}" ]; then
49
+ echo "//${NPM_REGISTRY%%/}/:_authToken=${NPM_TOKEN}" > ~/.npmrc
50
+ fi
44
51
 
45
52
  # this overrides any registry configuration defined externally. For example, yarn sets the registry to the yarn proxy
46
53
  # which requires `yarn login`. but since we are logging in through ~/.npmrc, we must make sure we publish directly to npm.
package/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  "organization": true
54
54
  },
55
55
  "devDependencies": {
56
- "@aws-sdk/client-sts": "^3.823.0",
56
+ "@aws-sdk/client-sts": "^3.859.0",
57
57
  "@stylistic/eslint-plugin": "^2",
58
58
  "@types/glob": "^8.1.0",
59
59
  "@types/jest": "^27.5.2",
@@ -66,7 +66,7 @@
66
66
  "constructs": "^10.0.0",
67
67
  "eslint": "^9",
68
68
  "eslint-import-resolver-typescript": "^2.7.1",
69
- "eslint-plugin-import": "^2.31.0",
69
+ "eslint-plugin-import": "^2.32.0",
70
70
  "jest": "^27.5.1",
71
71
  "jest-junit": "^16",
72
72
  "projen": "^0.92.9",
@@ -92,7 +92,7 @@
92
92
  "publishConfig": {
93
93
  "access": "public"
94
94
  },
95
- "version": "0.2.1006",
95
+ "version": "0.2.1008",
96
96
  "jest": {
97
97
  "coverageProvider": "v8",
98
98
  "testMatch": [
package/package.json.bak CHANGED
@@ -53,7 +53,7 @@
53
53
  "organization": true
54
54
  },
55
55
  "devDependencies": {
56
- "@aws-sdk/client-sts": "^3.823.0",
56
+ "@aws-sdk/client-sts": "^3.859.0",
57
57
  "@stylistic/eslint-plugin": "^2",
58
58
  "@types/glob": "^8.1.0",
59
59
  "@types/jest": "^27.5.2",
@@ -66,7 +66,7 @@
66
66
  "constructs": "^10.0.0",
67
67
  "eslint": "^9",
68
68
  "eslint-import-resolver-typescript": "^2.7.1",
69
- "eslint-plugin-import": "^2.31.0",
69
+ "eslint-plugin-import": "^2.32.0",
70
70
  "jest": "^27.5.1",
71
71
  "jest-junit": "^16",
72
72
  "projen": "^0.92.9",
@@ -92,7 +92,7 @@
92
92
  "publishConfig": {
93
93
  "access": "public"
94
94
  },
95
- "version": "0.2.1006",
95
+ "version": "0.2.1008",
96
96
  "jest": {
97
97
  "coverageProvider": "v8",
98
98
  "testMatch": [