Skip to content

Commit

Permalink
Merge branch 'main' into bryantp/add-request-context-header
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantpark04 committed Jul 18, 2024
2 parents fdf45d1 + 02c34a9 commit 7dc9531
Show file tree
Hide file tree
Showing 623 changed files with 4,246 additions and 1,698 deletions.
3 changes: 1 addition & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"@osdk/examples.*",
"@osdk/tests.*",
"@osdk/version-updater",
"mytsup",
"tsconfig"
"@osdk/monorepo.*"
],
"bumpVersionsWithWorkspaceProtocolOnly": true,
"snapshot": {
Expand Down
2 changes: 2 additions & 0 deletions .changeset/gentle-hairs-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/lazy-tools-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
10 changes: 5 additions & 5 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@osdk/examples.basic.cli": "0.0.0",
"@osdk/examples.basic.sdk": "0.0.0",
"@osdk/e2e.sandbox.catchall": "0.0.0",
"@osdk/e2e.generated.catchall": "0.0.0",
"@osdk/examples.docs.example": "0.0.1",
"@osdk/examples.one.dot.one": "0.0.17",
"@osdk/examples.todoapp": "0.0.10",
"@osdk/e2e.generated.1.1.x": "0.0.17",
"@osdk/e2e.sandbox.todoappapp": "0.0.10",
"@osdk/examples.next-static-export": "0.0.0",
"@osdk/examples.react": "0.0.0",
"@osdk/examples.tutorial-todo-app": "0.0.0",
"@osdk/examples.vue": "0.0.0",
"mytsup": "0.0.0",
"@osdk/monorepo.tsup": "0.0.0",
"tsconfig": "0.0.0",
"@osdk/api": "1.8.0",
"@osdk/cli": "0.21.0",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/rare-timers-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@osdk/client": patch
---

Fix asyncIter to fetch subsequent pages
41 changes: 41 additions & 0 deletions .changeset/sixty-rules-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
"@osdk/foundry.thirdpartyapplications": patch
"@osdk/internal.foundry.ontologiesv2": patch
"@osdk/internal.foundry.ontologies": patch
"@osdk/internal.foundry.datasets": patch
"@osdk/internal.foundry.models": patch
"@osdk/platform-sdk-generator": patch
"@osdk/shared.net.platformapi": patch
"@osdk/foundry-sdk-generator": patch
"@osdk/internal.foundry.core": patch
"@osdk/client.test.ontology": patch
"@osdk/generator-converters": patch
"@osdk/client.unstable.osw": patch
"@osdk/cli.cmd.typescript": patch
"@osdk/shared.client.impl": patch
"@osdk/example-generator": patch
"@osdk/gateway-generator": patch
"@osdk/shared.net.errors": patch
"@osdk/foundry.security": patch
"@osdk/internal.foundry": patch
"@osdk/shared.net.fetch": patch
"@osdk/client.unstable": patch
"@osdk/legacy-client": patch
"@osdk/foundry.core": patch
"@osdk/tool.release": patch
"@osdk/shared.test": patch
"@osdk/cli.common": patch
"@osdk/client.api": patch
"@osdk/create-app": patch
"@osdk/shared.net": patch
"@osdk/generator": patch
"@osdk/foundry": patch
"@osdk/gateway": patch
"@osdk/client": patch
"@osdk/maker": patch
"@osdk/oauth": patch
"@osdk/api": patch
"@osdk/cli": patch
---

Spelling fixes and spell check in CI
2 changes: 1 addition & 1 deletion .changeset/smart-feet-chew.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@osdk/client": patch
---

Fixes link direction for experiental bulk loads
Fixes link direction for experimental bulk loads
2 changes: 2 additions & 0 deletions .changeset/weak-dragons-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,32 @@ on:
types: [opened, synchronize, reopened]

jobs:
cspell:
name: Check spelling
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
with:
version: 8.7.4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Check spelling
run: pnpm exec turbo run ci:cspell

changesets:
name: Check for changesets
if: ${{ github.event_name == 'pull_request' }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ tsconfig.tsbuildinfo
packages/client/src/generatedNoCheck
packages/client.test.ontology/src/generatedNoCheck
packages/legacy-client/src/generatedNoCheck
packages/create-app.template.*/src/generatedNoCheck

.log
pnpm-publish-summary.json
Expand Down
20 changes: 16 additions & 4 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import micromatch from "micromatch";

const CSPELL_CMD = "cspell --quiet --no-must-find-files";

/*
* Overview:
* - Fixes lint rules and formatting for code
Expand All @@ -12,23 +14,33 @@ import micromatch from "micromatch";
* @type {import("lint-staged").Config}
*/
export default {
"monorepo/**/*.{js,jsx,ts,tsx,mjs,cjs}": [
"packages/monorepo.*/**/*.{js,jsx,ts,tsx,mjs,cjs}": [
"dprint fmt",
CSPELL_CMD,
],
"{packages,examples-extra/basic}/**/*.{js,jsx,ts,tsx,mjs,cjs}": (
"*.md": [CSPELL_CMD],
"packages/**/*.{js,jsx,ts,tsx,mjs,cjs}": (
files,
) => {
const match = micromatch.not(
files,
["**/templates/**/*", "**/generatedNoCheck/**/*"],
[
"**/templates/**/*",
"**/generatedNoCheck/**/*",
"**/generatedNoCheck2/**/*",
],
);
if (match.length === 0) return [];
return [
`dprint fmt ${match.join(" ")}`,
`eslint --fix ${match.join(" ")}`,
`${CSPELL_CMD} ${match.join(" ")}`,
];
},
"(.lintstagedrc.mjs|.monorepolint.config.mjs)": ["dprint fmt"],
"(.lintstagedrc.mjs|.monorepolint.config.mjs)": [
"dprint fmt",
CSPELL_CMD,
],
"*": (files) => {
const mrlFiles = micromatch(files, [
"package.json",
Expand Down
82 changes: 70 additions & 12 deletions .monorepolint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ const LATEST_TYPESCRIPT_DEP = "^5.5.2";

const DELETE_SCRIPT_ENTRY = { options: [undefined], fixValue: undefined };
const nonStandardPackages = [
"mytsup",
"tsconfig",
"@osdk/api-extractor",
"@osdk/examples.todoapp",
"@osdk/tests.*",
"@osdk/foundry-sdk-generator",
"@osdk/examples.*",
"@osdk/foundry-sdk-generator",
"@osdk/monorepo.*",
"@osdk/e2e.sandbox.*", // sandboxes for manual e2e testing
"@osdk/e2e.generated.*", // generated sdks for e2e testing
"@osdk/shared.client",
"@osdk/create-app.template.*",
"@osdk/monorepo.cspell",
"@osdk/tests.*",
];

const legacyPackages = [
Expand Down Expand Up @@ -73,6 +74,7 @@ const esmOnlyPackages = [
"@osdk/tool.release",
"@osdk/version-updater",
"@osdk/client.test.ontology",
"@osdk/create-app.template-packager",
// "@osdk/examples.*", but they have their own config cause they are nonstandard
];

Expand Down Expand Up @@ -234,7 +236,7 @@ function standardPackageRules(shared, options) {
...shared,

options: getTsconfigOptions(
`${pathToWorkspaceRoot}/monorepo/tsconfig/tsconfig.base.json`,
`@osdk/monorepo.tsconfig/base.json`,
{
customTsconfigExcludes: options.customTsconfigExcludes,
skipTsconfigReferences: options.skipTsconfigReferences,
Expand Down Expand Up @@ -271,11 +273,22 @@ function standardPackageRules(shared, options) {
}),
]
: []),
requireDependency({
...shared,
options: {
devDependencies: {
"@osdk/monorepo.tsconfig": "workspace:~",
"@osdk/monorepo.tsup": "workspace:~",
"@osdk/monorepo.api-extractor": "workspace:~",
},
},
}),
packageScript({
...shared,
options: {
scripts: {
clean: "rm -rf lib dist types build tsconfig.tsbuildinfo",
"check-spelling": "cspell --quiet .",
"check-attw":
`${pathToWorkspaceRoot}/scripts/build_common/check-attw.sh ${
options.esmOnly ? "esm" : "both"
Expand Down Expand Up @@ -365,7 +378,7 @@ function standardPackageRules(shared, options) {
import { defineConfig } from "tsup";
export default defineConfig(async (options) =>
(await import("mytsup")).default(options, {
(await import("@osdk/monorepo.tsup")).default(options, {
${options.legacy ? "cjsExtension: '.js'" : ""}
${options.esmOnly ? "esmOnly: true," : ""}
})
Expand All @@ -383,6 +396,48 @@ function standardPackageRules(shared, options) {
*/
export default {
rules: [
fileContents({
includePackages: ["@osdk/create-app.template.*"],
options: {
file: "README.md",
generator: (context) => {
return `# ${context.getPackageJson().name}
This package contains templates for \`@osdk/create-app\`.
The dependencies will come from this package's \`package.json\` (excluding \`@osdk/create-app.template-packager\`) and the rest of template is filled out from the \`templates\` directory.
NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint.
`;
},
},
}),
fileContents({
includePackages: ["@osdk/create-app.template.*"],
options: {
file: "turbo.json",
template: `{
// WARNING: GENERATED FILE. DO NOT EDIT DIRECTLY. See .monorepolint.config.mjs
"extends": ["//"],
"tasks": {
"codegen": {
"inputs": ["templates/**/*"],
"outputs": ["src/generatedNoCheck/**/*"],
"dependsOn": ["@osdk/create-app.template-packager#transpile"]
}
}
}
`,
},
}),
...standardPackageRules({
includePackages: ["@osdk/create-app.template.*"],
}, {
legacy: false,
packageDepth: 2,
type: "example",
esmOnly: true,
}),
...standardPackageRules({
excludePackages: [
...nonStandardPackages,
Expand Down Expand Up @@ -435,19 +490,22 @@ export default {
),

...standardPackageRules({
includePackages: ["@osdk/examples.basic.**"],
excludePackages: ["@osdk/examples.one.dot.one"],
includePackages: [
"@osdk/e2e.generated.catchall",
"@osdk/e2e.sandbox.catchall",
],
excludePackages: ["@osdk/e2e.generated.1.1.x"],
}, {
esmOnly: true,
legacy: false,
packageDepth: 3,
packageDepth: 2,
type: "example",
}),

// most packages can use the newest typescript, but we enforce that @osdk/example.one.dot.one uses TS4.9
// so that we get build-time checking to make sure we don't regress v1.1 clients using an older Typescript.
...standardPackageRules({
includePackages: ["@osdk/examples.one.dot.one"],
includePackages: ["@osdk/e2e.generated.1.1.x"],
}, {
legacy: false,
packageDepth: 2,
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"dprint.dprint"
"dprint.dprint",
"streetsidesoftware.code-spell-checker"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@
"pino",
"todoapp"
],
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"[jsonc]": {
"editor.defaultFormatter": "dprint.dprint"
}
}
18 changes: 18 additions & 0 deletions cspell.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright 2024 Palantir Technologies, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

"use strict";
module.exports = require("@osdk/monorepo.cspell");
4 changes: 3 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export default tseslint.config(
"**/bin/*.mjs",
"**/bin/*.cjs",
"examples-extra/**/*",
"packages/e2e.sandbox.*/**/*",
],
rules: {
"header/header": "off",
Expand All @@ -120,6 +121,7 @@ export default tseslint.config(
"**/*.test.ts",
"**/test/*",
"examples-extra/**/*",
"packages/e2e.sandbox.*/**/*",
],
rules: {
"no-console": "off",
Expand All @@ -139,7 +141,7 @@ export default tseslint.config(
"**/src/generatedNoCheck2/",
"**/templates/",
"examples/**/*",
"monorepo/**",
"packages/monorepo.*/**",
"google-font-mocked-response.js",
".lintstagedrc.mjs",
"tests/",
Expand Down
Loading

0 comments on commit 7dc9531

Please sign in to comment.