Skip to content

Commit e968930

Browse files
authored
Remove \#!/usr/bin/env node from scripts (#55304)
1 parent 9418dca commit e968930

File tree

75 files changed

+4
-129
lines changed

Some content is hidden

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

75 files changed

+4
-129
lines changed

src/archives/scripts/warmup-remotejson.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// This calls a function directly that is used by our archived enterprise

src/article-api/scripts/precompute-pageinfo.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
/**
42
* This script gathers all English pages, computes each page's
53
* 'title', 'intro' and 'product' properties. These things are then stored

src/assets/scripts/deleted-assets-pr-comment-1.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// For testing the GitHub Action that executes

src/assets/scripts/deleted-assets-pr-comment.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import * as github from '@actions/github'
42
import core from '@actions/core'
53

src/assets/scripts/find-orphaned-assets.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Print a list of all the asset files that can't be found mentioned

src/assets/scripts/list-image-sizes.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// This script lists all local image files, sorted by their dimensions.

src/assets/scripts/validate-asset-images.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Makes sure that all the image assets in `assets/` are safe.

src/audit-logs/scripts/sync.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
/**
42
* Required env variables:
53
*

src/code-scanning/scripts/generate-code-scanning-query-list.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
/**
42
* This script generates a block of Markdown that can be saved as a reusable.
53
* The reusable lists all the queries for one programming language, with CWEs, as a Markdown table.

src/codeql-cli/scripts/sync.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import { readFile, writeFile, copyFile } from 'fs/promises'
42
import { existsSync } from 'fs'
53
import walk from 'walk-sync'

src/content-linter/lib/helpers/get-lintable-yml.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import yaml from 'js-yaml'
42
import fs from 'fs/promises'
53

src/content-linter/scripts/disable-rules.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
// Disables markdownlint rules in markdown files with same-line comments. This is
32
// useful when introducing a new rule that causes many failures. The comments
43
// can be fixed and removed at while updating the file later.

src/content-linter/scripts/generate-docs.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import { writeFileSync } from 'fs'
32
import type { Rule, Config } from '../types.ts'
43
import { allRules, allConfig } from '../lib/helpers/get-rules.js'

src/content-linter/scripts/lint-content.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import fs from 'fs'
32
import path from 'path'
43
import { execSync } from 'child_process'

src/content-linter/scripts/post-lints.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import { program } from 'commander'
42
import fs from 'fs'
53
import coreLib from '@actions/core'

src/content-render/scripts/move-content.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Use this script to help you move or rename a single file or a folder. The script will move or rename the file or folder for you, update relevant `children` in the index.md file(s), and add a `redirect_from` to frontmatter in the renamed file(s). Note: You will still need to manually update the `title` if necessary.

src/content-render/scripts/reconcile-category-dirs-with-ids.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// This script will say which category pages needs to be renamed

src/content-render/scripts/reconcile-filenames-with-ids.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// An automated test checks for discrepancies between filenames and [autogenerated heading IDs](https://www.npmjs.com/package/remark-autolink-headings).

src/content-render/scripts/render-content-markdown.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import fs from 'fs'
32
import path from 'path'
43
import { execSync } from 'child_process'

src/dev-toc/generate.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import fs from 'fs'
42
import path from 'path'
53
import { execSync } from 'child_process'

src/early-access/scripts/migrate-early-access-product.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Move the files from an early-access product level docs set into an existing product.

src/early-access/scripts/symlink-from-local-repo.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// This script is run on a writer's machine while developing Early Access content locally.

src/early-access/scripts/update-data-and-image-paths.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// This script is run on a writer's machine while developing Early Access content locally. It

src/early-access/scripts/what-docs-early-access-branch.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import { getOctokit } from '@actions/github'
42
import { setOutput } from '@actions/core'
53

src/ghes-releases/scripts/create-enterprise-issue.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import { readFileSync } from 'fs'
42
import { basename } from 'path'
53
import { Liquid } from 'liquidjs'

src/ghes-releases/scripts/deprecate/archive-version.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Run this script during the Enterprise deprecation process to download

src/ghes-releases/scripts/get-liquid-conditionals.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// See https://github.com/harttle/liquidjs/discussions/294#discussioncomment-305068
42
import { Tokenizer } from 'liquidjs'
53

src/ghes-releases/scripts/release-banner.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// This script creates or removes a release candidate banner for a specified version.

src/ghes-releases/scripts/remove-static-files.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// This script removes the static GraphQL, REST, and webhook files for any

src/ghes-releases/scripts/remove-version-markup.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Run this script after an Enterprise deprecation to remove Liquid statements and frontmatter that

src/ghes-releases/scripts/update-enterprise-dates.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// This script fetches data from https://github.com/github/enterprise-releases/blob/master/releases.json

src/github-apps/scripts/enabled-list-schema.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
// This schema is used to validate
32
// src/github-apps/data/server-to-server-rest.json
43
// src/github-apps/data/user-to-server-rest.json

src/github-apps/scripts/permission-list-schema.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
// This schema is used to validate
32
// src/github-apps/data/fine-grained-pat-permissions.json
43
// and src/github-apps/data/server-to-server-permissions.json

src/github-apps/scripts/sync.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import { existsSync } from 'fs'
42
import { mkdirp } from 'mkdirp'
53
import { readFile, writeFile } from 'fs/promises'

src/graphql/scripts/build-changelog.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import { diff, ChangeType } from '@graphql-inspector/core'
32
import { loadSchema } from '@graphql-tools/load'
43
import fs from 'fs'

src/graphql/scripts/sync.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import fs from 'fs/promises'
32
import path from 'path'
43
import { mkdirp } from 'mkdirp'

src/graphql/scripts/utils/process-previews.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import { sentenceCase } from 'change-case'
32
import GithubSlugger from 'github-slugger'
43
const slugger = new GithubSlugger()

src/graphql/scripts/utils/process-schemas.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import { sortBy } from 'lodash-es'
32
import { parse, buildASTSchema } from 'graphql'
43
import helpers from './schema-helpers.js'

src/graphql/scripts/utils/process-upcoming-changes.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import yaml from 'js-yaml'
32
import { groupBy } from 'lodash-es'
43
import { renderContent } from '#src/content-render/index.js'

src/graphql/scripts/utils/schema-helpers.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import { renderContent } from '#src/content-render/index.js'
32
import fs from 'fs/promises'
43
import {

src/languages/scripts/purge-fastly-edge-cache-per-language.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import { languageKeys } from '#src/languages/lib/languages.js'
42

53
import { makeLanguageSurrogateKey } from '#src/frame/middleware/set-fastly-surrogate-key.js'

src/links/scripts/check-github-github-links.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Run this script to get all broken docs.github.com links in github/github

src/links/scripts/rendered-content-link-checker-cli.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// This script goes through all content and renders their HTML and from there

src/links/scripts/update-internal-links.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Run this script to update content's internal links.

src/redirects/scripts/get-new-dotcom-path.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Pass this script any old dotcom path (e.g., `articles/foo` or `foo.md`) and it

src/redirects/scripts/helpers/add-redirect-to-frontmatter.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
// add a new redirect string to redirect_from frontmatter
32

43
export default function addRedirectToFrontmatter(redirectFromData, newRedirectString) {

src/rest/docs.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import chalk from 'chalk'
42
import { readFile } from 'fs/promises'
53
import { allVersions } from '#src/versions/lib/all-versions.js'

src/rest/scripts/openapi-check.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Run this script to check if OpenAPI files can be decorated successfully.

src/rest/scripts/test-open-api-schema.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Run this script to check if OpenAPI operations match versions in content/rest operations

src/rest/scripts/update-files.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Run this script to generate the updated data files for the rest,

src/rest/scripts/utils/create-rest-examples.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// In the case that there are more than one example requests, and
42
// no content responses, a request with an example key that matches the
53
// status code of a response will be matched.
@@ -111,9 +109,9 @@ export function mergeExamples(requestExamples, responseExamples) {
111109

112110
/*
113111
Create an example object for each example in the requestBody property
114-
of the schema. Each requestBody can have more than one content type.
112+
of the schema. Each requestBody can have more than one content type.
115113
Each content type can have more than one example. We create an object
116-
for each permutation of content type and example.
114+
for each permutation of content type and example.
117115
Returns an array of objects in the format:
118116
{
119117
key,
@@ -220,9 +218,9 @@ export function getRequestExamples(operation) {
220218
/*
221219
Create an example object for each example in the response property
222220
of the schema. Each response can have more than one status code,
223-
each with more than one content type. And each content type can
221+
each with more than one content type. And each content type can
224222
have more than one example. We create an object
225-
for each permutation of status, content type, and example.
223+
for each permutation of status, content type, and example.
226224
Returns an array of objects in the format:
227225
{
228226
key,

src/rest/scripts/utils/get-body-params.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import { renderContent } from '@/content-render/index'
32

43
interface Schema {

src/rest/scripts/utils/get-redirects.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import { readFile, writeFile } from 'fs/promises'
32
const STATIC_REDIRECTS = 'src/rest/data/client-side-rest-api-redirects.json'
43
const REST_API_OVERRIDES = 'src/rest/lib/rest-api-overrides.json'

src/rest/scripts/utils/operation-schema.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
// This schema is used to validate each generated operation object at build time
32

43
export default {

src/rest/scripts/utils/operation.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import httpStatusCodes from 'http-status-code'
32
import { get, isPlainObject } from 'lodash-es'
43
import { parseTemplate } from 'url-template'

src/secret-scanning/scripts/sync.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
/**
42
* Required env variables:
53
*

src/tests/scripts/copy-fixture-data.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// There are certain files that have to be manually copied from the

src/versions/scripts/update-versioning-in-files.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import fs from 'fs'
32
import path from 'path'
43
import walk from 'walk-sync'

src/versions/scripts/use-short-versions.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import fs from 'fs'
32
import walk from 'walk-sync'
43
import path from 'path'

src/webhooks/scripts/webhook-schema.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
// This schema is used to validate each generated webhook object at build time
32

43
export default {

src/webhooks/scripts/webhook.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import { get, isPlainObject } from 'lodash-es'
32
import { getJsonValidator } from '@/tests/lib/validate-json-schema'
43
import { renderContent } from '@/content-render/index'

src/workflows/check-content-type.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import coreLib from '@actions/core'
42

53
import { checkContentType } from '@/workflows/fm-utils'

src/workflows/cmp-files.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// Given N files. Exit 0 if they all exist and are identical in content.

src/workflows/content-changes-table-comment-cli.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
// [start-readme]
42
//
53
// For testing the GitHub Action that executes

src/workflows/delete-orphan-translation-files.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
/**
42
* This script will delete files from a translation repo of files that
53
* only exist there and not "here". Here being the docs repo.

src/workflows/find-past-built-pr.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import got from 'got'
32

43
import { setOutput } from '@actions/core'

0 commit comments

Comments
 (0)