Skip to content

Commit cef133f

Browse files
author
David Cavazos
committed
pass through eslint-cjs-to-esm and lebab
1 parent f04c5a3 commit cef133f

File tree

76 files changed

+301
-350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+301
-350
lines changed

ai-platform/snippets/expensive-test/create-data-labeling-job-image.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616

1717
'use strict';
1818

19-
const path = require('path');
20-
const {assert} = require('chai');
21-
const {after, describe, it} = require('mocha');
22-
const uuid = require('uuid').v4;
23-
const cp = require('child_process');
19+
import path from 'node:path';
20+
import {assert} from 'chai';
21+
import {after, describe, it} from 'mocha';
22+
import {v4 as uuid} from 'uuid';
23+
import cp from 'node:child_process';
2424
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2525
const cwd = path.join(__dirname, '..');
2626

ai-platform/snippets/expensive-test/create-data-labeling-job-video.test.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@
1616

1717
'use strict';
1818

19-
const path = require('path');
20-
const {assert} = require('chai');
21-
const {after, describe, it} = require('mocha');
22-
23-
const uuid = require('uuid').v4;
24-
const cp = require('child_process');
19+
import path from 'node:path';
20+
import {assert} from 'chai';
21+
import {after, describe, it} from 'mocha';
22+
import {v4 as uuid} from 'uuid';
23+
import cp from 'node:child_process';
2524
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2625
const cwd = path.join(__dirname, '..');
2726

ai-platform/snippets/expensive-test/create-data-labeling-job.test.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@
1616

1717
'use strict';
1818

19-
const path = require('path');
20-
const {assert} = require('chai');
21-
const {after, describe, it} = require('mocha');
22-
23-
const uuid = require('uuid').v4;
24-
const cp = require('child_process');
19+
import path from 'node:path';
20+
import {assert} from 'chai';
21+
import {after, describe, it} from 'mocha';
22+
import {v4 as uuid} from 'uuid';
23+
import cp from 'node:child_process';
2524
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2625
const cwd = path.join(__dirname, '..');
2726

ai-platform/snippets/expensive-test/get-training-pipeline.test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616

1717
'use strict';
1818

19-
const path = require('path');
20-
const {assert} = require('chai');
21-
const {describe, it} = require('mocha');
22-
23-
const cp = require('child_process');
19+
import path from 'node:path';
20+
import {assert} from 'chai';
21+
import {describe, it} from 'mocha';
22+
import cp from 'node:child_process';
2423
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2524
const cwd = path.join(__dirname, '..');
2625

ai-platform/snippets/expensive-test/import-data-text-entity-extraction.test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616

1717
'use strict';
1818

19-
const path = require('path');
20-
const {assert} = require('chai');
21-
const {describe, it} = require('mocha');
22-
23-
const cp = require('child_process');
19+
import path from 'node:path';
20+
import {assert} from 'chai';
21+
import {describe, it} from 'mocha';
22+
import cp from 'node:child_process';
2423
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2524
const cwd = path.join(__dirname, '..');
2625

ai-platform/snippets/expensive-test/import-data-text-sentiment-analysis.test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616

1717
'use strict';
1818

19-
const path = require('path');
20-
const {assert} = require('chai');
21-
const {describe, it} = require('mocha');
22-
23-
const cp = require('child_process');
19+
import path from 'node:path';
20+
import {assert} from 'chai';
21+
import {describe, it} from 'mocha';
22+
import cp from 'node:child_process';
2423
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2524
const cwd = path.join(__dirname, '..');
2625

ai-platform/snippets/expensive-test/import-data-video-object-tracking.test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616

1717
'use strict';
1818

19-
const path = require('path');
20-
const {assert} = require('chai');
21-
const {describe, it} = require('mocha');
22-
23-
const cp = require('child_process');
19+
import path from 'node:path';
20+
import {assert} from 'chai';
21+
import {describe, it} from 'mocha';
22+
import cp from 'node:child_process';
2423
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2524
const cwd = path.join(__dirname, '..');
2625

ai-platform/snippets/gemma2PredictGpu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function gemma2PredictGpu(predictionServiceClient) {
6565
return text;
6666
}
6767

68-
module.exports = gemma2PredictGpu;
68+
export default gemma2PredictGpu;
6969

7070
// TODO(developer): Uncomment below lines before running the sample.
7171
// gemma2PredictGpu(...process.argv.slice(2)).catch(err => {

ai-platform/snippets/gemma2PredictTpu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async function gemma2PredictTpu(predictionServiceClient) {
6868
return text;
6969
}
7070

71-
module.exports = gemma2PredictTpu;
71+
export default gemma2PredictTpu;
7272

7373
// TODO(developer): Uncomment below lines before running the sample.
7474
// gemma2PredictTpu(...process.argv.slice(2)).catch(err => {

ai-platform/snippets/imagen-edit-image-inpainting-insert-mask.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ async function main() {
4444
const predictionServiceClient = new PredictionServiceClient(clientOptions);
4545

4646
async function editImageInpaintingInsertMask() {
47-
const fs = require('fs');
48-
const util = require('util');
47+
const fs = require('node:fs');
48+
const util = require('node:util');
4949
// Configure the parent resource
5050
const endpoint = `projects/${projectId}/locations/${location}/publishers/google/models/imagegeneration@006`;
5151

0 commit comments

Comments
 (0)