Skip to content

Commit

Permalink
Merge pull request #543 from cloudinary/ME-3762-import-statements-in-…
Browse files Browse the repository at this point in the history
…code-snippets

Add importStatementsTemplate to langConfig
  • Loading branch information
magdakwiecien authored Dec 2, 2022
2 parents 93e9d0a + 1c52c64 commit bd67553
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .code-generation/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ module.exports = {
}
},
unsupportedTxParams: ['fl_waveform', 'e_theme', 'af_'],
unsupportedSyntaxList: ['.stroke(', '.textFit(', 'Animated.edit', '.RoundCorners(', 'getVideoFrame']
unsupportedSyntaxList: ['.stroke(', '.textFit(', 'Animated.edit', '.RoundCorners(', 'getVideoFrame'],
importStatementsTemplate: {
action: `import { <NAME> } from "@cloudinary/url-gen/actions/<GROUP>";`,
qualifier: `import { <NAME> } from "@cloudinary/url-gen/qualifiers/<GROUP>";`,
}
},
"overwrites": {
qualifiers: {
Expand Down
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
dist: focal
language: node_js
node_js:
- "12"
- "14"
- "16"
# - "18" # Not supported yet (ref. error:0308010C:digital envelope routines::unsupported)
script:
- npm run lint
- npm run test
Expand Down
4 changes: 2 additions & 2 deletions __TESTS_BUNDLE_SIZE__/bundleSizeTestCases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const bundleSizeTestCases:ITestCase[] = [
},
{
name: 'Import all of the SDK',
sizeLimitInKB: 128,
sizeLimitInKB: 129,
importsArray: [
importFromPackage('* as CloudinaryURLGEN')
]
Expand All @@ -88,7 +88,7 @@ const bundleSizeTestCases:ITestCase[] = [
},
{
name: 'Import All Actions',
sizeLimitInKB: 55,
sizeLimitInKB: 56,
importsArray: [
importFromPackage('Actions')
]
Expand Down
3 changes: 2 additions & 1 deletion src/backwards/utils/legacyBaseUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export const withCamelCaseKeys = function(source: {}) {
* @return {string} in camelCase format
*/
export const camelCase = function(source: string) {
var words = source.match(reWords);
let words : string[] = source.match(reWords);

words = words.map(word=> word.charAt(0).toLocaleUpperCase() + word.slice(1).toLocaleLowerCase());
words[0] = words[0].toLocaleLowerCase();

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"esModuleInterop": true,
"resolveJsonModule": true,
"allowJs": true,
"skipLibCheck": true
},
"include": [
"src"
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"moduleResolution": "node",
"esModuleInterop": true,
"noEmit": true,
"resolveJsonModule": true
"resolveJsonModule": true,
"skipLibCheck": true
},
"include": [
"src",
Expand Down

0 comments on commit bd67553

Please sign in to comment.