Skip to content

Commit

Permalink
Upgrade vinyl-fs from 3.0.2 to 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
woutervanvliet committed Oct 13, 2023
1 parent cce4164 commit 14a1c24
Show file tree
Hide file tree
Showing 4 changed files with 218 additions and 12 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ i18n = new i18nextParser([i18n], {
export default i18n
```

> **Note**: You may need to configure Broccoli to place temporary files (option: tmpdir) within the current working
> directory as I18next-parser does not traverse down beyond that.
## Options

Using a config file gives you fine-grained control over how i18next-parser treats your files. Here's an example config showing all config options with their defaults.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"sort-keys": "^5.0.0",
"typescript": "^5.0.4",
"vinyl": "~3.0.0",
"vinyl-fs": "^3.0.2",
"vinyl-fs": "^4.0.0",
"vue-template-compiler": "^2.6.11"
},
"devDependencies": {
Expand Down
10 changes: 9 additions & 1 deletion test/broccoli/broccoli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import PluralRulesMock from '../Intl.PluralRules.mock.js'

const { Builder } = broccoli
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const broccoliTmpDir = path.join(__dirname, '_broccoli_tmp')

describe('broccoli plugin', function () {
// test execution time depends on I/O
Expand All @@ -18,12 +19,19 @@ describe('broccoli plugin', function () {

beforeEach(async () => {
await fs.emptyDir(path.resolve(__dirname, './src/locales'))
await fs.emptyDir(broccoliTmpDir)

sinon.replace(Intl, 'PluralRules', PluralRulesMock)
builder = new Builder(brocFile)
builder = new Builder(brocFile, {
// Place temporary files someplace under the current working directory,
// as glob-stream doesn't look further down on the file system than that
tmpdir: broccoliTmpDir,
})
})

afterEach(async () => {
await fs.emptyDir(path.resolve(__dirname, './src/locales'))

await builder.cleanup()
sinon.restore()
})
Expand Down
Loading

0 comments on commit 14a1c24

Please sign in to comment.