Skip to content

Commit 4f82b4b

Browse files
authored
chore(scripts): try experimental-strip-types [skip-bc] (#3764)
1 parent b012ca8 commit 4f82b4b

Some content is hidden

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

61 files changed

+231
-247
lines changed

.github/actions/setup/action.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ runs:
4747
shell: bash
4848
run: YARN_ENABLE_HARDENED_MODE=0 YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
4949

50-
- name: Build scripts
51-
shell: bash
52-
run: yarn workspace scripts build:cli
53-
5450
# JavaScript client deps
5551
- name: Get yarn js-client cache directory path
5652
if: ${{ inputs.language == 'javascript' }}

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
"build": "yarn build:eslint && yarn scripts:build",
1616
"build:eslint": "yarn workspace eslint-plugin-automation-custom build && yarn install",
1717
"clean": "rm -rf **/dist **/build **/.build **/node_modules **/.gradle **/vendor **/bin **/obj **/__pycache__ || true",
18-
"cli": "cd scripts && yarn build:cli && yarn start",
18+
"cli": "yarn workspace scripts start",
1919
"docker:setup": "./scripts/docker/setup.sh",
2020
"fix:json": "eslint --ext=json . --fix",
2121
"fix:mustache": "eslint --ext=mustache templates/**/tests/ --fix",
2222
"github-actions:lint": "eslint --ext=yml .github/",
23-
"postinstall": "husky && yarn workspace eslint-plugin-automation-custom build && yarn workspace scripts build:cli",
23+
"postinstall": "husky && yarn workspace eslint-plugin-automation-custom build",
2424
"playground:browser": "yarn workspace javascript-browser-playground start",
25-
"scripts:build": "yarn workspace scripts build",
25+
"scripts:build": "yarn workspace scripts build:actions",
2626
"scripts:lint": "yarn workspace scripts lint",
2727
"scripts:test": "yarn workspace scripts test",
2828
"specs:fix": "eslint --ext=yml $0 --fix",
@@ -40,7 +40,6 @@
4040
"husky": "9.1.7",
4141
"lint-staged": "15.3.0",
4242
"oxlint": "0.11.1",
43-
"pinst": "3.0.0",
4443
"prettier": "3.4.2",
4544
"prettier-plugin-java": "2.6.5",
4645
"prettier-plugin-organize-imports": "4.1.0",

scripts/__tests__/common.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { execa } from 'execa';
22
import { afterEach, describe, expect, it, vi } from 'vitest';
33

4-
import { capitalize, createClientName, gitCommit } from '../common.js';
5-
import { getClientsConfigField } from '../config.js';
4+
import { capitalize, createClientName, gitCommit } from '../common.ts';
5+
import { getClientsConfigField } from '../config.ts';
66

77
vi.mock('execa', () => {
88
return {

scripts/buildLanguages.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { existsSync } from 'node:fs';
22

3-
import { createClientName, run, toAbsolutePath } from './common.js';
4-
import { getLanguageFolder } from './config.js';
5-
import { formatter } from './formatter.js';
6-
import { createSpinner } from './spinners.js';
7-
import type { Generator, Language } from './types.js';
3+
import { createClientName, run, toAbsolutePath } from './common.ts';
4+
import { getLanguageFolder } from './config.ts';
5+
import { formatter } from './formatter.ts';
6+
import { createSpinner } from './spinners.ts';
7+
import type { Generator, Language } from './types.ts';
88

99
type BuildType = 'client' | 'guides' | 'playground' | 'snippets';
1010

scripts/cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fsp from 'fs/promises';
22

33
import { hashElement } from 'folder-hash';
44

5-
import { exists } from './common.js';
5+
import { exists } from './common.ts';
66

77
export class Cache {
88
folder: string;

scripts/ci/codegen/__tests__/codegen.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { describe, expect, it, vi } from 'vitest';
22

3-
import { pushGeneratedCode } from '../pushGeneratedCode.js';
3+
import { pushGeneratedCode } from '../pushGeneratedCode.ts';
44

5-
vi.mock('../../../common.js', async (importOriginal) => {
6-
const mod = await importOriginal<typeof import('../../../common.js')>();
5+
vi.mock('../../../common.ts', async (importOriginal) => {
6+
const mod = await importOriginal<typeof import('../../../common.ts')>();
77
return {
88
...mod,
99
run: vi.fn().mockResolvedValue(''),

scripts/ci/codegen/__tests__/spreadGeneration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, it } from 'vitest';
22

3-
import { cleanUpCommitMessage } from '../spreadGeneration.js';
4-
import text from '../text.js';
3+
import { cleanUpCommitMessage } from '../spreadGeneration.ts';
4+
import text from '../text.ts';
55

66
describe('spread generation', () => {
77
describe('cleanUpCommitMessage', () => {

scripts/ci/codegen/createGitHubReleases.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import fsp from 'fs/promises';
2-
import { ensureGitHubToken, getOctokit, OWNER, run, setVerbose, toAbsolutePath } from '../../common.js';
3-
import { isPreRelease } from '../../release/versionsHistory.js';
4-
import type { Language } from '../../types.js';
5-
import { cloneRepository } from '../utils.js';
2+
import { ensureGitHubToken, getOctokit, OWNER, run, setVerbose, toAbsolutePath } from '../../common.ts';
3+
import { isPreRelease } from '../../release/versionsHistory.ts';
4+
import type { Language } from '../../types.ts';
5+
import { cloneRepository } from '../utils.ts';
66

77
import { resolve } from 'path';
8-
import { stripCommitMessage } from '../../release/common.js';
9-
import { commitStartRelease } from './text.js';
8+
import { stripCommitMessage } from '../../release/common.ts';
9+
import { commitStartRelease } from './text.ts';
1010

1111
async function createGitHubRelease(lang: Language): Promise<void> {
1212
// **Full Changelog**:

scripts/ci/codegen/pushGeneratedCode.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { setOutput } from '@actions/core';
22

3-
import { configureGitHubAuthor, ensureGitHubToken, MAIN_BRANCH, run } from '../../common.js';
4-
import { getNbGitDiff } from '../utils.js';
3+
import { configureGitHubAuthor, ensureGitHubToken, MAIN_BRANCH, run } from '../../common.ts';
4+
import { getNbGitDiff } from '../utils.ts';
55

6-
import text, { commitStartPrepareRelease } from './text.js';
6+
import text, { commitStartPrepareRelease } from './text.ts';
77

88
async function isUpToDate(baseBranch: string): Promise<boolean> {
99
await run('git fetch origin');

scripts/ci/codegen/pushToRepository.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import {
1313
run,
1414
setVerbose,
1515
toAbsolutePath,
16-
} from '../../common.js';
17-
import { getNbGitDiff } from '../utils.js';
18-
import { GuidesToPush, pushToRepositoryConfiguration, RepositoryConfiguration, SpecsToPush } from './types.js';
16+
} from '../../common.ts';
17+
import { getNbGitDiff } from '../utils.ts';
18+
import { GuidesToPush, pushToRepositoryConfiguration, RepositoryConfiguration, SpecsToPush } from './types.ts';
1919

20-
import { getClientsConfigField } from '../../config.js';
21-
import { commitStartRelease } from './text.js';
20+
import { getClientsConfigField } from '../../config.ts';
21+
import { commitStartRelease } from './text.ts';
2222

2323
async function handleSpecFiles(spec: SpecsToPush, tempGitDir: string): Promise<void> {
2424
const pathToSpecs = toAbsolutePath(`${tempGitDir}/${spec.output}`);

0 commit comments

Comments
 (0)