You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: DEVELOPMENT.md
+23-21
Original file line number
Diff line number
Diff line change
@@ -83,12 +83,12 @@ This project uses a few tools to help with building and packaging it up: `typesc
83
83
Their respective configuration files work together to produce the the library and this section contains a few highlights to
84
84
help better understand how it works.
85
85
86
-
* Compiled and bundled up code lives in `dist/` (set in `tsconfig.json` "outDir")
87
-
* We're targeting ES2022 as our output language, which is supprted by Node 18+ (see `tsconfig.json` "target")
88
-
* We're building both ESM (.js) and CJS (.cjs) compatible artifacts (see `tsup.config.ts` "formats")
89
-
* During build we're generating TypeScript declaration files and making them available to package consumers (see `tsup.config.ts` "dts")
90
-
* Our package uses conditional exports so that the consumer will automatically get the right ESM or CJS based on how they import (see `package.json` "exports")
91
-
* When we publish the package to NPM we're only including the `dist/`, `src/` and "default files", eg. `README`, `LICENCE` (see `package.json` "files")
86
+
- Compiled and bundled up code lives in `dist/` (set in `tsconfig.json` "outDir")
87
+
- We're targeting ES2022 as our output language, which is supprted by Node 18+ (see `tsconfig.json` "target")
88
+
- We're building both ESM (.js) and CJS (.cjs) compatible artifacts (see `tsup.config.ts` "formats")
89
+
- During build we're generating TypeScript declaration files and making them available to package consumers (see `tsup.config.ts` "dts")
90
+
- Our package uses conditional exports so that the consumer will automatically get the right ESM or CJS based on how they import (see `package.json` "exports")
91
+
- When we publish the package to NPM we're only including the `dist/`, `src/` and "default files", eg. `README`, `LICENCE` (see `package.json` "files")
92
92
93
93
## Versioning
94
94
@@ -99,35 +99,37 @@ incorporate information about the API version and SDK version. We update version
99
99
The version string looks like the following:
100
100
101
101
```js
102
-
`${major}${version}.${minor}.${patch}`
102
+
`${major}${version}.${minor}.${patch}`;
103
103
```
104
104
105
-
*`major` is set manually and is the MAJOR version of the SDK code
106
-
*`version` is a date string (`yyyymmdd`) we use as the API Version (from our OpenAPI schema)
107
-
*`minor` is set manually and is the MINOR version of the SDK code
108
-
*`patch` is set manually and is the PATCH version of the SDK code
105
+
-`major` is set manually and is the MAJOR version of the SDK code
106
+
-`version` is a date string (`yyyymmdd`) we use as the API Version (from our OpenAPI schema)
107
+
-`minor` is set manually and is the MINOR version of the SDK code
108
+
-`patch` is set manually and is the PATCH version of the SDK code
109
109
110
110
The version of the SDK should be updated in branches being merged into `main` according to the semantic versioning scheme:
111
111
112
-
* MAJOR version when you make incompatible API changes
113
-
* MINOR version when you add functionality in a backward compatible manner
114
-
* PATCH version when you make backward compatible bug fixes
112
+
- MAJOR version when you make incompatible API changes
113
+
- MINOR version when you add functionality in a backward compatible manner
114
+
- PATCH version when you make backward compatible bug fixes
115
115
116
116
### Updating The Package Version
117
117
118
118
After making changes, you should:
119
-
* Make sure to bump the `SDK_VERSION` in the `bin/update-version.ts` script
120
-
* Then run `make update-version` to ensure the `package.json` and `src/version.ts` are set correctly.
119
+
120
+
- Make sure to bump the `SDK_VERSION` in the `bin/update-version.ts` script
121
+
- Then run `make update-version` to ensure the `package.json` and `src/version.ts` are set correctly.
121
122
122
123
**NOTE:** The `make update-version` task will run after every `make sync-codegen` too!
123
124
124
125
## Releasing
125
126
126
127
**Prerequisites**:
127
-
* Have an [npmjs.com](https://www.npmjs.com/) account and it must be a member of our organization
128
-
* Have an GitHub account and it must be a member of our organization with write permissions on the repo
129
-
* The changes that are currently in the branch are the one you would like to release (typically `main`)
130
-
* The `version` field in the `package.json` is the one you would like to use for the release already
128
+
129
+
- Have an [npmjs.com](https://www.npmjs.com/) account and it must be a member of our organization
130
+
- Have an GitHub account and it must be a member of our organization with write permissions on the repo
131
+
- The changes that are currently in the branch are the one you would like to release (typically `main`)
132
+
- The `version` field in the `package.json` is the one you would like to use for the release already
131
133
132
134
**Production Releases**:
133
135
@@ -139,7 +141,7 @@ that we'd like to publish.
139
141
2. Publish to NPM & push tag to GitHub: `make publish`
140
142
3. Create new Release on GitHub (using the web UI). Add release notes, mentions, etc.
141
143
142
-
**Non-Production Releases**
144
+
**Non-Production Releases**
143
145
144
146
The previous workflow assumes that the tag being published should be marked as `latest` for the NPM
145
147
[distribution tag](https://docs.npmjs.com/adding-dist-tags-to-packages). If you would like to mark a release as
0 commit comments