diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 469ff7c72fb5..9c12a667d5b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,7 +49,6 @@ jobs: { name: 'graphql', path: 'src/graphql/tests', }, { name: 'landings', path: 'src/landings/tests', }, { name: 'linting', path: 'src/content-linter/tests', }, - { name: 'meta', path: 'tests/meta', }, { name: 'observability', path: 'src/observability/tests' }, { name: 'pageinfo', path: 'src/pageinfo/tests', }, { name: 'rendering', path: 'tests/rendering', }, diff --git a/contributing/code-annotations.md b/contributing/code-annotations.md index bde21e8c0739..4a91de1875a2 100644 --- a/contributing/code-annotations.md +++ b/contributing/code-annotations.md @@ -17,7 +17,7 @@ For more experienced users, code annotations can help them understand a code exa An annotated code example must start with a single line annotation. You can start with a blank annotation if you do not want to add an annotation to the first line of code. -You must use the comment tag for the language that the code sample is written in. For example, `#` for YAML and `//` for Ruby. +You must use the comment tag for the language that the code sample is written in. For example, `#` for YAML and `//` for JavaScript. To enable code sample annotations, you must specify a language followed by the word `annotate` after the starting triple backtick code tag. diff --git a/lib/enterprise-server-releases.js b/lib/enterprise-server-releases.js index 0220c4d8031d..c19f351ee50c 100644 --- a/lib/enterprise-server-releases.js +++ b/lib/enterprise-server-releases.js @@ -12,7 +12,7 @@ export const dates = JSON.parse(await fs.readFile('src/ghes-releases/lib/enterpr export const next = '3.10' export const nextNext = '3.11' -export const supported = ['3.9', '3.8', '3.7', '3.6', '3.5', '3.4'] +export const supported = ['3.9', '3.8', '3.7', '3.6', '3.5'] // Ensure that: // "next" is ahead of "latest" by one minor or major release. @@ -37,7 +37,7 @@ function isValidNext(v1, v2) { // When you're archiving a version, add the new archived number to this // array and you should never need to touch the `deprecated` array // on the line just below. -export const deprecatedWithFunctionalRedirects = ['3.3', '3.2', '3.1', '3.0'] +export const deprecatedWithFunctionalRedirects = ['3.4', '3.3', '3.2', '3.1', '3.0'] export const deprecated = [ ...deprecatedWithFunctionalRedirects, '2.22', diff --git a/src/content-linter/tests/lint-versioning.js b/src/content-linter/tests/lint-versioning.js index e3da83ba09d0..6d3e69635055 100644 --- a/src/content-linter/tests/lint-versioning.js +++ b/src/content-linter/tests/lint-versioning.js @@ -157,6 +157,7 @@ function validateIfversionConditionals(conds) { // allows us to deprecate the version before removing // the old liquid content. if ( + version !== 'ghae' && !( supported.includes(release) || release === next || diff --git a/src/rest/scripts/test-open-api-schema.js b/src/rest/scripts/test-open-api-schema.js index dff30cf00504..c2ea8b974f86 100755 --- a/src/rest/scripts/test-open-api-schema.js +++ b/src/rest/scripts/test-open-api-schema.js @@ -13,6 +13,7 @@ import frontmatter from '../../../lib/read-frontmatter.js' import getApplicableVersions from '../../../lib/get-applicable-versions.js' import { allVersions, getDocsVersion } from '../../../lib/all-versions.js' import { REST_DATA_DIR, REST_SCHEMA_FILENAME } from '../lib/index.js' +import { deprecated } from '../../../lib/enterprise-server-releases.js' const contentFiles = [] @@ -52,7 +53,11 @@ export async function getDiffOpenAPIContentRest() { async function createOpenAPISchemasCheck() { const openAPICheck = createCheckObj() - const restDirectory = fs.readdirSync(REST_DATA_DIR).filter((dir) => !dir.endsWith('.json')) + const restDirectory = fs + .readdirSync(REST_DATA_DIR) + .filter((dir) => !dir.endsWith('.json')) + // Allow the most recent deprecation to exist on disk until fully deprecated + .filter((dir) => !dir.includes(deprecated[0])) restDirectory.forEach((dir) => { const filename = path.join(REST_DATA_DIR, dir, REST_SCHEMA_FILENAME) diff --git a/tests/fixtures/content/get-started/liquid/ifversion.md b/tests/fixtures/content/get-started/liquid/ifversion.md index f4ef2b803b5d..5092b2df9eff 100644 --- a/tests/fixtures/content/get-started/liquid/ifversion.md +++ b/tests/fixtures/content/get-started/liquid/ifversion.md @@ -67,7 +67,7 @@ condition-l {% ifversion ghes %} condition-m - {% ifversion ghes = 3.4 %} + {% ifversion ghes = 3.5 %} condition-n {% endif %} {% endif %} diff --git a/tests/meta/orphan-tests.js b/tests/meta/orphan-tests.js deleted file mode 100644 index 6be4dc4ee6ae..000000000000 --- a/tests/meta/orphan-tests.js +++ /dev/null @@ -1,21 +0,0 @@ -import { statSync } from 'fs' -import fs from 'fs/promises' -import path from 'path' - -describe('check for orphan tests', () => { - test('all tests are in sub-directories', async () => { - // A known list of exceptions that can live outside of directories - const EXCEPTIONS = ['README.md', 'package.json', 'utils.js', '.DS_Store', 'PLAYWRIGHT.md'] - const pathToTests = 'tests' - - // Get a list of files/directories in `/tests` - const testDirectory = await fs.readdir(pathToTests) - - // Filter out our exceptions and directories - const filteredList = testDirectory - .filter((item) => !EXCEPTIONS.includes(item)) - .filter((item) => !statSync(path.join(pathToTests, item)).isDirectory()) - - expect(filteredList).toHaveLength(0) - }) -}) diff --git a/tests/rendering-fixtures/liquid.js b/tests/rendering-fixtures/liquid.js index ab4f353c590c..7ecb9745f003 100644 --- a/tests/rendering-fixtures/liquid.js +++ b/tests/rendering-fixtures/liquid.js @@ -154,15 +154,6 @@ describe('extended Markdown', () => { 'condition-l', ], 'enterprise-cloud@latest': ['condition-c', 'condition-j', 'condition-l'], - 'enterprise-server@3.4': [ - 'condition-c', - 'condition-e', - 'condition-g', - 'condition-i', - 'condition-j', - 'condition-m', - 'condition-n', - ], 'enterprise-server@3.5': [ 'condition-c', 'condition-e', @@ -172,6 +163,7 @@ describe('extended Markdown', () => { 'condition-i', 'condition-k', 'condition-m', + 'condition-n', 'condition-o', ], 'enterprise-server@3.6': [