Skip to content

Commit

Permalink
Change to use @iarna/toml instead of toml (#6839)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Walker-GM authored and jtoar committed Nov 11, 2022
1 parent d21a129 commit 9332199
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@babel/core": "7.19.3",
"@babel/plugin-transform-typescript": "7.19.3",
"@babel/runtime-corejs3": "7.19.4",
"@iarna/toml": "2.2.5",
"@vscode/ripgrep": "1.14.2",
"core-js": "3.26.0",
"cross-undici-fetch": "0.4.14",
Expand All @@ -37,7 +38,6 @@
"jscodeshift": "0.14.0",
"prettier": "2.7.1",
"tasuku": "2.0.0",
"toml": "3.0.0",
"typescript": "4.7.4",
"yargs": "17.6.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/codemods/src/lib/getRWPaths.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import fs from 'fs'
import path from 'path'

import toml from '@iarna/toml'
import merge from 'deepmerge'
import findUp from 'findup-sync'
import toml from 'toml'

enum TargetEnum {
NODE = 'node',
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@graphql-codegen/typescript-operations": "2.5.4",
"@graphql-codegen/typescript-react-apollo": "3.3.4",
"@graphql-codegen/typescript-resolvers": "2.7.4",
"@iarna/toml": "2.2.5",
"@redwoodjs/graphql-server": "3.4.0",
"babel-plugin-graphql-tag": "3.3.0",
"babel-plugin-polyfill-corejs3": "0.6.0",
Expand All @@ -58,7 +59,6 @@
"string-env-interpolation": "1.0.1",
"systeminformation": "5.12.6",
"terminal-link": "2.1.1",
"toml": "3.0.0",
"typescript": "4.7.4"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fs from 'fs'

import toml from '@iarna/toml'
import merge from 'deepmerge'
import { env as envInterpolation } from 'string-env-interpolation'
import toml from 'toml'

import { getConfigPath } from './paths'

Expand Down
2 changes: 1 addition & 1 deletion packages/structure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
},
"dependencies": {
"@babel/runtime-corejs3": "7.19.4",
"@iarna/toml": "2.2.5",
"@prisma/internals": "4.5.0",
"@redwoodjs/internal": "3.4.0",
"@types/line-column": "1.0.0",
Expand All @@ -47,7 +48,6 @@
"lodash-decorators": "6.0.1",
"lru-cache": "6.0.0",
"proxyquire": "2.1.3",
"toml": "3.0.0",
"ts-morph": "15.1.0",
"vscode-languageserver": "6.1.1",
"vscode-languageserver-textdocument": "1.0.7",
Expand Down
7 changes: 5 additions & 2 deletions packages/structure/src/model/RWTOML.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parse as parseTOML } from 'toml'
import { JsonMap, parse as parseTOML } from '@iarna/toml'
import { Range } from 'vscode-languageserver-types'

import { FileNode } from '../ide'
Expand All @@ -19,7 +19,10 @@ export class RWTOML extends FileNode {
return parseTOML(this.text)
}
@lazy() get web_includeEnvironmentVariables(): string[] | undefined {
return this.parsedTOML?.web?.includeEnvironmentVariables ?? []
return (
((this.parsedTOML?.web as JsonMap)
?.includeEnvironmentVariables as string[]) ?? []
)
}
*diagnostics() {
try {
Expand Down
15 changes: 4 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3736,7 +3736,7 @@ __metadata:
languageName: node
linkType: hard

"@iarna/toml@npm:^2.2.5":
"@iarna/toml@npm:2.2.5, @iarna/toml@npm:^2.2.5":
version: 2.2.5
resolution: "@iarna/toml@npm:2.2.5"
checksum: d095381ad4554aca233b7cf5a91f243ef619e5e15efd3157bc640feac320545450d14b394aebbf6f02a2047437ced778ae598d5879a995441ab7b6c0b2c2f201
Expand Down Expand Up @@ -6432,6 +6432,7 @@ __metadata:
"@babel/core": 7.19.3
"@babel/plugin-transform-typescript": 7.19.3
"@babel/runtime-corejs3": 7.19.4
"@iarna/toml": 2.2.5
"@types/babel__core": 7.1.19
"@types/findup-sync": 4.0.2
"@types/fs-extra": 9.0.13
Expand All @@ -6452,7 +6453,6 @@ __metadata:
prettier: 2.7.1
tasuku: 2.0.0
tempy: 1.0.1
toml: 3.0.0
typescript: 4.7.4
yargs: 17.6.0
bin:
Expand Down Expand Up @@ -6648,6 +6648,7 @@ __metadata:
"@graphql-codegen/typescript-operations": 2.5.4
"@graphql-codegen/typescript-react-apollo": 3.3.4
"@graphql-codegen/typescript-resolvers": 2.7.4
"@iarna/toml": 2.2.5
"@redwoodjs/graphql-server": 3.4.0
"@types/babel-plugin-tester": 9.0.5
"@types/babel__core": 7.1.19
Expand All @@ -6673,7 +6674,6 @@ __metadata:
string-env-interpolation: 1.0.1
systeminformation: 5.12.6
terminal-link: 2.1.1
toml: 3.0.0
typescript: 4.7.4
bin:
rw-gen: ./dist/generate/generate.js
Expand Down Expand Up @@ -6753,6 +6753,7 @@ __metadata:
"@babel/cli": 7.19.3
"@babel/core": 7.19.3
"@babel/runtime-corejs3": 7.19.4
"@iarna/toml": 2.2.5
"@prisma/internals": 4.5.0
"@redwoodjs/internal": 3.4.0
"@types/fs-extra": 9.0.13
Expand All @@ -6775,7 +6776,6 @@ __metadata:
lodash-decorators: 6.0.1
lru-cache: 6.0.0
proxyquire: 2.1.3
toml: 3.0.0
ts-morph: 15.1.0
typescript: 4.7.4
vscode-languageserver: 6.1.1
Expand Down Expand Up @@ -29609,13 +29609,6 @@ __metadata:
languageName: node
linkType: hard

"toml@npm:3.0.0":
version: 3.0.0
resolution: "toml@npm:3.0.0"
checksum: 8d7ed3e700ca602e5419fca343e1c595eb7aa177745141f0761a5b20874b58ee5c878cd045c408da9d130cb2b611c639912210ba96ce2f78e443569aa8060c18
languageName: node
linkType: hard

"totalist@npm:^1.0.0":
version: 1.1.0
resolution: "totalist@npm:1.1.0"
Expand Down

0 comments on commit 9332199

Please sign in to comment.