-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update branch with changes from main (#487)
* Bump @typescript-eslint/parser from 7.9.0 to 7.16.0 (#445) * Bump @typescript-eslint/parser from 7.9.0 to 7.16.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.9.0 to 7.16.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Fix example generation and group eslint-parser in the future --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eric Anderson <[email protected]> * Bump pino-pretty from 11.0.0 to 11.2.1 (#471) Bumps [pino-pretty](https://github.com/pinojs/pino-pretty) from 11.0.0 to 11.2.1. - [Release notes](https://github.com/pinojs/pino-pretty/releases) - [Commits](pinojs/pino-pretty@v11.0.0...v11.2.1) --- updated-dependencies: - dependency-name: pino-pretty dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Version Packages (beta) (#463) * Add api-extractor, fix turbo, fix refactor (#415) * Add api-extractor, fix turbo, fix refactor * Add docs and allow CI to work * Fix action params issue with objects (#458) * fix * added changeset * Add more logging to legacy-client oauth (#479) * Change default VSCode formatter back to dprint (#482) * MRL enforces tilde not caret for internal deps (#464) * MRL enforces tilde not caret for internal deps * Cleanup * Interface inherited properties are now generated (#441) Fix mrl * WIP Queries (#379) * starting queries work * first pass, no tests * refactor * progress * Get objects working * object set support * add obejctset supoprt * remove console logs * remove newlines * remove unsused endpoints file * add 2d agg input support * 3d agg test * a little cleanup * fix empty index files * start addressing PR comments * codegen cleanup * only use provider for object defs * clean up bucket types * a little more codegen cleanup * nullable checks * add changeset * Beta generation initial work (#469) * Speed up build, fix dts generation for all, primitive --beta * Add empty changeset --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eric Anderson <[email protected]> Co-authored-by: ssanjay1 <[email protected]>
- Loading branch information
1 parent
353d3ec
commit aba07bd
Showing
176 changed files
with
4,299 additions
and
930 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@osdk/client": patch | ||
--- | ||
|
||
Fix action params that take objects to correctly parse out primary key. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@osdk/legacy-client": patch | ||
--- | ||
|
||
Oauth errors should include a cause now on supported platforms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@osdk/legacy-client": minor | ||
"@osdk/shared.test": minor | ||
"@osdk/client.api": minor | ||
"@osdk/generator": minor | ||
"@osdk/client": minor | ||
"@osdk/api": minor | ||
--- | ||
|
||
Add support for queries in 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@osdk/generator": patch | ||
--- | ||
|
||
Interface inherited properties are now generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,6 @@ packages/legacy-client/src/generatedNoCheck | |
.log | ||
pnpm-publish-summary.json | ||
.npmrc | ||
|
||
api-docs/ | ||
temp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
import { | ||
alphabeticalDependencies, | ||
alphabeticalScripts, | ||
createRuleFactory, | ||
fileContents, | ||
packageEntry, | ||
packageOrder, | ||
|
@@ -34,6 +35,7 @@ const DELETE_SCRIPT_ENTRY = { options: [undefined], fixValue: undefined }; | |
const nonStandardPackages = [ | ||
"mytsup", | ||
"tsconfig", | ||
"@osdk/api-extractor", | ||
"@osdk/examples.todoapp", | ||
"@osdk/tests.*", | ||
"@osdk/foundry-sdk-generator", | ||
|
@@ -74,6 +76,61 @@ const esmOnlyPackages = [ | |
// "@osdk/examples.*", but they have their own config cause they are nonstandard | ||
]; | ||
|
||
/** | ||
* We don't want to allow `workspace:^` in our dependencies because our current release branch | ||
* strategy only allows for patch changes in the release branch and minors elsewhere. | ||
* | ||
* If we were to allow `workspace:^`, then the follow scenario causes issues: | ||
* - Suppose we have a Foo and a Bar package and Bar depends on Foo. | ||
* - at T0 we cut a release/1.1.x branch and ship [email protected], [email protected] | ||
* - at T1 we cut a release 1.2.x branch and ship [email protected] | ||
* | ||
* If we have `workspace:^` in our deps, a user that already has `[email protected]` in their package.json | ||
* could update their dependencies without updating Bar (say via pnpm update) and Bar's dependency | ||
* on Foo @ `^1.1.0` would be satisfied by the shipped `[email protected]`. | ||
* | ||
* Using `workspace:~` prevents this as `~` can only resolve patch changes. | ||
*/ | ||
const disallowWorkspaceCaret = createRuleFactory({ | ||
name: "disallowWorkspaceCaret", | ||
check: async (context) => { | ||
const packageJson = context.getPackageJson(); | ||
const packageJsonPath = context.getPackageJsonPath(); | ||
|
||
for (const d of ["dependencies", "devDependencies", "peerDependencies"]) { | ||
const deps = packageJson[d] ?? {}; | ||
|
||
for (const [dep, version] of Object.entries(deps)) { | ||
if (version === "workspace:^") { | ||
const message = `'workspace:^' not allowed (${d}['${dep}']).`; | ||
context.addError({ | ||
message, | ||
longMessage: `${message} Did you mean 'workspace:~'?`, | ||
file: context.getPackageJsonPath(), | ||
fixer: () => { | ||
// always refetch in fixer since another fixer may have already changed the file | ||
let packageJson = context.getPackageJson(); | ||
if (packageJson[d]?.[dep] === "workspace:^") { | ||
packageJson[d] = Object.assign( | ||
{}, | ||
packageJson[d], | ||
{ [dep]: "workspace:~" }, | ||
); | ||
|
||
context.host.writeJson( | ||
context.getPackageJsonPath(), | ||
packageJson, | ||
); | ||
} | ||
}, | ||
}); | ||
} | ||
} | ||
} | ||
}, | ||
validateOptions: () => {}, // no options right now | ||
}); | ||
|
||
const cache = new Map(); | ||
|
||
/** | ||
|
@@ -156,6 +213,7 @@ function getTsconfigOptions(baseTsconfigPath, opts) { | |
* skipTsconfigReferences?: boolean | ||
* singlePackageName?: string | ||
* }} options | ||
* @returns {import("@monorepolint/config").RuleModule[]} | ||
*/ | ||
function standardPackageRules(shared, options) { | ||
if (options.esmOnly && options.legacy) { | ||
|
@@ -170,6 +228,8 @@ function standardPackageRules(shared, options) { | |
.slice(0, -1); // drop trailing slash | ||
|
||
return [ | ||
disallowWorkspaceCaret({ ...shared }), | ||
|
||
standardTsconfig({ | ||
...shared, | ||
|
||
|
@@ -215,7 +275,6 @@ function standardPackageRules(shared, options) { | |
...shared, | ||
options: { | ||
scripts: { | ||
"dev:transpile": DELETE_SCRIPT_ENTRY, | ||
clean: "rm -rf lib dist types build tsconfig.tsbuildinfo", | ||
"check-attw": | ||
`${pathToWorkspaceRoot}/scripts/build_common/check-attw.sh ${ | ||
|
@@ -224,10 +283,10 @@ function standardPackageRules(shared, options) { | |
lint: "eslint . && dprint check --config $(find-up dprint.json)", | ||
"fix-lint": | ||
"eslint . --fix && dprint fmt --config $(find-up dprint.json)", | ||
prettier: DELETE_SCRIPT_ENTRY, | ||
transpile: "tsup", | ||
transpile: | ||
"find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", | ||
typecheck: | ||
`${pathToWorkspaceRoot}/scripts/build_common/typecheck.sh ${ | ||
`find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ${pathToWorkspaceRoot}/scripts/build_common/typecheck.sh ${ | ||
options.esmOnly ? "esm" : "both" | ||
}`, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Developer Docs for Contributing to osdk-ts | ||
|
||
If you are looking for documentation on how to use the OSDK, see your developer console on your foundry stack. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Build / CI notes for the repo | ||
|
||
## api-extractor | ||
|
||
Currently, this runs only as part of `@osdk/client.api`, however the goal is to extend this to the entire repo assuming we are satisfied with its output. | ||
|
||
While the api-extract can be used for generating rolled up `.d.ts` files, we do not use it for that purpose. Our intention is to use it generate the api report and api documentation. The logic behind the api report is it should make it easier to review the impact of changes to types within the codebase. For example, it can show that we have implicitly created a dependency on a third party library for our own types. | ||
|
||
### CI implications | ||
|
||
The `api-extractor` has a "local" and a non-local (CI) mode. In the "local" mode, it will automatically update the file we commit for the api report. The intent of the tool is to error in CI if the file that is committed doesn't match the output, however the behavior of the tool is to exit with a non-zero code when there are warnings in the non-local mode. This makes adoption of the tool expensive at best and at worst removes the ability to have granular information. | ||
|
||
As such, we run the tool in CI in "local" mode so that we do not get non-zero exits for warnings. Our existing build infrastructure already fails the build if any changes happen to committed files during CI and as such we can rely on that mechanism to be sure that developers have updated the api report that gets committed. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.