Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use 'use strict' in cjs files #3568

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/examples/proxy/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const { Pool, Client } = require('../../../')
const http = require('node:http')
const proxy = require('./proxy')
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/proxy/websocket.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const { Pool, Client } = require('../../../')
const http = require('node:http')
const proxy = require('./proxy')
Expand Down
2 changes: 2 additions & 0 deletions lib/api/abort-signal.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const { addAbortListener } = require('../core/util')
const { RequestAbortedError } = require('../core/errors')

Expand Down
2 changes: 2 additions & 0 deletions lib/api/util.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const assert = require('node:assert')
const {
ResponseStatusCodeError
Expand Down
2 changes: 2 additions & 0 deletions lib/core/symbols.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

module.exports = {
kClose: Symbol('close'),
kDestroy: Symbol('destroy'),
Expand Down
2 changes: 2 additions & 0 deletions lib/dispatcher/pool-stats.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('../core/symbols')
const kPool = Symbol('pool')

Expand Down
1 change: 1 addition & 0 deletions scripts/generate-pem.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
/* istanbul ignore file */

require('https-pem/install')
2 changes: 2 additions & 0 deletions scripts/generate-undici-types-package-json.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const fs = require('node:fs')
const path = require('node:path')

Expand Down
2 changes: 2 additions & 0 deletions scripts/verifyVersion.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/* istanbul ignore file */

const [major, minor, patch] = process.versions.node.split('.').map(v => Number(v))
Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/fetch.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const { createServer } = require('node:http')
const { fetch } = require('../..')

Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/undici.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const { createServer } = require('node:http')
const { request } = require('../..')

Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/websocket.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const { WebSocketServer } = require('ws')
const { WebSocket } = require('../..')

Expand Down
2 changes: 2 additions & 0 deletions test/jest/mock-scope.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const { MockAgent, setGlobalDispatcher, request } = require('../../index')

/* global afterAll, expect, it, AbortController */
Expand Down
2 changes: 2 additions & 0 deletions test/node-fetch/utils/server.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const http = require('node:http')
const zlib = require('node:zlib')
const { once } = require('node:events')
Expand Down
Loading