Skip to content

Commit

Permalink
[COMPLIANCE] Add Copyright and License Headers (hashicorp#338)
Browse files Browse the repository at this point in the history
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
  • Loading branch information
hashicorp-copywrite[bot] authored Feb 1, 2023
1 parent acce2c5 commit 1f9a64f
Show file tree
Hide file tree
Showing 30 changed files with 150 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .jest/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import ReactDOMServer from 'react-dom/server'
import React from 'react'
import { VFileCompatible } from 'vfile'
Expand Down
5 changes: 5 additions & 0 deletions __tests__/fixtures/basic/components/dynamic.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export default function Dynamic() {
return <div>I am a dynamic component.</div>
}
5 changes: 5 additions & 0 deletions __tests__/fixtures/basic/components/test.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

'use client'
import { useState } from 'react'

Expand Down
5 changes: 5 additions & 0 deletions __tests__/fixtures/basic/pages/index.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import fs from 'fs'
import path from 'path'
import { createContext, useEffect, useState } from 'react'
Expand Down
5 changes: 5 additions & 0 deletions __tests__/fixtures/rsc/app/app-dir-mdx/compile-mdx/page.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import fs from 'fs'
import path from 'path'
import dynamic from 'next/dynamic'
Expand Down
5 changes: 5 additions & 0 deletions __tests__/fixtures/rsc/app/app-dir-mdx/mdxremote/page.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import fs from 'fs'
import path from 'path'
import dynamic from 'next/dynamic'
Expand Down
5 changes: 5 additions & 0 deletions __tests__/fixtures/rsc/app/head.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export default function Head() {
return (
<>
Expand Down
5 changes: 5 additions & 0 deletions __tests__/fixtures/rsc/app/layout.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export default function RootLayout({ children }) {
return (
<html>
Expand Down
5 changes: 5 additions & 0 deletions __tests__/fixtures/rsc/components/dynamic.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export default function Dynamic() {
return <div>I am a dynamic component.</div>
}
5 changes: 5 additions & 0 deletions __tests__/fixtures/rsc/components/test.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

'use client'

import { useState } from 'react'
Expand Down
5 changes: 5 additions & 0 deletions __tests__/fixtures/rsc/next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

module.exports = {
experimental: {
appDir: true,
Expand Down
5 changes: 5 additions & 0 deletions __tests__/integration.test.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { Server } from 'http'
import * as cheerio from 'cheerio'

Expand Down
5 changes: 5 additions & 0 deletions __tests__/serialize.test.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import * as React from 'react'
import ReactDOMServer from 'react-dom/server'
import { paragraphCustomAlerts } from '@hashicorp/remark-plugins'
Expand Down
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export * from './dist/index'
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export * from './dist/index.js'
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export default {
testPathIgnorePatterns: ['fixtures'],
transformIgnorePatterns: [
Expand Down
5 changes: 5 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import resolve from '@rollup/plugin-node-resolve'
import cjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
Expand Down
5 changes: 5 additions & 0 deletions rsc.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export * from './dist/rsc'
5 changes: 5 additions & 0 deletions rsc.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export * from './dist/rsc.js'
5 changes: 5 additions & 0 deletions serialize.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export * from './dist/serialize'
5 changes: 5 additions & 0 deletions serialize.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { serialize } from './dist/serialize.js'

export { serialize }
5 changes: 5 additions & 0 deletions src/format-mdx-error.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { codeFrameColumns } from '@babel/code-frame'

/**
Expand Down
5 changes: 5 additions & 0 deletions src/idle-callback-polyfill.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

if (typeof window !== 'undefined') {
window.requestIdleCallback =
window.requestIdleCallback ||
Expand Down
5 changes: 5 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import './idle-callback-polyfill'
import React, { useEffect, useState, useMemo } from 'react'
import { jsxRuntime } from './jsx-runtime.cjs'
Expand Down
5 changes: 5 additions & 0 deletions src/jsx-runtime.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

/**
* Allow jsx-runtime to be successfully imported from either React 17 or React 18.
*
Expand Down
5 changes: 5 additions & 0 deletions src/jsx-runtime.cjs.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import * as jsxRuntime from 'react/jsx-runtime'

export { jsxRuntime }
5 changes: 5 additions & 0 deletions src/plugins/remove-imports-exports.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { remove } from 'unist-util-remove'
import { Plugin } from 'unified'

Expand Down
5 changes: 5 additions & 0 deletions src/rsc.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import React from 'react'
import { jsxRuntime } from './jsx-runtime.cjs'
import { MDXRemoteSerializeResult, SerializeOptions } from './types'
Expand Down
5 changes: 5 additions & 0 deletions src/serialize.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { compile, CompileOptions } from '@mdx-js/mdx'
import { VFile, VFileCompatible } from 'vfile'
import { matter } from 'vfile-matter'
Expand Down
5 changes: 5 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { Pluggable, Compiler } from 'unified'
import { CompileOptions } from '@mdx-js/mdx'

Expand Down

0 comments on commit 1f9a64f

Please sign in to comment.