Skip to content

Conversation

@trivikr
Copy link
Owner

@trivikr trivikr commented Mar 31, 2022

Issue

Internal JS-3092

Description

Post design discussion: Prefixing node prior to cjs so that it's clear what the versions are for.

  • When we start supporting ESM, it would be latest.node.esm. If we use latest.esm there may be confusion on whether it's for Node.js, Deno or web.
  • If we decide to support dual package CJS/ESM for Node.js, we can publish it under latest.node

Testing

Ran the command yarn prepare:artifacts:node:cjs and verified that

$ git diff
--- a/clients/client-accessanalyzer/package.json
....
 {
-  "name": "@aws-sdk/client-accessanalyzer",
+  "name": "@trivikr-test/client-accessanalyzer",
   "description": "AWS SDK for JavaScript Accessanalyzer Client for Node.js, Browser and React Native",
-  "version": "3.52.0",
+  "version": "3.52.0-latest.node.cjs",
   "scripts": {
     "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
     "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -12,47 +12,39 @@
     "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo"
   },
   "main": "./dist-cjs/index.js",
-  "types": "./dist-types/index.d.ts",
-  "module": "./dist-es/index.js",
   "sideEffects": false,
   "dependencies": {
-    "@aws-crypto/sha256-browser": "2.0.0",
     "@aws-crypto/sha256-js": "2.0.0",
-    "@aws-sdk/client-sts": "*",
-    "@aws-sdk/config-resolver": "*",
...
+    "@trivikr-test/client-sts": "3.52.0-latest.node.cjs",
+    "@trivikr-test/config-resolver": "3.52.0-latest.node.cjs",
...
   "files": [
-    "dist-*"
+    "dist-cjs"
   ],
...
   "license": "Apache-2.0",
-  "browser": {
-    "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
-  },
-  "react-native": {
-    "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
-  },
   "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-accessanalyzer",
...

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr marked this pull request as ready for review March 31, 2022 15:04
@trivikr trivikr merged commit 9fd5f8b into node-artifacts-release-test Mar 31, 2022
@trivikr trivikr deleted the node-artifacts-release-test-/add-node branch March 31, 2022 15:04
trivikr added a commit that referenced this pull request Apr 6, 2022
trivikr added a commit that referenced this pull request Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants