-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
data.js
52 lines (42 loc) · 1.15 KB
/
data.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// builtin
import { cwd } from 'node:process'
// external
import {
getESVersionsByDate,
getESVersionByDate,
getDateWithYearOffset,
} from '@bevry/ecmascript-versions'
export const pwd = cwd()
export const typesDir = 'compiled-types'
// fill this with a map of dependency package names to versions that are busted
// so that if they are necessary, a previous version is used instead
export const bustedVersions = {}
export const allLanguages = [
'typescript',
'esnext',
'es5',
'coffeescript',
'json',
'react',
'jsx',
'mdx',
'html',
'css',
]
// both browsers and typescript lag behind
// as it is 2023-11-01 and ES2023 isn't available to typescript, even though it has been ratified (they get ratified in the middle of year)
const aYearAgo = getDateWithYearOffset(-1)
// we reverse, to make sure it is newest first
export const allTypescriptTargets = [
'ESNext',
...getESVersionsByDate(aYearAgo).reverse(),
]
export const defaultCoffeeTarget = 'ESNext'
// previous year
export const defaultBrowserTarget = getESVersionByDate(aYearAgo)
export const languageNames = {
typescript: 'TypeScript',
esnext: 'ESNext',
es5: 'ES5',
coffeescript: 'CoffeeScript',
}