Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade vinyl-fs from 3.0.2 to 4.0.0 #930

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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