Code Monkey home page Code Monkey logo

i18n-tag-schema's People

Contributors

allcontributors[bot] avatar greenkeeper[bot] avatar greenkeeperio-bot avatar mmorton avatar skolmer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

i18n-tag-schema's Issues

generates "required" for every occurrence

i18n-tag-schema ./src generates a required value for every occurrence, not only once.
i.e. using { i18nStart } three times in the project generates "required": ["Start","Start","Start"] and this throws an npm error Error: schema is invalid: data.required should NOT have duplicate items

An in-range update of semantic-release is breaking the build 🚨

The devDependency semantic-release was updated from 15.13.11 to 15.13.12.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • coverage/coveralls: First build on greenkeeper/semantic-release-15.13.12 at 95.939% (Details).

Release Notes for v15.13.12

15.13.12 (2019-04-15)

Bug Fixes

  • package: update resolve-from to version 5.0.0 (6f3c21a)
Commits

The new version differs by 1 commits.

  • 6f3c21a fix(package): update resolve-from to version 5.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Typescript preprocessor

A working preprocessor is already implemented in the next branch.

TODO:

  • Extract v2.0 typescript preprocessor into a separate node module.
  • Add configuration/api to implement custom preprocessors.

Improve unit tests

The test coverage is pretty low at the moment. This needs to be improved.

Improved TypeScript 3.7 Support

I was running into an issue using TypeScript 3.7 with optional chaining and React Fragments using empty tags (<>...</>). In order to get both working properly the TypeScript preprocessor needs some minimal changes:

diff --git a/node_modules/i18n-tag-schema/dist/lib/preprocessors/typescript.js b/node_modules/i18n-tag-schema/dist/lib/preprocessors/typescript.js
index 0e5cd94..60923e3 100644
--- a/node_modules/i18n-tag-schema/dist/lib/preprocessors/typescript.js
+++ b/node_modules/i18n-tag-schema/dist/lib/preprocessors/typescript.js
@@ -15,8 +15,8 @@ exports.default = function (contents, filePath) {
   if (!ts) throw new Error('cannot find typescript compiler. check if \'typescript\' node module is installed.');
   var processed = ts.transpileModule(contents, {
     compilerOptions: {
-      target: ts.ScriptTarget.Latest,
-      jsx: path.extname(filePath) !== '.ts' ? ts.JsxEmit.Preserve : ts.JsxEmit.None
+      target: ts.ScriptTarget.ES2020,
+      jsx: path.extname(filePath) !== '.ts' ? ts.JsxEmit.React : ts.JsxEmit.None
     }
   });
   if (processed && processed.outputText) {

By setting ES2020 we force transpiling optional chaining syntax (such as foo?.bar and foo ?? bar). ts.JsxEmit.React is needed for proper fragment support.

Schema for custom translation groups

Custom translations groups should be added to the schema.

i18n('my custom group')`my fancy string`

shoud be validated as:

"my custom group": {
  "my fancy string": "some translation"
}

and

@i18nGroup('my custom group')
class App {
  getFancyString() {
    return this.i18n`my fancy string`
  }
  getCommonString() {
    return i18n('common')`my fancy string`
  }
}

shoud be validated as:

"my custom group": {
  "my fancy string": "some translation"
},
"common": {
  "my fancy string": "some other translation"
}

An in-range update of travis-deploy-once is breaking the build 🚨

The devDependency travis-deploy-once was updated from 5.0.7 to 5.0.8.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

travis-deploy-once is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • coverage/coveralls: First build on greenkeeper/travis-deploy-once-5.0.8 at 95.939% (Details).

Release Notes for v5.0.8

5.0.8 (2018-09-19)

Bug Fixes

  • fix babel-register config when module is globally installed (4697ad5)
Commits

The new version differs by 3 commits.

  • 4697ad5 fix: fix babel-register config when module is globally installed
  • 8105e60 chore(package): update nock to version 10.0.0
  • 43b48a3 chore(package): update xo to version 0.23.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Improve CLI

TODO

  • fix --filter flag ✅
  • display progress indicator ✅
  • add preprocessor argument #16

Issue with processing typescript files with certain generic expressions.

When calling transpileModule on a plain .ts file, with certain generic expressions and when jsx is set to ts.JsxEmit.Preserve, incorrect JS will be emitted. For example:

const ts = require('typescript');

const contents = `
const something = <T>(a: T) => {
}
`;

const processed = ts.transpileModule(contents, {
    compilerOptions: {
        target: ts.ScriptTarget.Latest,
        jsx: ts.JsxEmit.Preserve
    }
});

console.log(processed.outputText);

will emit:

const something = <T>(a: T) =>
</>;

Which will cause errors when Babylon tries to parse it.

An in-range update of ajv is breaking the build 🚨

Version 5.1.6 of ajv just got published.

Branch Build failing 🚨
Dependency ajv
Current Version 5.1.5
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

ajv is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 8 commits.

  • ff9f93a 5.1.6
  • 0d6ae42 fix: traverse only schema objects, fixes #521
  • daf7d6b docs: using with draft-04
  • 9f0b563 Merge pull request #508 from epoberezkin/greenkeeper/nyc-11.0.2
  • 55727d9 test: remove node v0.12, v5, add v8 to travis test
  • eac5902 chore(package): update nyc to version 11.0.2
  • f1c9f15 Merge pull request #507 from epoberezkin/greenkeeper/chai-4.0.1
  • d74a381 chore(package): update chai to version 4.0.1

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.