@osdk/generator-utils 2.2.0-beta.9 → 2.2.0-rc.25

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/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # @osdk/generator-utils
2
2
 
3
+ ## 2.2.0-rc.25
4
+
5
+ ## 2.2.0-rc.24
6
+
7
+ ## 2.2.0-beta.23
8
+
9
+ ## 2.2.0-beta.22
10
+
11
+ ## 2.2.0-beta.21
12
+
13
+ ### Minor Changes
14
+
15
+ - 317b555: Release
16
+
17
+ ## 2.2.0-beta.20
18
+
19
+ ### Minor Changes
20
+
21
+ - 889e84b: Release
22
+
23
+ ## 2.2.0-beta.19
24
+
25
+ ## 2.2.0-beta.18
26
+
27
+ ## 2.2.0-beta.17
28
+
29
+ ## 2.2.0-beta.16
30
+
31
+ ## 2.2.0-beta.15
32
+
33
+ ## 2.2.0-beta.14
34
+
35
+ ## 2.2.0-beta.13
36
+
37
+ ## 2.2.0-beta.12
38
+
39
+ ## 2.2.0-beta.11
40
+
41
+ ## 2.2.0-beta.10
42
+
3
43
  ## 2.2.0-beta.9
4
44
 
5
45
  ## 2.2.0-beta.8
@@ -16,6 +56,14 @@
16
56
 
17
57
  ## 2.2.0-beta.2
18
58
 
59
+ ## 2.1.0
60
+
61
+ ### Minor Changes
62
+
63
+ - 25fd9f0: Updating package.json to have better entry points to support react native bundlers.
64
+ - 0beaf9d: Introduces generator utils
65
+ - c691c8b: Package now has experimental support for commonjs
66
+
19
67
  ## 2.1.0-beta.31
20
68
 
21
69
  ## 2.1.0-beta.30
@@ -23,7 +23,7 @@ async function getDependencyVersionFromFindUpPackageJson(name, opts) {
23
23
  findUp
24
24
  } = await import('find-up');
25
25
  const packageJsonPath = await findUp("package.json", opts);
26
- !(packageJsonPath !== undefined) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Could not find package.json") : invariant__default.default(false) : undefined;
26
+ !(packageJsonPath !== void 0) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Could not find package.json") : invariant__default.default(false) : void 0;
27
27
  const packageJson = await promises.readFile(packageJsonPath, {
28
28
  encoding: "utf-8"
29
29
  });
@@ -32,7 +32,7 @@ async function getDependencyVersionFromFindUpPackageJson(name, opts) {
32
32
  }
33
33
  const parsedPackageJson = JSON.parse(packageJson);
34
34
  const version = parsedPackageJson.dependencies?.[name] ?? parsedPackageJson.devDependencies?.[name] ?? parsedPackageJson.peerDependencies?.[name];
35
- !(version !== undefined) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Could not find a dependency for ${name} in ${packageJsonPath}`) : invariant__default.default(false) : undefined;
35
+ !(version !== void 0) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Could not find a dependency for ${name} in ${packageJsonPath}`) : invariant__default.default(false) : void 0;
36
36
  return version;
37
37
  }
38
38
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/changeVersionPrefix.ts","../../src/getDependencyVersionFromFindUpPackageJson.ts","../../src/resolveDependenciesFromFindUp.ts"],"names":["invariant","readFile"],"mappings":";;;;;;;;;;AAgBO,SAAS,mBAAA,CAAoB,SAAS,MAAQ,EAAA;AACnD,EAAM,MAAA,mBAAA,GAAsB,OAAQ,CAAA,UAAA,CAAW,YAAY,CAAA;AAC3D,EAAA,IAAI,mBAAqB,EAAA;AACvB,IAAU,OAAA,GAAA,OAAA,CAAQ,KAAM,CAAA,YAAA,CAAa,MAAM,CAAA;AAAA;AAE7C,EAAI,IAAA,OAAA,CAAQ,CAAC,CAAA,KAAM,GAAO,IAAA,OAAA,CAAQ,CAAC,CAAA,KAAM,GAAO,IAAA,OAAA,CAAQ,CAAC,CAAA,KAAM,GAAK,EAAA;AAClE,IAAU,OAAA,GAAA,OAAA,CAAQ,MAAM,CAAC,CAAA;AAAA;AAE3B,EAAA,OAAO,GAAG,mBAAsB,GAAA,YAAA,GAAe,EAAE,CAAG,EAAA,MAAM,GAAG,OAAO,CAAA,CAA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IAAI,CAAE,CAAA,GAAA,CAAI,OAAO,CAAC,cAAgB,EAAA,iBAAiB,CAAM,KAAA;AAC/F,IAAO,OAAA;AAAA,MACL,cAAA;AAAA,MACA,iBAAmB,EAAA,mBAAA,CAAoB,iBAAsB,IAAA,MAAM,0CAA0C,cAAgB,EAAA;AAAA,QAC3H;AAAA,OACD,GAAI,GAAG;AAAA,KACV;AAAA,GACD,CAAC,CAAA;AACJ","file":"index.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function changeVersionPrefix(version, prefix) {\n const isWorkspaceProtocol = version.startsWith(\"workspace:\");\n if (isWorkspaceProtocol) {\n version = version.slice(\"workspace:\".length);\n }\n if (version[0] === \"^\" || version[0] === \"~\" || version[0] === \"*\") {\n version = version.slice(1);\n }\n return `${isWorkspaceProtocol ? \"workspace:\" : \"\"}${prefix}${version}`;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readFile } from \"fs/promises\";\nimport invariant from \"tiny-invariant\";\nexport async function getDependencyVersionFromFindUpPackageJson(name, opts) {\n const {\n findUp\n } = await import(\"find-up\");\n const packageJsonPath = await findUp(\"package.json\", opts);\n !(packageJsonPath !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Could not find package.json\") : invariant(false) : void 0;\n const packageJson = await readFile(packageJsonPath, {\n encoding: \"utf-8\"\n });\n if (!packageJson) {\n throw new Error(`Could not find package.json in current working directory: ${process.cwd()}`);\n }\n const parsedPackageJson = JSON.parse(packageJson);\n const version = parsedPackageJson.dependencies?.[name] ?? parsedPackageJson.devDependencies?.[name] ?? parsedPackageJson.peerDependencies?.[name];\n !(version !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Could not find a dependency for ${name} in ${packageJsonPath}`) : invariant(false) : void 0;\n return version;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { changeVersionPrefix } from \"./changeVersionPrefix.js\";\nimport { getDependencyVersionFromFindUpPackageJson } from \"./getDependencyVersionFromFindUpPackageJson.js\";\n\n/**\n * Resolves dependencies to their versions per our package.json if undefined.\n * Sets the prefix to `^` for the version specified or read from package.json.\n * @param deps\n * @returns\n */\nexport async function resolveDependenciesFromFindUp(deps, cwd) {\n return await Promise.all(Object.entries(deps).map(async ([dependencyName, dependencyVersion]) => {\n return {\n dependencyName,\n dependencyVersion: changeVersionPrefix(dependencyVersion ?? (await getDependencyVersionFromFindUpPackageJson(dependencyName, {\n cwd\n })), \"^\")\n };\n }));\n}"]}
1
+ {"version":3,"sources":["../../src/changeVersionPrefix.ts","../../src/getDependencyVersionFromFindUpPackageJson.ts","../../src/resolveDependenciesFromFindUp.ts"],"names":["invariant","read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,CAAA,KAAA,CAAM,WAAW,CAAA;AAChD,EAAM,MAAA,OAAA,GAAU,iBAAkB,CAAA,YAAA,GAAe,IAAI,CAAA,IAAK,iBAAkB,CAAA,eAAA,GAAkB,IAAI,CAAA,IAAK,iBAAkB,CAAA,gBAAA,GAAmB,IAAI,CAAA;AAChJ,EAAA,EAAE,YAAY,MAAa,CAAA,GAAA,OAAA,CAAQ,GAAI,CAAA,QAAA,KAAa,eAAeD,0BAAU,CAAA,KAAA,EAAO,CAAmC,gCAAA,EAAA,IAAI,OAAO,eAAe,CAAA,CAAE,CAAI,GAAAA,0BAAA,CAAU,KAAK,CAAI,GAAA,MAAA;AAC1K,EAAO,OAAA,OAAA;AACT;;;ACTA,eAAsB,6BAAA,CAA8B,MAAM,GAAK,EAAA;AAC7D,EAAA,OAAO,MAAM,OAAA,CAAQ,GAAI,CAAA,MAAA,CAAO,OAAQ,CAAA,IAAI,CAAE,CAAA,GAAA,CAAI,OAAO,CAAC,cAAgB,EAAA,iBAAiB,CAAM,KAAA;AAC/F,IAAO,OAAA;AAAA,MACL,cAAA;AAAA,MACA,iBAAmB,EAAA,mBAAA,CAAoB,iBAAsB,IAAA,MAAM,0CAA0C,cAAgB,EAAA;AAAA,QAC3H;AAAA,OACD,GAAI,GAAG;AAAA,KACV;AAAA,GACD,CAAC,CAAA;AACJ","file":"index.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function changeVersionPrefix(version, prefix) {\n const isWorkspaceProtocol = version.startsWith(\"workspace:\");\n if (isWorkspaceProtocol) {\n version = version.slice(\"workspace:\".length);\n }\n if (version[0] === \"^\" || version[0] === \"~\" || version[0] === \"*\") {\n version = version.slice(1);\n }\n return `${isWorkspaceProtocol ? \"workspace:\" : \"\"}${prefix}${version}`;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readFile } from \"fs/promises\";\nimport invariant from \"tiny-invariant\";\nexport async function getDependencyVersionFromFindUpPackageJson(name, opts) {\n const {\n findUp\n } = await import(\"find-up\");\n const packageJsonPath = await findUp(\"package.json\", opts);\n !(packageJsonPath !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Could not find package.json\") : invariant(false) : void 0;\n const packageJson = await readFile(packageJsonPath, {\n encoding: \"utf-8\"\n });\n if (!packageJson) {\n throw new Error(`Could not find package.json in current working directory: ${process.cwd()}`);\n }\n const parsedPackageJson = JSON.parse(packageJson);\n const version = parsedPackageJson.dependencies?.[name] ?? parsedPackageJson.devDependencies?.[name] ?? parsedPackageJson.peerDependencies?.[name];\n !(version !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Could not find a dependency for ${name} in ${packageJsonPath}`) : invariant(false) : void 0;\n return version;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { changeVersionPrefix } from \"./changeVersionPrefix.js\";\nimport { getDependencyVersionFromFindUpPackageJson } from \"./getDependencyVersionFromFindUpPackageJson.js\";\n\n/**\n * Resolves dependencies to their versions per our package.json if undefined.\n * Sets the prefix to `^` for the version specified or read from package.json.\n * @param deps\n * @returns\n */\nexport async function resolveDependenciesFromFindUp(deps, cwd) {\n return await Promise.all(Object.entries(deps).map(async ([dependencyName, dependencyVersion]) => {\n return {\n dependencyName,\n dependencyVersion: changeVersionPrefix(dependencyVersion ?? (await getDependencyVersionFromFindUpPackageJson(dependencyName, {\n cwd\n })), \"^\")\n };\n }));\n}"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/generator-utils",
3
- "version": "2.2.0-beta.9",
3
+ "version": "2.2.0-rc.25",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",